{"_id":"5643826f88f3a60d00ac86cb","project":"55faeacad0e22017005b8265","__v":10,"category":{"_id":"5601aee850ee460d0002224c","__v":20,"project":"55faeacad0e22017005b8265","version":"55faeacad0e22017005b8268","pages":["56023786930fe1170074bd2c","561d53a09463520d00cd11ef","561d546d31d9630d001eb5d1","561d54af31d9630d001eb5d3","561d54e56386060d00e0601e","561d554d9463520d00cd11f2","564246059f4ed50d008be1af","5643712a0d9748190079defb","564372751ecf381700343c1e","5643742008894c0d00031ed3","5643747a0d9748190079df01","564375c988f3a60d00ac86b0","56437d0f0d9748190079df13","56437e83f49bfa0d002f560a","56437f7d0d9748190079df15","5643810508894c0d00031ef5","5643826f88f3a60d00ac86cb","564382de88f3a60d00ac86ce","56e07ba14685db1700d94873","56e08c9b903c7a29001d5352"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-22T19:41:28.703Z","from_sync":false,"order":7,"slug":"tasks-and-workflows-guide","title":"Tasks and Workflows Guide"},"parentDoc":null,"user":"55fae9d4825d5f19001fa379","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":32,"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"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"v1","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-11T18:01:19.997Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"https://geobigdata.io/workflows/v1/schemas/TaskDescriptor","language":"text"}]},"method":"get","results":{"codes":[{"code":"{\n  \"definitions\": {\n    \"TaskExtraProperties\": {\n      \"required\": [\n        \"timeout\"\n      ],\n      \"type\": [\n        \"object\",\n        \"null\"\n      ],\n      \"description\": \"Additional properties of the task.\",\n      \"properties\": {\n        \"authorizationRequired\": {\n          \"type\": \"boolean\",\n          \"description\": \"Indicator that the task logic will require GBDX authorization from the running user. If this is true and during workflow invocation 'impersonation_allowed' flag is not set on the task workflow will fail. Defaults to false.\"\n        },\n        \"isPublic\": {\n          \"type\": \"boolean\",\n          \"description\": \"Visibility of the task to other users. Defaults to false.\"\n        },\n        \"timeout\": {\n          \"minimum\": 0,\n          \"type\": \"integer\",\n          \"description\": \"The integer of the default timeout to this task (in seconds). Max: 172,800 (48 hours).\",\n          \"maximum\": 172800\n        }\n      }\n    },\n    \"TaskSequenceDescriptor\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"workflow_schema.json#/definitions/Workflow\"\n        },\n        {\n          \"required\": [\n            \"outputMapping\"\n          ],\n          \"properties\": {\n            \"outputMapping\": {\n              \"minItems\": 0,\n              \"items\": {\n                \"$ref\": \"#/definitions/OutputMapping\"\n              },\n              \"type\": \"array\"\n            }\n          }\n        }\n      ]\n    },\n    \"PortDescriptor\": {\n      \"required\": [\n        \"name\",\n        \"type\"\n      ],\n      \"type\": \"object\",\n      \"properties\": {\n        \"multiplex\": {\n          \"type\": \"boolean\",\n          \"description\": \"Are multiple ports port name as prefix allowed.\"\n        },\n        \"required\": {\n          \"type\": \"boolean\",\n          \"description\": \"Is the port required.  If not required, the system will select a reasonable default value.\"\n        },\n        \"type\": {\n          \"type\": \"string\",\n          \"description\": \"The port type.\"\n        },\n        \"description\": {\n          \"type\": \"string\",\n          \"description\": \"A description of the port.\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"description\": \"The port name.\"\n        }\n      }\n    },\n    \"ContainerDescriptor\": {\n      \"required\": [\n        \"type\",\n        \"properties\"\n      ],\n      \"type\": \"object\",\n      \"properties\": {\n        \"type\": {\n          \"enum\": [\n            \"DOCKER\",\n            \"GPUDOCKER\",\n            \"AMI\",\n            \"TASK_DRIVER\"\n          ],\n          \"type\": \"string\",\n          \"description\": \"The container type.\"\n        },\n        \"command\": {\n          \"type\": \"string\",\n          \"description\": \"The command used to launch the container.\"\n        },\n        \"properties\": {\n          \"required\": [\n            \"image\"\n          ],\n          \"type\": \"object\",\n          \"description\": \"Container descriptor properties\",\n          \"properties\": {\n            \"image\": {\n              \"type\": \"string\",\n              \"description\": \"An image name that uniquely identifies the container within the GBD system.\"\n            },\n            \"domain\": {\n              \"type\": \"string\",\n              \"description\": \"Identifies the worker domain/group/collective under which to run.\"\n            }\n          }\n        }\n      }\n    },\n    \"OutputMapping\": {\n      \"required\": [\n        \"source\",\n        \"name\"\n      ],\n      \"type\": \"object\",\n      \"properties\": {\n        \"source\": {\n          \"minLength\": 1,\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"minLength\": 1,\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"TaskDefinition\": {\n      \"allOf\": [\n        {\n          \"required\": [\n            \"name\",\n            \"version\",\n            \"inputPortDescriptors\"\n          ],\n          \"properties\": {\n            \"name\": {\n              \"pattern\": \"^[a-zA-Z0-9]{1}[a-zA-Z0-9_.-]+[a-zA-Z0-9]{1}$\",\n              \"type\": \"string\",\n              \"description\": \"A name that uniquely identifies the task descriptor.\",\n              \"maxLength\": 128\n            },\n            \"inputPortDescriptors\": {\n              \"minItems\": 1,\n              \"items\": {\n                \"$ref\": \"#/definitions/PortDescriptor\"\n              },\n              \"type\": \"array\",\n              \"description\": \"The input ports for the task.\"\n            },\n            \"version\": {\n              \"pattern\": \"^0\\\\.0\\\\.([1-9][0-9]{0,4})$|^0\\\\.([1-9][0-9]{0,4})\\\\.(0|[1-9][0-9]{0,4})$|^([1-9][0-9]{0,4})\\\\.(0|[1-9][0-9]{0,4})\\\\.(0|[[1-9][0-9]{0,4})$\",\n              \"type\": \"string\",\n              \"description\": \"Version (Major, Minor, Patch) identifier\"\n            },\n            \"outputPortDescriptors\": {\n              \"minItems\": 0,\n              \"items\": {\n                \"$ref\": \"#/definitions/PortDescriptor\"\n              },\n              \"type\": \"array\",\n              \"description\": \"The ports that are output by the task.\"\n            },\n            \"properties\": {\n              \"$ref\": \"#/definitions/TaskExtraProperties\"\n            },\n            \"description\": {\n              \"type\": \"string\",\n              \"description\": \"A human-readable description of the function performed by this task.\"\n            }\n          }\n        },\n        {\n          \"oneOf\": [\n            {\n              \"required\": [\n                \"containerDescriptors\"\n              ],\n              \"properties\": {\n                \"containerDescriptors\": {\n                  \"minItems\": 1,\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ContainerDescriptor\"\n                  },\n                  \"type\": \"array\",\n                  \"description\": \"The containers that are capable of running the task.\",\n                  \"maxItems\": 1\n                }\n              }\n            },\n            {\n              \"required\": [\n                \"taskSequenceDescriptor\"\n              ],\n              \"properties\": {\n                \"taskSequenceDescriptor\": {\n                  \"$ref\": \"#/definitions/TaskSequenceDescriptor\"\n                }\n              }\n            }\n          ]\n        }\n      ]\n    }\n  },\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"type\": \"object\",\n  \"$ref\": \"#/definitions/TaskDefinition\"\n}","language":"json","status":200,"name":""}]},"settings":"5601fdaa1ba3720d00a6b981","auth":"required","params":[],"url":"/workflows/v1/schemas/TaskDescriptor"},"isReference":false,"order":17,"body":"This is an example of a task definition request.\n\nThe workflow system uses JSON schemas to validate user inputs.  Submitted task definitions and submitted workflows must comply with the schemas.  \n\nPlease see the [Task and Workflow Course](doc:task-and-workflow-course) for a complete explanation of the task definition.","excerpt":"Get the Task Definition schema from the Workflow Endpoint.","slug":"get-the-task-definition-schema","type":"endpoint","title":"Task Definition Schema"}

getTask Definition Schema

Get the Task Definition schema from the Workflow Endpoint.

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format


Documentation

This is an example of a task definition request. The workflow system uses JSON schemas to validate user inputs. Submitted task definitions and submitted workflows must comply with the schemas. Please see the [Task and Workflow Course](doc:task-and-workflow-course) for a complete explanation of the task definition.

User Information

Try It Out

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