{"_id":"595cc18078dc10005d3f15c1","project":"55faeacad0e22017005b8265","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":35,"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"],"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":15,"slug":"answerfactory-web-application","title":"AnswerFactory Application"},"user":"56267741db1eda0d001c3dbb","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-07-05T10:37:52.980Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"code":"Request:\nPOST /answer-factory-recipe-service/api/recipe/json\n\nHeaders:\n  Authorization: Bearer {token}\n  Content-Type: application/json\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\n\nBody:\n{\n  \"id\": \"foliage-test\",\n  \"name\": \"A Foliage Test Recipe\",\n  \"description\": \"Detects trees\",\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":[{"name":"","code":"","language":"json","status":202}]},"settings":"56e2c51cc8b0a40e000aa56b","auth":"required","params":[],"url":"/answer-factory-recipe-service/api/recipe/json"},"isReference":false,"order":18,"body":"For this version of the recipe creation API call, the recipe definition parameter must be a JSON object which the specified recipe type can understand.  See [Create a Recipe with JSON String](doc:create-a-recipe-with-json-string) for set up to support using a JSON string for the recipe definition.\n\nBelow are the currently supported combinations of recipeType, inputType, and outputType:\n\n\n| recipeType | inputType | outputType |\n| --- | --- | --- |\n| workflow | none | vector-service |\n| workflow | acquisition | vector-service |\n| workflow | acquisitions | vector-service |\n| workflow | vector-service | vector-service |\n| partitioned-workflow | acquisition | vector-service |\n| workflow | seasonal-acquisition | vector-service |\n| partitioned-workflow | seasonal-acquisition | vector-service |\n| workflow | acquisitions | esri-service |\n| workflow | esri-service | esri-service |\n| vector-query | vector-service | vector-service |\n| vector-aggregation | vector-service | vector-service |\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. Note: In most cases, when creating an Extraction (or workflow) recipe, use JSON Object. When creating a Query recipe, use [JSON String](doc:create-a-recipe-with-json-string).\n\n#Substitution Variables#\n\nGBDX Workflows must be appropriately templatized so that AnswerFactory knows how to apply inputs and outputs to the recipe.  The following curly-bracket substitutions are available to be used in the workflow and are automatically replaced with their specific values when executed:\n\n**When recipeType=workflow** \n `{user}` - GBDX username of project creator\n    `{project_id}` - unique identifier for project\n    `{project_name}` - identifier specified by user for project\n    `{recipe_id}` - unique identifier for project\n    `{recipe_name}` - human readable identifier for recipe\n    `{project_geometry}` - project AOI in WKT format\n    `{task_name}` - name of workflow task this substitution variable is contained in; not to be confused with task type\n\n**When recipeType=workflow AND outputType=vector-service** \n`{run_id}` - unique identifier for this execution of a recipe for a given project; part of the \n    Vector Service query string to retrieve the output vectors\n    `{vector_host}` - Vector Service host, for example vector.geobigdata.io if production, \n    devvector.geobigdata.io if dev\n    `{vector_ingest_bucket}` - name of the bucket Vector Services uses for ingest\n    `{ingest_date}` - time of workflow submission in yyyyMMdd format\n    `{query_index}` - name of Vector Service index the output vectors \n    will be ingested to\n\n**When recipeType=workflow AND inputType=acquisition/acquisitions** \n`{raster_path}` - S3 location of input acquisition\n    `{raster_path_i}` - S3 location of input acquisition i, where i is 0,1,2...\n    `{catalog_id}` - catalog identifier of input acquisition\n    `{catalog_id_i}` - catalog identifier of input acquisition i, where i is 0,1,2...\n    `{acquisition_id}` - acquisition ID of input acquisition\n    `{acquisition_id_i}` - acquisition ID of input acquisition i, where i is 0,1,2...\n    `{acquisition_date}` - timestamp of input acquisition\n    `{acquisition_date_i}` - timestamp of input acquisition i, where i is 0,1,2...\n    `{acquisition_bands}` - bands field (Pan, Pan_MS1, Pan_MS1_MS2, etc) of input acquisition\n    `{acquisition_bands_i}` - bands field (Pan, Pan_MS1, Pan_MS1_MS2, etc) of input acquisition i, where i is 0,1,2...\n    `{acquisition_geometry}` - footprint in WKT format of input acquisition\n    `{acquisition_geometry_i}` - footprint in WKT format of input acquisition i, where i is 0,1,2...\n    `{acquisition_index_i}` - zero based position of input acquisition i in list of input acquistions, where i is 0,1,2...; equal to 0,1,2...\n    `{acquisition_intersection}` - intersection of all input acquisitions' geometries in WKT format\n    `{project_acquisition_intersection}` - intersection of project AOI and intersection of all input acquisitions' geometries in WKT format\n    `{model_location_s3}` - S3 location of best model in Model Catalog, if applicable\n\n**When recipeType=workflow AND inputType=vector-service AND outputType=vector-service**\n`{query_string}` - Vector Service query of input\n    `{query_string_i}` - Vector Service query of input i, where i is 0,1,2...\n    `{query_index}` - Vector Service index of input\n    `{query_index_i}` - Vector Service index of input i, where i is 0,1,2...\n    `{result_geometry}` - preceding recipe result geometry in WKT format  \n\n#User-Defined Substitution Variables#\n\nAdditional recipe-specific substitution variables may be used to pass additional information into the workflow tasks via the recipe \"parameters\" section.\n\nExample of recipe with parameters: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"extract-roads\\\",\\n  \\\"name\\\": \\\"Extract Roads\\\",\\n  \\\"parameters\\\": [\\n    {\\n      \\\"name\\\": \\\"road_type\\\",\\n      \\\"allowedValues\\\": [\\n        \\\"Dirt Urban\\\",\\n        \\\"Suburban\\\",\\n        \\\"Trails\\\"\\n      ],\\n      \\\"allowMultiple\\\": true\\n    }\\n  ]\\n  ...\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nAt a minimum the parameter name is required. This is what is shown in the UI to the user and specifiable via REST API call. The substitution variable is based on the name, in this case it'll be \"{road_type}\". \n\nallowedValues is optional and restricts the the user to the enumerated values. In the UI this is shown as a dropdown list. \n\nallowMultiple gives the user the option to pick more than one value. In that case AnswerFactory would handle adding additional tasks for each value selected.\n\n#Recipe Properties#\n\nProperties contains the specific key/value pairs for a particular recipe type, for example `\"acquisition_types\":\"LandsatAcquisition\"` is a property specific to recipes that take acquisitions as input.\n\nNote these are also used as substitution variables, so using the earlier example, \"{acquisition_types}\" would get replaced with \"LandsatAcquisition\". \n\n**When inputType=acquisition/acquisitions**\n    `num_acquisitions` - the number of acquisitions that this recipe requires as input specified as an integer or a range, for example 1, 2, 1-7 are all valid; defaults to 1\n    `acquisition_types` - comma delimited list that filters input acquisitions by type; possible values: DigitalGlobeAcquisition, LandsatAcquisition, SENTINEL2; defaults to DigitalGlobeAcquisition\n    `image_bands` - comma delimited list that filters input acquisitions by bands field; possible values are Pan, Pan_MS1, Pan_MS1_MS2; defaults to allow any number of bands\n    `sensors` - comma delimited list that filters input acquisitions by sensors, for example WORLDVIEW03_VNIR, GEOEYE01\n\n**When recipeType=workflow AND inputType=acquisition/acquisitions**\n    `order_type` - what level of acquisition to order; possible values: 1B, OR2A; defaults to 1B\n    `crop_to_project` - true or false; if true crops input acquisitions to project AOI; defaults to true\n    `model_type` - type of model registered in Model Catalog to retrieve for input acquisitions\n\n**When recipeType=partitioned-workflow AND inputType=acquisition/acquisitions**    \n    `partition_size` - max size in square kilometers of each chunk of the acquistition to process in a single task; defaults to 100\n\n**When outputType=vector-service**\n    `calculate_vector_metrics` - true or false; if true calculations over resulting vectors are made like area, length, etc; defaults to true\n    `summary_sum_field` - name of Vector Service item field used to calculate sum\n    `additional_display_fields` - comma delimited list of names of Vector Service item fields to show in UI vector table (double clicking a cell)\n    `hover_fields` - comma delimited list of name of Vector Service item fields to show in UI when hovering over vector on map; format is NameToDisplayInUI:NameOfVectorServiceField\n\n**When recipeType=vector-query AND inputType=vector-service AND outputType=vector-service**\n    `query_index` - Vector Service index to query; defaults to all vector indexes\n\n**When recipeType=vector-aggregation AND inputType=vector-service AND outputType=vector-service**\n    `query_index` - Vector Service index to aggregate; defaults to all vector indexes\n\n#Automatic Workflow Expansion#\n\nAnswerFactory automatically analyzes and expands the supplied workflow definition to enable the workflow to perform AnswerFactory specific tasks, such as ingesting to VectorServices or partitioning an image into multiple chunks for parallelized processing.  Below is a list of such workflow expansions:\n\n**When recipeType=workflow**\n    When multiple values are selected by the user for a recipe config parameter with allowMultiple=true: a corresponding number of algorithm tasks will be added: one for each selected value.\n\n**When recipeType=workflow AND outputType=vector-service**\n    Existing `IngestToVectorServices` tasks will be updated: the optional additionalFields port will be populated with ingest attributes for run_id_raw, project_id_raw, recipe_id_raw appended; the callbackUrl port will be set to notify AnswerFactory when the vector ingest is complete; the index port will be defaulted to `\"vector-workflow-{ingest_date}\"`\n\n**When recipeType=workflow AND inputType=acquisition/acquisitions**\n    If an input acquisition is not available on GBDX then an Auto_Ordering task (or Auto_Ordering_OR2A task depending on the `order_type` property) will be added before any task with `{raster_path}` or `{raster_path_i}` substitutions.\n    If the `crop_enabled` property is not set or is set to `True` then a `CropGeotiff` task is added after each task containing `{raster_path}` or `{raster_path_i}` to crop to the project AOI if there are no existing CropGeotiff tasks. If there are exitsing CropGeotiff tasks then their `wkt` input ports will be set to the project AOI.\n\n**When recipeType=partitioned-workflow AND inputType=acquisition/acquisitions**\n    If the intersection of acquisition and project AOI is greater than `partition_size` property square kilometers, then additional `CropGeotiff` tasks are added as well as the corresponding chain of subsequent tasks to process the piece of the input acquisition that the CropGeotiff outputs.","excerpt":"Create a recipe with JSON object for recipe definition","slug":"create-a-recipe-with-json-object","type":"endpoint","title":"Create a Recipe with JSON Object"}

postCreate a Recipe with JSON Object

Create a recipe with JSON object for recipe definition

Definition

{{ api_url }}{{ page_api_url }}

Examples


Documentation

For this version of the recipe creation API call, the recipe definition parameter must be a JSON object which the specified recipe type can understand. See [Create a Recipe with JSON String](doc:create-a-recipe-with-json-string) for set up to support using a JSON string for the recipe definition. Below are the currently supported combinations of recipeType, inputType, and outputType: | recipeType | inputType | outputType | | --- | --- | --- | | workflow | none | vector-service | | workflow | acquisition | vector-service | | workflow | acquisitions | vector-service | | workflow | vector-service | vector-service | | partitioned-workflow | acquisition | vector-service | | workflow | seasonal-acquisition | vector-service | | partitioned-workflow | seasonal-acquisition | vector-service | | workflow | acquisitions | esri-service | | workflow | esri-service | esri-service | | vector-query | vector-service | vector-service | | vector-aggregation | vector-service | vector-service | 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. Note: In most cases, when creating an Extraction (or workflow) recipe, use JSON Object. When creating a Query recipe, use [JSON String](doc:create-a-recipe-with-json-string). #Substitution Variables# GBDX Workflows must be appropriately templatized so that AnswerFactory knows how to apply inputs and outputs to the recipe. The following curly-bracket substitutions are available to be used in the workflow and are automatically replaced with their specific values when executed: **When recipeType=workflow** `{user}` - GBDX username of project creator `{project_id}` - unique identifier for project `{project_name}` - identifier specified by user for project `{recipe_id}` - unique identifier for project `{recipe_name}` - human readable identifier for recipe `{project_geometry}` - project AOI in WKT format `{task_name}` - name of workflow task this substitution variable is contained in; not to be confused with task type **When recipeType=workflow AND outputType=vector-service** `{run_id}` - unique identifier for this execution of a recipe for a given project; part of the Vector Service query string to retrieve the output vectors `{vector_host}` - Vector Service host, for example vector.geobigdata.io if production, devvector.geobigdata.io if dev `{vector_ingest_bucket}` - name of the bucket Vector Services uses for ingest `{ingest_date}` - time of workflow submission in yyyyMMdd format `{query_index}` - name of Vector Service index the output vectors will be ingested to **When recipeType=workflow AND inputType=acquisition/acquisitions** `{raster_path}` - S3 location of input acquisition `{raster_path_i}` - S3 location of input acquisition i, where i is 0,1,2... `{catalog_id}` - catalog identifier of input acquisition `{catalog_id_i}` - catalog identifier of input acquisition i, where i is 0,1,2... `{acquisition_id}` - acquisition ID of input acquisition `{acquisition_id_i}` - acquisition ID of input acquisition i, where i is 0,1,2... `{acquisition_date}` - timestamp of input acquisition `{acquisition_date_i}` - timestamp of input acquisition i, where i is 0,1,2... `{acquisition_bands}` - bands field (Pan, Pan_MS1, Pan_MS1_MS2, etc) of input acquisition `{acquisition_bands_i}` - bands field (Pan, Pan_MS1, Pan_MS1_MS2, etc) of input acquisition i, where i is 0,1,2... `{acquisition_geometry}` - footprint in WKT format of input acquisition `{acquisition_geometry_i}` - footprint in WKT format of input acquisition i, where i is 0,1,2... `{acquisition_index_i}` - zero based position of input acquisition i in list of input acquistions, where i is 0,1,2...; equal to 0,1,2... `{acquisition_intersection}` - intersection of all input acquisitions' geometries in WKT format `{project_acquisition_intersection}` - intersection of project AOI and intersection of all input acquisitions' geometries in WKT format `{model_location_s3}` - S3 location of best model in Model Catalog, if applicable **When recipeType=workflow AND inputType=vector-service AND outputType=vector-service** `{query_string}` - Vector Service query of input `{query_string_i}` - Vector Service query of input i, where i is 0,1,2... `{query_index}` - Vector Service index of input `{query_index_i}` - Vector Service index of input i, where i is 0,1,2... `{result_geometry}` - preceding recipe result geometry in WKT format #User-Defined Substitution Variables# Additional recipe-specific substitution variables may be used to pass additional information into the workflow tasks via the recipe "parameters" section. Example of recipe with parameters: [block:code] { "codes": [ { "code": "{\n \"id\": \"extract-roads\",\n \"name\": \"Extract Roads\",\n \"parameters\": [\n {\n \"name\": \"road_type\",\n \"allowedValues\": [\n \"Dirt Urban\",\n \"Suburban\",\n \"Trails\"\n ],\n \"allowMultiple\": true\n }\n ]\n ...\n}", "language": "text" } ] } [/block] At a minimum the parameter name is required. This is what is shown in the UI to the user and specifiable via REST API call. The substitution variable is based on the name, in this case it'll be "{road_type}". allowedValues is optional and restricts the the user to the enumerated values. In the UI this is shown as a dropdown list. allowMultiple gives the user the option to pick more than one value. In that case AnswerFactory would handle adding additional tasks for each value selected. #Recipe Properties# Properties contains the specific key/value pairs for a particular recipe type, for example `"acquisition_types":"LandsatAcquisition"` is a property specific to recipes that take acquisitions as input. Note these are also used as substitution variables, so using the earlier example, "{acquisition_types}" would get replaced with "LandsatAcquisition". **When inputType=acquisition/acquisitions** `num_acquisitions` - the number of acquisitions that this recipe requires as input specified as an integer or a range, for example 1, 2, 1-7 are all valid; defaults to 1 `acquisition_types` - comma delimited list that filters input acquisitions by type; possible values: DigitalGlobeAcquisition, LandsatAcquisition, SENTINEL2; defaults to DigitalGlobeAcquisition `image_bands` - comma delimited list that filters input acquisitions by bands field; possible values are Pan, Pan_MS1, Pan_MS1_MS2; defaults to allow any number of bands `sensors` - comma delimited list that filters input acquisitions by sensors, for example WORLDVIEW03_VNIR, GEOEYE01 **When recipeType=workflow AND inputType=acquisition/acquisitions** `order_type` - what level of acquisition to order; possible values: 1B, OR2A; defaults to 1B `crop_to_project` - true or false; if true crops input acquisitions to project AOI; defaults to true `model_type` - type of model registered in Model Catalog to retrieve for input acquisitions **When recipeType=partitioned-workflow AND inputType=acquisition/acquisitions** `partition_size` - max size in square kilometers of each chunk of the acquistition to process in a single task; defaults to 100 **When outputType=vector-service** `calculate_vector_metrics` - true or false; if true calculations over resulting vectors are made like area, length, etc; defaults to true `summary_sum_field` - name of Vector Service item field used to calculate sum `additional_display_fields` - comma delimited list of names of Vector Service item fields to show in UI vector table (double clicking a cell) `hover_fields` - comma delimited list of name of Vector Service item fields to show in UI when hovering over vector on map; format is NameToDisplayInUI:NameOfVectorServiceField **When recipeType=vector-query AND inputType=vector-service AND outputType=vector-service** `query_index` - Vector Service index to query; defaults to all vector indexes **When recipeType=vector-aggregation AND inputType=vector-service AND outputType=vector-service** `query_index` - Vector Service index to aggregate; defaults to all vector indexes #Automatic Workflow Expansion# AnswerFactory automatically analyzes and expands the supplied workflow definition to enable the workflow to perform AnswerFactory specific tasks, such as ingesting to VectorServices or partitioning an image into multiple chunks for parallelized processing. Below is a list of such workflow expansions: **When recipeType=workflow** When multiple values are selected by the user for a recipe config parameter with allowMultiple=true: a corresponding number of algorithm tasks will be added: one for each selected value. **When recipeType=workflow AND outputType=vector-service** Existing `IngestToVectorServices` tasks will be updated: the optional additionalFields port will be populated with ingest attributes for run_id_raw, project_id_raw, recipe_id_raw appended; the callbackUrl port will be set to notify AnswerFactory when the vector ingest is complete; the index port will be defaulted to `"vector-workflow-{ingest_date}"` **When recipeType=workflow AND inputType=acquisition/acquisitions** If an input acquisition is not available on GBDX then an Auto_Ordering task (or Auto_Ordering_OR2A task depending on the `order_type` property) will be added before any task with `{raster_path}` or `{raster_path_i}` substitutions. If the `crop_enabled` property is not set or is set to `True` then a `CropGeotiff` task is added after each task containing `{raster_path}` or `{raster_path_i}` to crop to the project AOI if there are no existing CropGeotiff tasks. If there are exitsing CropGeotiff tasks then their `wkt` input ports will be set to the project AOI. **When recipeType=partitioned-workflow AND inputType=acquisition/acquisitions** If the intersection of acquisition and project AOI is greater than `partition_size` property square kilometers, then additional `CropGeotiff` tasks are added as well as the corresponding chain of subsequent tasks to process the piece of the input acquisition that the CropGeotiff outputs.

User Information

Try It Out


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