{"type":"api","title":"Handler to return workflow information using workflow ID","meta":{"id":"/apps/pubhub/media/cisco-xdr-api-docs/f4e065ff5977829c89df289df08411f83205f526/08b61137-18a5-31e0-99cb-97776678702a","info":{"title":"REST API.","version":"1.0.0"},"security":[{"oAuth2":["integration:read","private-intel:read","profile:read","inspect:read","users:read","invite:read","enrich:read","oauth:read","response:read","global-intel:read","ao:read","playbook:read"]}],"x-parser-conf":{"serverConfig":"select","overview":{"markdownPath":"reference/automation/overview.md","uri":"automation-api-guide"},"disableAuthEditing":true,"exampleAsDefault":true,"oAuth2":{"clientId":"client-546e34fc-c6bf-4951-ac69-f6d7987a7814","clientSecret":"MYw4_E_tBdFwUwrX6WFYKVD5LQrG2k7XrJ5J046wWE0s1gAKCxJ8VA","proxyEnabled":false},"meta":{"useProxy":true}},"openapi":"3.0.1","servers":[{"url":"https://automate.us.security.cisco.com/{basePath}","variables":{"basePath":{"default":"api"}}}],"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://visibility.amp.cisco.com/iroh/oauth2/token","scopes":{"telemetry":"Collect application data for analytics","integration:read":"Manage your modules","private-intel:read":"Access Private Intelligence","admin":"Provide admin privileges","cognitive":"Cognitive Integration","profile:read":"Get your profile information","inspect:read":"Extract Observables and data from text","asset":"Access and modify your assets","event":"Read IROH Events","feedback":"Submit Customer Feedback","sse":"SSE Integration. Manage your Devices.","registry":"Manage registry entries","users:read":"Manage users of your organization","investigation":"Perform threat analysis investigation","invite:read":"Invite users into your organization","casebook":"Access and modify your casebooks","playbook":"Access and modify your playbooks","orbital":"Orbital Integration.","enrich:read":"Query your configured modules for threat intelligence","oauth:read":"Manage OAuth2 Clients","vault":"Grants access to Module Vaults","response:read":"List and execute response actions using configured modules","notification":"Receive notifications from integrations","global-intel:read":"Access AMP Global Intelligence","webhook":"Manage your Webhooks","ao:read":"AO Integration."}}}}}},"spec":{"tags":["Workflows"],"summary":"Handler to return workflow information using workflow ID.","description":"Allowed Role(s): admin, user, sat\nAllowed User(s): Who have atleast VIEW permission to given workflow","operationId":"getWorkflowById","parameters":[{"name":"workflow_id","in":"path","description":"This represents the identifier of the workflow, which can be either a ksuid or a unique name.","required":true,"schema":{"type":"string","x-go-name":"WorkflowID"},"x-go-name":"WorkflowID"}],"responses":{"200":{"description":"A WorkflowDefinitonResponse model\n\n# This is used for returning a response of Workflow as a body","content":{"application/json":{"schema":{"title":"WorkflowDefinitionGetResponse ...","type":"object","properties":{"actions":{"type":"array","items":{"title":"ActionDefinitionGetAllPropsResponse ...","type":"object","properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/ActionDefinitionGetAllPropsResponse","$$ref":"#/components/schemas/ActionDefinitionGetAllPropsResponse"},"x-go-name":"Actions"},"adapter_id":{"type":"string","x-go-name":"AdapterID"},"base_type":{"type":"string","x-go-name":"BaseType"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/ActionDefinitionGetAllPropsResponse","$$ref":"#/components/schemas/ActionDefinitionGetAllPropsResponse"},"x-go-name":"Branches"},"id":{"type":"string","x-go-name":"DefinitionID"},"invalid_properties":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"InvalidProperties"},"name":{"type":"string","x-go-name":"Name"},"output_schema":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"OutputSchema"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"Properties"},"schema_id":{"type":"string","x-go-name":"ViewSchemaID"},"skip_execution":{"type":"boolean","x-go-name":"SkipExecution"},"status":{"title":"Status ...","type":"object","properties":{"details":{"type":"object","properties":{"code":{"type":"string","x-go-name":"Code"},"description":{"type":"string","x-go-name":"Description"},"message":{"type":"string","x-go-name":"Message"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/StatusDetails"},"prev_state":{"type":"string","description":"DefinitionState","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/State"},"state":{"type":"string","description":"DefinitionState","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/State"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/Status"},"subworkflow_valid":{"type":"boolean","x-go-name":"SubWorkflowValid"},"title":{"type":"string","x-go-name":"Title"},"type":{"type":"string","x-go-name":"Type"},"unique_name":{"type":"string","x-go-name":"UniqueName"},"valid":{"type":"boolean","x-go-name":"Valid"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models","$$ref":"#/components/schemas/ActionDefinitionGetAllPropsResponse"},"x-go-name":"Actions"},"base_type":{"type":"string","x-go-name":"BaseType"},"categories":{"type":"array","items":{"type":"string"},"x-go-name":"Categories"},"created_by":{"type":"string","x-go-name":"CreatedBy"},"created_on":{"type":"string","format":"date-time","x-go-name":"CreatedOn"},"description":{"type":"string","x-go-name":"Description"},"dynamic_map":{"title":"DynamicMap will have two individual map\nActionVariableMap will look like following:\n\"action_variable_map\": {\n\"\u003cactionID\u003e\": {\n\"jsonpath_queries_1\": {\n\"type\": \"array\",\n\"output_variable\":{\n\"script_query_name\":{\n\"name\": \"script_query_name\",\n\"type\":\"string\"\n},\n\"script_query_name_1\":{\n\"name\": \"script_query_name_1\",\n\"type\":\"string\"\n}\n}\n}\n\"jsonpath_queries_2\": {\n\"type\": \"object\",\n\"output_variable\":{\n\"query_name\":{\n\"name\": \"query_name\",\n\"type\":\"string\"\n}\n}\n}\n}\n}\nAction output table is for orchestrator to keep track of dynamic created table and table type\nit will look like following:\n\"action_output_table\": {\n\"\u003caction_definition_id\u003e\": {\n\"\u003caction_dynamic_property_1\u003e\": {\n\"table_id\": \"\",\n\"table_type_id\": \"\"\n},\n\"\u003caction_dynamic_property_2\u003e\": {\n\"table_id\": \"\",\n\"table_type_id\": \"\"\n}\n}\n}","type":"object","properties":{"action_output_table":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"title":"ActionTableInfo ..","type":"object","properties":{"table_id":{"type":"string","x-go-name":"TableID"},"table_obj_type":{"title":"LHObjType generated on 2024-06-14T11:01:04+05:30. DO NOT EDIT.","type":"string","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/mdb-maps/entity","$$ref":"#/components/schemas/LHObjType"},"table_type_id":{"type":"string","x-go-name":"TableTypeID"},"table_type_obj_type":{"title":"LHObjType generated on 2024-06-14T11:01:04+05:30. DO NOT EDIT.","type":"string","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/mdb-maps/entity","$$ref":"#/components/schemas/LHObjType"},"variable_id":{"type":"string","x-go-name":"VariableID"},"variable_scope":{"type":"string","x-go-name":"VariableScope"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/ActionTableInfo"}},"description":"Action output table will be used for workflow instance\nDo not initialize for workflow definition","x-go-name":"ActionOutputTable"},"action_variable_map":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"title":"ActionOutputVariable ..","type":"object","properties":{"item_type":{"type":"string","x-go-name":"ItemType"},"output_variable":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OutputInfo"},"x-go-name":"Output"},"type":{"type":"string","x-go-name":"Type"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/ActionOutputVariable"}},"x-go-name":"ActionVariableMap"},"column_map":{"type":"object","additionalProperties":{"title":"ColumnMapInfo will be one entry in column map","type":"object","properties":{"columns":{"type":"array","items":{"title":"ColumnData ..","type":"object","properties":{"name":{"type":"string","x-go-name":"Name"},"type":{"type":"string","x-go-name":"Type"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/ColumnData"},"x-go-name":"Columns"},"parent_action_ids":{"type":"object","additionalProperties":{"type":"string"},"x-go-name":"ParentMap"},"persist_output_as_table":{"type":"boolean","x-go-name":"PersistOutput"},"table_type_columns":{"type":"object","additionalProperties":{"type":"array","items":{"title":"ColumnData ..","type":"object","properties":{"name":{"type":"string","x-go-name":"Name"},"type":{"type":"string","x-go-name":"Type"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/ColumnData"}},"x-go-name":"TblTypeColumns"},"table_type_id":{"type":"string","x-go-name":"TableTypeID"}},"description":"{\n\"table_type_id\": \"16bsMd7aS2mqII9n5bIe8EGIl39\",\n\"table_type_columns\": {\n\"\u003creferenced_table_type_id\u003e\": [\n{\n\"name\": \"id\",\n\"type\": \"number\"\n},\n{\n\"name\": \"name\",\n\"type\": \"string\"\n}\n]\n},\n\"parent_action_ids\": {\n\"\u003cparent_action_id/reference workflow/global var id\u003e\" : \"\u003creferenced_table_type_id\u003e\"\n},\n\"columns\": [\n{\n\"name\": \"id\",\n\"type\": \"number\"\n},\n{\n\"name\": \"name\",\n\"type\": \"string\"\n}\n]\n}","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/ColumnMapInfo"},"x-go-name":"ColumnMap"}},"description":"DynamicMap ..","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/DynamicMap"},"id":{"type":"string","x-go-name":"DefinitionID"},"invalid_properties":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"InvalidProperties"},"metadata":{"type":"object","properties":{"coa":{"title":"WorkflowMetaData ...","required":["observable_types"],"type":"object","properties":{"actuator":{"type":"string","description":"Actuator.\nin: body","x-go-name":"Actuator"},"observable_types":{"type":"array","description":"list of observable types to get for.\nin: body","items":{"type":"string"},"x-go-name":"ObservableTypes"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/CourseOfAction"},"flags":{"type":"array","items":{"type":"string"},"x-go-name":"Flags"},"git_info":{"type":"object","properties":{"commit_hash":{"type":"string","x-go-name":"CommitHash"},"commit_message":{"type":"string","x-go-name":"CommitMessage"},"commited_by":{"type":"string","x-go-name":"CommitedBy"},"commited_on":{"type":"string","format":"date-time","x-go-name":"CommitedOn"},"file_name":{"type":"string","x-go-name":"FileName"},"target_id":{"type":"string","x-go-name":"TargetID"}},"description":"nolint: misspell\nGitInfo maintains information about the last Git Import","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/GitInfo"},"lock":{"type":"object","properties":{"locked":{"type":"boolean","x-go-name":"Locked"},"locked_by":{"type":"string","x-go-name":"LockedBy"},"message":{"type":"string","x-go-name":"Message"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/WorkflowLock"}},"description":"WorkflowMetadata maintains miscellaneous metadata for the workflow","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/WorkflowMetadata"},"name":{"type":"string","x-go-name":"Name"},"owner":{"type":"string","x-go-name":"Owner"},"permissions":{"type":"array","items":{"type":"string"},"x-go-name":"Permissions"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"Properties"},"schema_id":{"type":"string","x-go-name":"ViewSchemaID"},"started_on":{"type":"string","format":"date-time","x-go-name":"LastInstStartedOn"},"status":{"title":"Status ...","type":"object","properties":{"details":{"type":"object","properties":{"code":{"type":"string","x-go-name":"Code"},"description":{"type":"string","x-go-name":"Description"},"message":{"type":"string","x-go-name":"Message"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/StatusDetails"},"prev_state":{"type":"string","description":"DefinitionState","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/State"},"state":{"type":"string","description":"DefinitionState","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/State"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models","$$ref":"#/components/schemas/Status"},"template_type":{"type":"string","x-go-name":"TemplateType"},"title":{"type":"string","x-go-name":"Title"},"type":{"type":"string","x-go-name":"Type"},"unique_name":{"type":"string","x-go-name":"UniqueName"},"updated_by":{"type":"string","x-go-name":"UpdatedBy"},"updated_on":{"type":"string","format":"date-time","x-go-name":"UpdatedOn"},"valid":{"type":"boolean","x-go-name":"Valid"},"variables":{"type":"array","items":{"title":"Variable ...","required":["schema_id"],"type":"object","properties":{"base_type":{"type":"string","x-go-name":"BaseType"},"created_by":{"type":"string","x-go-name":"CreatedBy"},"created_on":{"type":"string","format":"date-time","x-go-name":"CreatedOn"},"id":{"type":"string","description":"ID of variable","x-go-name":"VariableID"},"object_type":{"title":"LHObjType generated on 2024-06-14T11:01:04+05:30. DO NOT EDIT.","type":"string","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/mdb-maps/entity","$$ref":"#/components/schemas/LHObjType"},"owner":{"type":"string","x-go-name":"Owner"},"properties":{"title":"VariableContent ...","type":"object","properties":{"description":{"type":"string","description":"Description of variable","x-go-name":"Description"},"display_on_wizard":{"type":"boolean","description":"Should the variable be shown on wizard\nUsed in input scope variables, if it is true, then variable is displayed on wizard","x-go-name":"DisplayOnWizard"},"is_invisible":{"type":"boolean","x-go-name":"IsInvisible"},"is_required":{"type":"boolean","description":"Is the variable Required\nUsed in input string and secure string variable, if it is true, then string can't be emptly","x-go-name":"IsRequired"},"name":{"type":"string","description":"Name of variable","x-go-name":"Name"},"scope":{"type":"string","description":"Scope of variable. Scope can be 'input', 'global', 'local', 'static' or 'workflow'","x-go-name":"Scope"},"type":{"type":"string","description":"Type of variable. Type can be 'datatype.boolean', 'datatype.string', 'datatype.number' or 'datatype.table'","x-go-name":"Type"},"value":{"type":"object","properties":{},"description":"Value of variable. Value can be a string, boolean, number or array","x-go-name":"Value"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models","$$ref":"#/components/schemas/VariableContent"},"schema_id":{"type":"string","description":"View schema ID of variable, the value can be TargetTypeID for Table variables","x-go-name":"ViewSchemaID"},"table_id":{"type":"string","description":"ID of table","x-go-name":"TableID"},"type":{"type":"string","x-go-name":"Type"},"unique_name":{"type":"string","x-go-name":"UniqueName"},"updated_by":{"type":"string","x-go-name":"UpdatedBy"},"updated_on":{"type":"string","format":"date-time","x-go-name":"UpdatedOn"},"variable_def_id":{"type":"string","description":"ID of variable","x-go-name":"VariableDefID"},"version":{"type":"string","x-go-name":"Version"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models","$$ref":"#/components/schemas/Variable"},"x-go-name":"WFVariables"},"version":{"type":"string","x-go-name":"Version"},"workflow_valid":{"type":"boolean","x-go-name":"WorkflowValid"}},"x-go-name":"WorkflowDefinitionGetResponse","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models","$$ref":"#/components/schemas/workflowDefinitionGetResponse"}}}},"400":{"description":"A Error is a swagger response to represent error","headers":{"code":{"schema":{"type":"integer","format":"int64"}},"description":{"schema":{"type":"string"}},"message":{"schema":{"type":"string"}}},"content":{}},"403":{"description":"A Error is a swagger response to represent error","headers":{"code":{"schema":{"type":"integer","format":"int64"}},"description":{"schema":{"type":"string"}},"message":{"schema":{"type":"string"}}},"content":{}},"404":{"description":"A Error is a swagger response to represent error","headers":{"code":{"schema":{"type":"integer","format":"int64"}},"description":{"schema":{"type":"string"}},"message":{"schema":{"type":"string"}}},"content":{}},"500":{"description":"A Error is a swagger response to represent error","headers":{"code":{"schema":{"type":"integer","format":"int64"}},"description":{"schema":{"type":"string"}},"message":{"schema":{"type":"string"}}},"content":{}}},"__originalOperationId":"getWorkflowById","security":[{"oAuth2":["integration:read","private-intel:read","profile:read","inspect:read","users:read","invite:read","enrich:read","oauth:read","response:read","global-intel:read","ao:read","playbook:read"]}],"method":"get","path":"/v1/workflows/{workflow_id}"}}