{"type":"api","title":"Handler returning workflow instance information","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":["WorkflowInstances"],"summary":"Handler returning workflow instance information.","description":"Allowed Role(s): admin, user, sat\nAllowed User(s): Who have atleast VIEW permission to given workflow","operationId":"getWFInstanceById","parameters":[{"name":"wf_instance_id","in":"path","description":"The Id of worklfow instance","required":true,"schema":{"type":"string","x-go-name":"WFInstanceID"},"x-go-name":"WFInstanceID"},{"name":"detailed","in":"query","description":"Whether to return all block instances for an instance if it has blocks\nIf false, will only return first block instance and a block count","schema":{"type":"boolean","x-go-name":"Detailed"},"x-go-name":"Detailed"}],"responses":{"200":{"description":"An WorkflowInstanceResponse response model\n\n# This is used for returning a response of workflow instance as body","content":{"application/json":{"schema":{"title":"WorkflowInstanceGetResponse ...","type":"object","properties":{"actions":{"type":"array","items":{"title":"ActionInstanceGetAllResponse ...","type":"object","properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/ActionInstanceGetAllResponse","$$ref":"#/components/schemas/ActionInstanceGetAllResponse"},"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/ActionInstanceGetAllResponse","$$ref":"#/components/schemas/ActionInstanceGetAllResponse"},"x-go-name":"Branches"},"blocks_count":{"type":"integer","format":"int64","x-go-name":"BranchesCount"},"definition_id":{"type":"string","x-go-name":"DefinitionID"},"id":{"type":"string","x-go-name":"InstanceID"},"name":{"type":"string","x-go-name":"Name"},"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_id":{"type":"string","x-go-name":"SubWorkflowID"},"title":{"type":"string","x-go-name":"Title"},"type":{"type":"string","x-go-name":"Type"},"version":{"type":"string","x-go-name":"Version"},"workflow_id":{"type":"string","x-go-name":"WorkflowID"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/be-console/models","$$ref":"#/components/schemas/ActionInstanceGetAllResponse"},"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"},"definition_id":{"type":"string","x-go-name":"DefinitionID"},"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"},"ended_on":{"type":"string","format":"date-time","x-go-name":"EndedOn"},"id":{"type":"string","x-go-name":"InstanceID"},"name":{"type":"string","x-go-name":"Name"},"output":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"Output"},"owner":{"type":"string","x-go-name":"Owner"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"Properties"},"root_workflow_id":{"type":"string","x-go-name":"RootWorkflowID"},"schema_id":{"type":"string","x-go-name":"ViewSchemaID"},"started_by":{"type":"string","x-go-name":"StartedBy"},"started_on":{"type":"string","format":"date-time","x-go-name":"StartedOn"},"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"},"title":{"type":"string","x-go-name":"Title"},"type":{"type":"string","x-go-name":"Type"},"ui_config":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"UIConfig"},"updated_by":{"type":"string","x-go-name":"UpdatedBy"},"updated_on":{"type":"string","format":"date-time","x-go-name":"UpdatedOn"},"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"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/be-console/models","$$ref":"#/components/schemas/WorkflowInstanceGetResponse"}}}},"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":"getWFInstanceById","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/instances/{wf_instance_id}"}}