{"type":"api","title":"Handler to start workflow execution","meta":{"id":"/apps/pubhub/media/cisco-xdr-api-docs/fa9197522b1e6452b6dbfc472555dcc7ceeb71bd/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 start workflow execution.","description":"Allowed Role(s): admin\nAllowed User(s): Who have RUN permission to given workflow","operationId":"startWorkflowRequest","parameters":[{"name":"workflow_id","in":"query","description":"ID of the workflow, to start workflow using id. (Not allow to provide both of ID and UniqueName of Workflow)","schema":{"type":"string","x-go-name":"WorkflowID"},"x-go-name":"WorkflowID"},{"name":"unique_name","in":"query","description":"Unique Name of the workflow, to start workflow using unique_name of it\n(Not allow to provide both of ID and UniqueName of Workflow)","schema":{"type":"string","x-go-name":"UniqueName"},"x-go-name":"UniqueName"},{"name":"sync","in":"query","description":"if true, starts workflow with sync.\nIf workflow execution takes more than 28 second, API returns the current status of the instance\nand workflow continue to run in the background\nAPI returns 200 Ok on successful completion of instance\nAPI return 201 Accepted if the workflow still in running state after 28 second","schema":{"type":"boolean","x-go-name":"Sync"},"x-go-name":"Sync"},{"name":"async","in":"query","description":"if true, workflow execution is processed asynchronously","schema":{"type":"boolean","x-go-name":"Async"},"x-go-name":"Async"}],"requestBody":{"description":"The workflow to submit.","content":{"application/json":{"schema":{"type":"object","properties":{"input_variables":{"type":"array","description":"Input Variables information to start the workflow.\n\nin: body","items":{"title":"VariableStartPutRequest model for variables. Either id or name in the properties needs to be specified.","type":"object","properties":{"id":{"type":"string","description":"Variable ID","x-go-name":"VariableID"},"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"}},"x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/be-console/models","$$ref":"#/components/schemas/VariableStartPutRequest"},"x-go-name":"Variables"},"intent_config":{"type":"object","properties":{},"description":"Intent config to start the workflow.\n\nin: body","x-go-name":"WFIntentConfig"},"runtime_user_id":{"type":"string","description":"The runtime user ID to submit.\n\nin: body","x-go-name":"WFRuntimeUserID"},"start_point":{"type":"string","description":"The workflow start point.\n\nin: body","x-go-name":"WFStartPoint"},"target_id":{"type":"string","description":"The target ID to submit.\n\nin: body","x-go-name":"WFTargetID"}},"description":"StartWorklfowPostRequestPayload model","x-go-name":"StartWorklfowPostRequestPayload","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/be-console/models","$$ref":"#/components/schemas/startWorklfowPostRequestPayload"}}},"required":false,"x-go-name":"RequestBody"},"responses":{"200":{"description":"An RunWorkflowResponse response model\n\n# This is used for returning a response of workflow as body","content":{"application/json":{"schema":{"type":"array","items":{"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"},"definition_id":{"type":"string","x-go-name":"DefinitionID"},"id":{"type":"string","x-go-name":"InstanceID"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"Properties"},"schema_id":{"type":"string","x-go-name":"ViewSchemaID"},"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"},"type":{"type":"string","x-go-name":"Type"},"version":{"type":"string","x-go-name":"Version"}},"description":"StartWorkflowResponse model","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/be-console/models","$$ref":"#/components/schemas/StartWorkflowResponse"}}}}},"202":{"description":"An RunWorkflowResponse response model\n\n# This is used for returning a response of workflow as body","content":{"application/json":{"schema":{"type":"array","items":{"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"},"definition_id":{"type":"string","x-go-name":"DefinitionID"},"id":{"type":"string","x-go-name":"InstanceID"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{}},"x-go-name":"Properties"},"schema_id":{"type":"string","x-go-name":"ViewSchemaID"},"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"},"type":{"type":"string","x-go-name":"Type"},"version":{"type":"string","x-go-name":"Version"}},"description":"StartWorkflowResponse model","x-go-package":"bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/be-console/models","$$ref":"#/components/schemas/StartWorkflowResponse"}}}}},"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":{}},"412":{"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":{}}},"x-codegen-request-body-name":"request_body","__originalOperationId":"startWorkflowRequest","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":"post","path":"/v1/workflows/start"}}