{"_id":"595cc37478dc10005d3f15e3","project":"55faeacad0e22017005b8265","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":36,"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","59e76ce41938310028037295","5a009de510890d001c2aabfe","5a96f89c89442e002041144b"],"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":16,"slug":"answerfactory-web-application","title":"AnswerFactory Application"},"user":"56267741db1eda0d001c3dbb","__v":4,"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":[{"language":"json","code":"https://vector.geobigdata.io/answer-factory-recipe-service/api/recipe/json/test-workflow-recipe\n\nBody:\n{\n        \"id\": \"test-workflow-recipe\",\n        \"name\": \"Test Workflow Recipe\",\n        \"owner\": \"testuser\",\n        \"description\": \"Updating the recipe, but without deciding version number here.\",\n        \"recipeType\": \"workflow\",\n        \"inputType\": \"vector-service\",\n        \"outputType\": \"vector-service\",\n        \"parameters\": [\n            {\n                \"name\": \"compare_with\",\n                \"type\": \"string\",\n                \"required\": true,\n                \"description\": \"Compare With\",\n                \"allowedValues\": [\n                    \"next most recent\",\n                    \"1 month\",\n                    \"1 year\"\n                ],\n                \"allowMultiple\": false\n            }\n        ],\n        \"prerequisites\": [\n            {\n                \"id\": \"extract-protogen-lulc:1.0.0\",\n                \"aggregator\": \"PAIR_INTERSECTION\",\n                \"operator\": null,\n                \"properties\": {}\n            }\n        ],\n        \"definition\": \"{\\\"tasks\\\":[{\\\"name\\\":\\\"compare\\\",\\\"taskType\\\":\\\"CompareVectors\\\",\\\"timeout\\\":36000,\\\"impersonation_allowed\\\":true,\\\"inputs\\\":[{\\\"name\\\":\\\"host\\\",\\\"value\\\":\\\"{vector_host}\\\"},{\\\"name\\\":\\\"query_a\\\",\\\"value\\\":\\\"{query_string_0}\\\"},{\\\"name\\\":\\\"query_b\\\",\\\"value\\\":\\\"{query_string_1}\\\"},{\\\"name\\\":\\\"index_a\\\",\\\"value\\\":\\\"{query_index_0}\\\"},{\\\"name\\\":\\\"index_b\\\",\\\"value\\\":\\\"{query_index_1}\\\"},{\\\"name\\\":\\\"wkt\\\",\\\"value\\\":\\\"{result_geometry}\\\"},{\\\"name\\\":\\\"group_by_fields\\\",\\\"value\\\":\\\"item_type\\\"},{\\\"name\\\":\\\"min_area\\\",\\\"value\\\":\\\"500\\\"}],\\\"outputs\\\":[{\\\"name\\\":\\\"data\\\"}]},{\\\"name\\\":\\\"vector\\\",\\\"taskType\\\":\\\"IngestShpToVectorServices\\\",\\\"timeout\\\":36000,\\\"impersonation_allowed\\\":true,\\\"containerDescriptors\\\":[{\\\"properties\\\":{\\\"domain\\\":\\\"t2medium\\\"}}],\\\"inputs\\\":[{\\\"name\\\":\\\"items\\\",\\\"source\\\":\\\"compare:data\\\"},{\\\"name\\\":\\\"shapefileMapping\\\",\\\"value\\\":\\\"vector.crs=EPSG:4326\\\\nvector.ingestSource=Test Workflow 2\\\\nitem_type=item_type\\\"}],\\\"outputs\\\":[{\\\"name\\\":\\\"result\\\"}]},{\\\"name\\\":\\\"s3_vector\\\",\\\"taskType\\\":\\\"StageDataToS3\\\",\\\"timeout\\\":36000,\\\"containerDescriptors\\\":[{\\\"properties\\\":{\\\"domain\\\":\\\"t2medium\\\"}}],\\\"inputs\\\":[{\\\"name\\\":\\\"data\\\",\\\"source\\\":\\\"vector:result\\\"},{\\\"name\\\":\\\"destination\\\",\\\"value\\\":\\\"s3://{vector_ingest_bucket}/{recipe_id}/{run_id}/{task_name}\\\"}],\\\"outputs\\\":[]}],\\\"name\\\":\\\"extract\\\"}\"\n    }"},{"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 AnswerFactory Recipe Reference Overview, linked in the docs section below example and results ...\n  }\n\n\nResponse (success):\n202 Accepted","language":"text"}]},"results":{"codes":[{"status":202,"language":"json","code":"{\n    \"id\": \"test-workflow-recipe:2.0.0\",\n    \"version\": \"2.0.0\",\n    \"name\": \"Test Workflow Recipe\",\n    \"owner\": \"testuser\",\n    \"accountId\": null,\n    \"access\": null,\n    \"description\": \"Updating the recipe, but without deciding version number here.\",\n    \"recipeType\": \"workflow\",\n    \"inputType\": \"vector-service\",\n    \"outputType\": \"vector-service\",\n    \"parentRecipeId\": null,\n    \"virtual\": null,\n    \"defaultDayRange\": null,\n    \"parameters\": [\n        {\n            \"name\": \"compare_with\",\n            \"type\": \"string\",\n            \"required\": true,\n            \"description\": \"Compare With\",\n            \"allowedValues\": [\n                \"next most recent\",\n                \"1 month\",\n                \"1 year\"\n            ],\n            \"allowMultiple\": false\n        }\n    ],\n    \"validators\": null,\n    \"prerequisites\": [\n        {\n            \"id\": \"extract-protogen-lulc:1.0.0\",\n            \"aggregator\": \"PAIR_INTERSECTION\",\n            \"operator\": null,\n            \"properties\": {}\n        }\n    ],\n    \"linkedTo\": null,\n    \"properties\": null,\n    \"definition\": \"{\\\"tasks\\\":[{\\\"name\\\":\\\"compare\\\",\\\"taskType\\\":\\\"CompareVectors\\\",\\\"timeout\\\":36000,\\\"impersonation_allowed\\\":true,\\\"inputs\\\":[{\\\"name\\\":\\\"host\\\",\\\"value\\\":\\\"{vector_host}\\\"},{\\\"name\\\":\\\"query_a\\\",\\\"value\\\":\\\"{query_string_0}\\\"},{\\\"name\\\":\\\"query_b\\\",\\\"value\\\":\\\"{query_string_1}\\\"},{\\\"name\\\":\\\"index_a\\\",\\\"value\\\":\\\"{query_index_0}\\\"},{\\\"name\\\":\\\"index_b\\\",\\\"value\\\":\\\"{query_index_1}\\\"},{\\\"name\\\":\\\"wkt\\\",\\\"value\\\":\\\"{result_geometry}\\\"},{\\\"name\\\":\\\"group_by_fields\\\",\\\"value\\\":\\\"item_type\\\"},{\\\"name\\\":\\\"min_area\\\",\\\"value\\\":\\\"500\\\"}],\\\"outputs\\\":[{\\\"name\\\":\\\"data\\\"}]},{\\\"name\\\":\\\"vector\\\",\\\"taskType\\\":\\\"IngestShpToVectorServices\\\",\\\"timeout\\\":36000,\\\"impersonation_allowed\\\":true,\\\"containerDescriptors\\\":[{\\\"properties\\\":{\\\"domain\\\":\\\"t2medium\\\"}}],\\\"inputs\\\":[{\\\"name\\\":\\\"items\\\",\\\"source\\\":\\\"compare:data\\\"},{\\\"name\\\":\\\"shapefileMapping\\\",\\\"value\\\":\\\"vector.crs=EPSG:4326\\\\nvector.ingestSource=Test Workflow 2\\\\nitem_type=item_type\\\"}],\\\"outputs\\\":[{\\\"name\\\":\\\"result\\\"}]},{\\\"name\\\":\\\"s3_vector\\\",\\\"taskType\\\":\\\"StageDataToS3\\\",\\\"timeout\\\":36000,\\\"containerDescriptors\\\":[{\\\"properties\\\":{\\\"domain\\\":\\\"t2medium\\\"}}],\\\"inputs\\\":[{\\\"name\\\":\\\"data\\\",\\\"source\\\":\\\"vector:result\\\"},{\\\"name\\\":\\\"destination\\\",\\\"value\\\":\\\"s3://{vector_ingest_bucket}/{recipe_id}/{run_id}/{task_name}\\\"}],\\\"outputs\\\":[]}],\\\"name\\\":\\\"extract\\\"}\"\n}","name":""}]},"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":25,"body":"Link reference in Example: [AnswerFactory Recipe Reference Overview](doc:answerfactory-recipe-reference-overview)\n\nFor 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.\n\nNote: The entire recipe needs to be included in the body. The difference between this endpoint and the JSON string endpoint is that this endpoint converts the recipe definition parameter to a string, which is useful for workflow recipes. For more details on JSON Object recipe specifications, see [documents section for recipe creation](doc:create-a-recipe-with-json-object).\n\nNote: In most cases, when updating an Extraction (or workflow) recipe, use JSON Object. When updating a Query recipe, use [JSON String](doc:update-a-recipe-with-json-string).","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


Result Format


Documentation

Link reference in Example: [AnswerFactory Recipe Reference Overview](doc:answerfactory-recipe-reference-overview) 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. Note: The entire recipe needs to be included in the body. The difference between this endpoint and the JSON string endpoint is that this endpoint converts the recipe definition parameter to a string, which is useful for workflow recipes. For more details on JSON Object recipe specifications, see [documents section for recipe creation](doc:create-a-recipe-with-json-object). Note: In most cases, when updating an Extraction (or workflow) recipe, use JSON Object. When updating a Query recipe, use [JSON String](doc:update-a-recipe-with-json-string).

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 }}