{"_id":"595cc37478dc10005d3f15e3","project":"55faeacad0e22017005b8265","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":33,"createdAt":"2015-09-17T16:31:06.800Z","releaseDate":"2015-09-17T16:31:06.800Z","categories":["55faeacbd0e22017005b8269","55faf550764f50210095078e","55faf5b5626c341700fd9e96","55faf8a7825d5f19001fa386","560052f91503430d007cc88f","560054f73aa0520d00da0b1a","56005aaf6932a00d00ba7c62","56005c273aa0520d00da0b3f","5601ae7681a9670d006d164d","5601ae926811d00d00ceb487","5601aeb064866b1900f4768d","5601aee850ee460d0002224c","5601afa02499c119000faf19","5601afd381a9670d006d1652","561d4c78281aec0d00eb27b6","561d588d8ca8b90d00210219","563a5f934cc3621900ac278c","5665c5763889610d0008a29e","566710a36819320d000c2e93","56ddf6df8a5ae10e008e3926","56e1c96b2506700e00de6e83","56e1ccc4e416450e00b9e48c","56e1ccdfe63f910e00e59870","56e1cd10bc46be0e002af26a","56e1cd21e416450e00b9e48e","56e3139a51857d0e008e77be","573b4f62ef164e2900a2b881","57c9d1335fd8ca0e006308ed","57e2bd9d1e7b7220000d7fa5","57f2b992ac30911900c7c2b6","58adb5c275df0f1b001ed59b","58c81b5c6dc7140f003c3c46","595412446ed4d9001b3e7b37"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"v1","version_clean":"1.0.0","version":"1"},"category":{"_id":"57e2bd9d1e7b7220000d7fa5","version":"55faeacad0e22017005b8268","__v":0,"project":"55faeacad0e22017005b8265","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-09-21T17:04:29.273Z","from_sync":false,"order":14,"slug":"answerfactory-web-application","title":"AnswerFactory Application"},"user":"56267741db1eda0d001c3dbb","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-07-05T10:46:12.942Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"put","examples":{"codes":[{"code":"Request:\nPUT /answer-factory-recipe-service/api/recipe/json/:recipeId\n\nHeaders:\n  Authorization: Bearer {token}\n  Content-Type: application/json\n\nParams:\n  recipeId: the ID of the recipe to update\n\nBody:\n  {\n   ... recipe definition (see Recipe Reference Overview above) ...\n  }\n\n\nResponse (success):\n202 Accepted","language":"text"},{"code":"https://vector.geobigdata.io/answer-factory-recipe-service/api/recipe/json/foliage-test\n\nBody:\n{\n  \"id\": \"foliage-test\",\n  \"name\": \"A Foliage Test Recipe\",\n  \"description\": \"Changed my description. Can also make changes to the JSON Object.\",\n  \"recipeType\": \"partitioned-workflow\",\n  \"inputType\": \"seasonal-acquisition\",\n  \"outputType\": \"vector-service\",\n  \"properties\": {\n    \"image_bands\": \"Pan_MS1_MS2\"\n  },\n  \"definition\": {\n    \"name\": \"Foliage test (full workflow)\",\n    \"tasks\": [\n      {\n        \"name\": \"aop\",\n        \"taskType\": \"AOP_Strip_Processor\",\n        \"inputs\": [\n          {\n            \"name\": \"enable_pansharpen\",\n            \"value\": \"false\"\n          },\n          {\n            \"name\": \"enable_dra\",\n            \"value\": \"false\"\n          },\n          {\n            \"name\": \"bands\",\n            \"value\": \"MS\"\n          },\n          {\n            \"name\": \"data\",\n            \"value\": \"{raster_path}\"\n          },\n          {\n            \"name\": \"ortho_epsg\",\n            \"value\": \"UTM\"\n          },\n          {\n            \"name\": \"ortho_interpolation_type\",\n            \"value\": \"Bilinear\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"data\"\n          },\n          {\n            \"name\": \"log\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"AOP_ENVI_HDR\",\n        \"name\": \"hdr\",\n        \"inputs\": [\n          {\n            \"name\": \"image\",\n            \"source\": \"aop:data\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"output_data\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"ENVI_SpectralIndex\",\n        \"name\": \"ndvi\",\n        \"inputs\": [\n          {\n            \"name\": \"index\",\n            \"value\": \"Leaf Area Index\"\n          },\n          {\n            \"name\": \"input_raster\",\n            \"source\": \"hdr:output_data\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"output_raster_uri\"\n          },\n          {\n            \"name\": \"task_meta_data\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"ENVI_ColorSliceClassification\",\n        \"name\": \"range\",\n        \"inputs\": [\n          {\n            \"name\": \"input_raster\",\n            \"source\": \"ndvi:output_raster_uri\"\n          },\n          {\n            \"name\": \"class_ranges\",\n            \"value\": \"[4.51, 10.01]\"\n          },\n          {\n            \"name\": \"class_colors\",\n            \"value\": \"[0, 255, 0]\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"output_raster_uri\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"ENVI_ClassificationSmoothing\",\n        \"name\": \"smoothing\",\n        \"inputs\": [\n          {\n            \"name\": \"input_raster\",\n            \"source\": \"range:output_raster_uri\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"output_raster_uri\"\n          },\n          {\n            \"name\": \"task_meta_data\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"ENVI_ClassificationAggregation\",\n        \"name\": \"aggregation\",\n        \"inputs\": [\n          {\n            \"name\": \"input_raster\",\n            \"source\": \"smoothing:output_raster_uri\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"output_raster_uri\"\n          },\n          {\n            \"name\": \"task_meta_data\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"ENVI_ClassificationToShapefile\",\n        \"name\": \"shapefile\",\n        \"timeout\": 36000,\n        \"inputs\": [\n          {\n            \"name\": \"input_raster\",\n            \"source\": \"aggregation:output_raster_uri\"\n          },\n          {\n            \"name\": \"export_classes\",\n            \"value\": \"4.51 to 10.01\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"output_vector_uri\"\n          },\n          {\n            \"name\": \"task_meta_data\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"simplify-polygon:0.0.9\",\n        \"name\": \"simplify\",\n        \"inputs\": [\n          {\n            \"name\": \"shapefile\",\n            \"source\": \"shapefile:output_vector_uri\"\n          },\n          {\n            \"name\": \"tolerance\",\n            \"value\": \"2.0\"\n          },\n          {\n            \"name\": \"min_area\",\n            \"value\": \"100.0\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"output_shapefile\"\n          }\n        ]\n      },\n      {\n        \"name\": \"reproject\",\n        \"taskType\": \"gdal-cli-multiplex\",\n        \"timeout\": 36000,\n        \"inputs\": [\n          {\n            \"name\": \"data\",\n            \"source\": \"simplify:output_shapefile\"\n          },\n          {\n            \"name\": \"command\",\n            \"value\": \"mkdir -p $outdir/data; ogr2ogr -f \\\"ESRI Shapefile\\\" -a_srs \\\"EPSG:4326\\\" -t_srs \\\"EPSG:4326\\\" $outdir/data/reprojected.shp $indir/data/*.shp\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"data\"\n          }\n        ]\n      },\n      {\n        \"taskType\": \"IngestShpToVectorServices\",\n        \"name\": \"vector\",\n        \"timeout\": 36000,\n        \"impersonation_allowed\": true,\n        \"containerDescriptors\": [ { \"properties\": { \"domain\": \"t2medium\" } } ],\n        \"inputs\": [\n          {\n            \"name\": \"items\",\n            \"source\": \"reproject:data\"\n          },\n          {\n            \"name\": \"index\",\n            \"value\": \"vector-foliage-{ingest_date}\"\n          },\n          {\n            \"name\": \"shapefileMapping\",\n            \"value\": \"vector.crs=EPSG:4326\\nvector.ingestSource=Foliage Detection Testing\\nvector.itemType=Foliage\"\n          }\n        ],\n        \"outputs\": [\n          {\n            \"name\": \"result\"\n          }\n        ]\n      },\n      {\n        \"name\": \"s3_vector\",\n        \"taskType\": \"StageDataToS3\",\n        \"timeout\": 36000,\n        \"containerDescriptors\": [ { \"properties\": { \"domain\": \"t2medium\" } } ],\n        \"inputs\": [\n          {\n            \"name\": \"data\",\n            \"source\": \"vector:result\"\n          },\n          {\n            \"name\": \"destination\",\n            \"value\": \"s3://{vector_ingest_bucket}/{recipe_id}/{run_id}/{task_name}\"\n          }\n        ],\n        \"outputs\": []\n      }\n    ]\n  }\n}","language":"http"}]},"results":{"codes":[]},"settings":"56e2c51cc8b0a40e000aa56b","auth":"required","params":[{"_id":"595cbdfed4bc0f0033d1e4a9","ref":"","in":"path","required":true,"desc":"","default":"Unique identifier of the recipe.","type":"string","name":"recipeId"}],"url":"/answer-factory-recipe-service/api/recipe/json/:recipeId"},"isReference":false,"order":24,"body":"For this version of the recipe update API call, the recipe definition parameter must be a JSON object which the specified recipe type can understand. See [Update a Recipe with JSON String](doc:update-a-recipe-with-json-string) for set up to support using a string for the recipe definition.","excerpt":"Update a recipe with JSON object for recipe definition","slug":"update-a-recipe-with-json-object","type":"endpoint","title":"Update a Recipe with JSON Object"}

putUpdate a Recipe with JSON Object

Update a recipe with JSON object for recipe definition

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

recipeId:
required
stringUnique identifier of the recipe.

Examples


Documentation

For this version of the recipe update API call, the recipe definition parameter must be a JSON object which the specified recipe type can understand. See [Update a Recipe with JSON String](doc:update-a-recipe-with-json-string) for set up to support using a string for the recipe definition.

User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}