> For the complete documentation index, see [llms.txt](https://docs.cortex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortex.io/api/readme/workflows.md).

# Workflows

Use these operations to interact with [Workflows](/streamline/workflows.md) in Cortex.

### Required permissions

* View Workflows: Your API key must have the `View Workflows` permission.
* Create or update Workflows: Your API key must have the `Edit Workflows` permission.
* Callback a paused async HTTP block: Your API key must have `Edit Workflow Runs` permission.
* Run a workflow: Your API key must have the `Run workflows` permission.
* View or list workflow runs: Your API key must have the `View workflow runs` permission.

## Operations

## List workflows

> List workflows.\
> \
> API key must have the \`View workflows\` permission.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"WorkflowListResponse":{"required":["page","total","totalPages","workflows"],"type":"object","properties":{"page":{"type":"integer","description":"Current page number, 0-indexed","format":"int32"},"total":{"type":"integer","description":"Total number of results","format":"int32"},"totalPages":{"type":"integer","description":"Total number of pages","format":"int32"},"workflows":{"type":"array","description":"List of workflows","items":{"$ref":"#/components/schemas/WorkflowDefinition"}}}},"WorkflowDefinition":{"required":["actions","filter","isDraft","name","restrictActionCompletionToRunnerUser","tag","variables"],"type":"object","properties":{"actions":{"type":"array","description":"List of actions in the workflow","items":{"$ref":"#/components/schemas/WorkflowAction"}},"createdAt":{"type":"string","description":"The date the workflow was created, in ISO 8601 format"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/User"}]},"description":{"type":"string","description":"Description of the workflow"},"failedRunResponseTemplate":{"type":"string","description":"Template for the response when the workflow run fails"},"filter":{"$ref":"#/components/schemas/WorkflowFilter"},"iconTag":{"type":"string","description":"Icon tag for the workflow"},"isDraft":{"type":"boolean","description":"Whether the workflow is a draft"},"isRunnableViaApi":{"type":"boolean","description":"Whether the workflow is runnable via the public API"},"lastUpdatedAt":{"type":"string","description":"The date the workflow was last updated, in ISO 8601 format"},"lastUpdatedBy":{"oneOf":[{"$ref":"#/components/schemas/User"}]},"name":{"type":"string","description":"Name of the workflow"},"restrictActionCompletionToRunnerUser":{"type":"boolean","description":"If true, only the user who started the workflow can complete actions. Defaults to false."},"runResponseTemplate":{"type":"string","description":"Template for the response when the workflow is completed successfully"},"runRestrictionPolicies":{"type":"array","description":"List of restriction policies for the workflow","items":{"$ref":"#/components/schemas/RestrictionPolicyRelationship"}},"tag":{"type":"string","description":"Tag of the workflow"},"variables":{"type":"array","description":"List of variable definitions for the workflow","items":{"$ref":"#/components/schemas/WorkflowVariable"}}}},"WorkflowAction":{"required":["isRootAction","name","outgoingActions","schema","slug"],"type":"object","properties":{"isRootAction":{"type":"boolean","description":"Whether the action is the root action of the workflow. There can be only one root action per workflow"},"name":{"type":"string","description":"The name of the action"},"outgoingActions":{"type":"array","description":"The actions that will be executed after this action","items":{"type":"string","description":"The actions that will be executed after this action"}},"schema":{"$ref":"#/components/schemas/WorkflowActionSchema"},"slug":{"type":"string","description":"The slug of the action"}},"description":"List of actions in the workflow"},"WorkflowActionSchema":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the action"}},"description":"The definition of the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.ADVANCED_HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST_ASYNC"},{"$ref":"#/components/schemas/WorkflowActionSchema.SCAFFOLDER"},{"$ref":"#/components/schemas/WorkflowActionSchema.USER_INPUT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JQ"},{"$ref":"#/components/schemas/WorkflowActionSchema.SLACK"},{"$ref":"#/components/schemas/WorkflowActionSchema.MANUAL_APPROVAL"},{"$ref":"#/components/schemas/WorkflowActionSchema.CONDITIONAL_BRANCH"},{"$ref":"#/components/schemas/WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE"},{"$ref":"#/components/schemas/WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE"},{"$ref":"#/components/schemas/WorkflowActionSchema.JAVASCRIPT"},{"$ref":"#/components/schemas/WorkflowActionSchema.SET_VARIABLES"},{"$ref":"#/components/schemas/WorkflowActionSchema.AWS"},{"$ref":"#/components/schemas/WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JIRA_CREATE_ISSUE"},{"$ref":"#/components/schemas/WorkflowActionSchema.RUN_WORKFLOW"}]},"WorkflowActionSchema.HTTP_REQUEST":{"title":"HTTP_REQUEST","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.ADVANCED_HTTP_REQUEST":{"title":"ADVANCED_HTTP_REQUEST","required":["actionIdentifier","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"integrationAlias":{"type":"string"},"type":{"type":"string"}}}]},"JsonNode":{"type":"object"},"WorkflowActionSchema.HTTP_REQUEST_ASYNC":{"title":"HTTP_REQUEST_ASYNC","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"timeoutInSeconds":{"type":"integer","description":"The timeout for the request in seconds","format":"int32"},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.SCAFFOLDER":{"title":"SCAFFOLDER","required":["inputOverrides","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"createNewRepository":{"type":"boolean","description":"Whether the Scaffolder should create a new repository. Defaults to `true`"},"createService":{"type":"boolean","description":"Whether the cortex service should be created."},"inputOverrides":{"type":"array","description":"The input overrides for the Scaffolder","items":{"$ref":"#/components/schemas/InputOverride"}},"scaffolderTemplateId":{"type":"string","description":"On input, accepts either the tag or the Cortex ID of the Scaffolder template. On output, always the template's Cortex ID, or `null` if the referenced template was deleted."},"scaffolderTemplateTag":{"type":"string","description":"The tag of the Scaffolder template. Preferred over `scaffolderTemplateId` when both are provided, so workflow definitions stay portable across workspaces."},"type":{"type":"string"}}}]},"InputOverride":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input override","enum":["OPTION","VALUE"]}},"description":"The list of overrides for the action inputs","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Option"},{"$ref":"#/components/schemas/Value"}]},"Option":{"required":["inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"Value":{"required":["editable","inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"editable":{"type":"boolean","description":"Whether the override is editable by the user. Defaults to `false`. If set to `true` it'll pause the execution of the workflow and wait for the user to provide the value"},"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"WorkflowActionSchema.USER_INPUT":{"title":"USER_INPUT","required":["inputOverrides","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"inputOverrides":{"type":"array","description":"The list of overrides for the action inputs","items":{"$ref":"#/components/schemas/InputOverride"}},"inputs":{"type":"array","description":"The list of inputs required for the action","items":{"$ref":"#/components/schemas/WorkflowInput"}},"jsValidatorScript":{"type":"string","description":"Optional JavaScript validator script to validate the provided inputs"},"type":{"type":"string"}}}]},"WorkflowInput":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input","enum":["INPUT_FIELD","TEXTAREA_FIELD","SELECT_FIELD","MULTISELECT_FIELD","TOGGLE_FIELD","CORTEX_ENTITY_FIELD","CORTEX_USER_FIELD","SLACK_FIELD","SECRET_FIELD","NUMBER_FIELD","DATE_FIELD","NESTED_FORM_FIELD"]}},"description":"The list of inputs required for the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowInput.INPUT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TEXTAREA_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.MULTISELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TOGGLE_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_ENTITY_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_USER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SLACK_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SECRET_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.NUMBER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.DATE_FIELD"}]},"WorkflowInput.INPUT_FIELD":{"title":"INPUT_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.TEXTAREA_FIELD":{"title":"TEXTAREA_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.SELECT_FIELD":{"title":"SELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.MULTISELECT_FIELD":{"title":"MULTISELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.TOGGLE_FIELD":{"title":"TOGGLE_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"boolean","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.CORTEX_ENTITY_FIELD":{"title":"CORTEX_ENTITY_FIELD","required":["allowMultiple","entityFilter","key","limitEntitiesToRunnerUserScope","name","required","shouldDisplayOptionsAsHierarchy","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"entityFilter":{"$ref":"#/components/schemas/WorkflowInputEntityFilter"},"key":{"type":"string","description":"The key of the input"},"limitEntitiesToRunnerUserScope":{"type":"boolean","description":"Whether to limit entity options to the workflow runner's entities. Defaults to `false`"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"shouldDisplayOptionsAsHierarchy":{"type":"boolean","description":"Whether the options should be displayed as a hierarchy. Defaults to `false`"},"type":{"type":"string"}}}]},"WorkflowInputEntityFilter":{"type":"object","properties":{"domainIds":{"type":"array","description":"Restrict options to entities related to the provided domains","items":{"type":"string","description":"Restrict options to entities related to the provided domains"}},"emailOwners":{"type":"array","description":"Restrict options to entities owned by the provided users","items":{"type":"string","description":"Restrict options to entities owned by the provided users"}},"excludedGroupTags":{"type":"array","description":"Restrict options to entities in the provided groups","items":{"type":"string","description":"Restrict options to entities in the provided groups"}},"groupTags":{"type":"array","description":"Restrict options to entities not in the provided groups","items":{"type":"string","description":"Restrict options to entities not in the provided groups"}},"teamIds":{"type":"array","description":"Restrict options to entities owned by the provided teams","items":{"type":"string","description":"Restrict options to entities owned by the provided teams"}},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the input"},"EntityTypeFilter1":{"required":["types"],"type":"object","properties":{"types":{"uniqueItems":true,"type":"array","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities","items":{"type":"string","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities"}}}},"WorkflowInput.CORTEX_USER_FIELD":{"title":"CORTEX_USER_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"$ref":"#/components/schemas/CortexUserIdentity"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputUserFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"CortexUserIdentity":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"name":{"type":"string","description":"The name of the user"}},"description":"The default value for the input"},"WorkflowInputUserFilter":{"type":"object","properties":{"teamCids":{"type":"array","description":"Restrict options to users on the provided teams","items":{"type":"string","description":"Restrict options to users on the provided teams"}},"userEmails":{"type":"array","description":"Restrict options to users with the provided emails","items":{"type":"string","description":"Restrict options to users with the provided emails"}}},"description":"The user filter for the input"},"WorkflowInput.SLACK_FIELD":{"title":"SLACK_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputSlackFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInputSlackFilter":{"required":["channels"],"type":"object","properties":{"channels":{"type":"array","description":"Restrict options to the provided channels","items":{"type":"string","description":"Restrict options to the provided channels"}}},"description":"The filters for the input"},"WorkflowInput.SECRET_FIELD":{"title":"SECRET_FIELD","required":["disabled","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.NUMBER_FIELD":{"title":"NUMBER_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"number","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The number format of the input","enum":["INTEGER","DECIMAL"]},"key":{"type":"string","description":"The key of the input"},"max":{"type":"number","description":"The maximum value of the input"},"min":{"type":"number","description":"The minimum value of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.DATE_FIELD":{"title":"DATE_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The date format of the input","enum":["DATE","DATETIME"]},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JQ":{"title":"JQ","required":["expression","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"expression":{"type":"string","description":"The JQ expression for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SLACK":{"title":"SLACK","required":["channel","message","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channel":{"type":"string","description":"The channel name to send the message to, without the `#`. For example for `#general` use `general`"},"message":{"type":"string","description":"The message to send"},"type":{"type":"string"}}}]},"WorkflowActionSchema.MANUAL_APPROVAL":{"title":"MANUAL_APPROVAL","required":["approvingTeamIds","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"approverDescription":{"type":"string","description":"A description that will be shown to approvers"},"approvingTeamIds":{"type":"array","description":"The IDs of the teams whose members can approve the action","items":{"type":"string","description":"The IDs of the teams whose members can approve the action"}},"approvingTeamIdsOverride":{"type":"string","description":"The path to the override value in the workflow context that resolves the approving teams at run time. The value at the path must be an array of team Cortex IDs or team tags."},"type":{"type":"string"}}}]},"WorkflowActionSchema.CONDITIONAL_BRANCH":{"title":"CONDITIONAL_BRANCH","required":["branches","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"branches":{"type":"array","description":"The list of conditional branches that will be evaluated in order","items":{"$ref":"#/components/schemas/Conditional"}},"fallbackBranch":{"$ref":"#/components/schemas/Fallback"},"joiningAction":{"type":"string","description":"The joining action that will run after all branches"},"type":{"type":"string"}}}]},"Conditional":{"required":["expression","name","slug"],"type":"object","properties":{"expression":{"type":"string","description":"The conditional expression for the branch"},"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The list of conditional branches that will be evaluated in order"},"Fallback":{"required":["name","slug"],"type":"object","properties":{"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The fallback branch that will be taken if no other branches evaluate to `true`"},"WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE":{"title":"GITHUB_CREATE_OR_UPDATE_FILE","required":["alias","commitMessage","content","path","repositoryName","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the github configuration to be used"},"author":{"$ref":"#/components/schemas/GithubAuthor"},"branch":{"type":"string","description":"The branch in the repository where the changes will be applied (optional; defaults to the main branch if not specified)"},"commitMessage":{"type":"string","description":"A message describing the purpose of the commit"},"committer":{"$ref":"#/components/schemas/GithubCommitter"},"content":{"type":"string","description":"The content of the file to be created or updated (not base64-encoded)"},"path":{"type":"string","description":"The full path to the file within the repository"},"repositoryName":{"type":"string","description":"The name of the repository where the file is being created or updated"},"type":{"type":"string"}}}]},"GithubAuthor":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the original author of the changes being committed (optional)"},"GithubCommitter":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the person or system making the commit, such as name and email (optional)"},"WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE":{"title":"MS_TEAMS_SEND_MESSAGE","required":["channelId","message","teamId","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channelId":{"type":"string","description":"The channel id to send the message to"},"message":{"type":"string","description":"The message to send"},"teamId":{"type":"string","description":"The team id to send the message to"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JAVASCRIPT":{"title":"JAVASCRIPT","required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"script":{"type":"string","description":"The JavaScript script for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SET_VARIABLES":{"title":"SET_VARIABLES","required":["type","variables"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"type":{"type":"string"},"variables":{"type":"array","description":"The variables to set for the action","items":{"$ref":"#/components/schemas/VariableAssignment"}}}}]},"VariableAssignment":{"required":["slug","source"],"type":"object","properties":{"slug":{"type":"string","description":"The type of the variable"},"source":{"oneOf":[{"$ref":"#/components/schemas/JavaScript"},{"$ref":"#/components/schemas/Reference"}]}},"description":"The variables to set for the action"},"JavaScript":{"required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"script":{"type":"string"}}}]},"VariableSource":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"How to set the variable","discriminator":{"propertyName":"type"}},"Reference":{"required":["path","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"path":{"type":"string"}}}]},"WorkflowActionSchema.AWS":{"title":"AWS","required":["accountId","actionIdentifier","inputs","region","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"accountId":{"type":"string"},"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"region":{"type":"string"},"type":{"type":"string"}}}]},"WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT":{"title":"PAGERDUTY_CREATE_INCIDENT","required":["body","fromEmail","serviceId","title","type","urgency"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"body":{"type":"string","description":"The body of the incident"},"fromEmail":{"type":"string","description":"The email address of a valid user associated with the account making the request"},"incidentTypeName":{"type":"string","description":"The incident type name"},"serviceId":{"type":"string","description":"The ID of the service to create the incident for"},"title":{"type":"string","description":"The title of the incident"},"type":{"type":"string"},"urgency":{"type":"string","description":"The urgency of the incident","enum":["HIGH","LOW"]}}}]},"WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT":{"title":"INCIDENT_IO_CREATE_INCIDENT","required":["alias","entityTag","name","severity","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias of the incident.io configuration to use"},"entityTag":{"type":"string","description":"The tag of the entity whose incident.io custom field registrations are attached to the incident"},"incidentType":{"type":"string","description":"The name of the incident type to create the incident with"},"mode":{"type":"string","description":"The mode of the incident: STANDARD, RETROSPECTIVE, TEST or TUTORIAL"},"name":{"type":"string","description":"The name of the incident"},"severity":{"type":"string","description":"The name of the severity to create the incident with"},"status":{"type":"string","description":"The name of the status to create the incident with"},"summary":{"type":"string","description":"The summary of the incident"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JIRA_CREATE_ISSUE":{"title":"JIRA_CREATE_ISSUE","required":["alias","components","description","fields","issueSummary","issueType","labels","projectKey","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the Jira configuration that will be used."},"assignee":{"type":"string","description":"The identifier of the assignee for the Jira issue. This field is optional."},"components":{"type":"array","description":"A list of components within the Jira project to which the issue belongs. This field is optional.","items":{"type":"string","description":"A list of components within the Jira project to which the issue belongs. This field is optional."}},"description":{"type":"string","description":"A detailed description of the issue, providing more context about what needs to be addressed."},"fields":{"type":"object","additionalProperties":{"type":"object","description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"issueSummary":{"type":"string","description":"A brief summary of the issue being created, typically representing the title of the issue."},"issueType":{"type":"string","description":"The type of the issue being created, such as 'Bug', 'Task', or 'Story'."},"labels":{"type":"array","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional.","items":{"type":"string","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional."}},"priority":{"type":"string","description":"The priority of the issue, such as 'High', 'Medium', or 'Low'. This field is optional."},"projectKey":{"type":"string","description":"The key of the Jira project where the issue will be created. Typically a short code like 'PROJ'."},"reporter":{"type":"string","description":"The identifier of the reporter who is raising the Jira issue. This field is optional."},"type":{"type":"string"}}}]},"WorkflowActionSchema.RUN_WORKFLOW":{"title":"RUN_WORKFLOW","required":["type","workflowId"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"entityId":{"type":"string","description":"The ID of the entity"},"type":{"type":"string"},"workflowId":{"type":"string","description":"The ID of the workflow to run"}}}]},"User":{"required":["name"],"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"name":{"type":"string","description":"Name"}}},"WorkflowFilter":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the workflow filter","enum":["GLOBAL","ENTITY"]}},"description":"Filter to determine in what entity contexts the workflow can run","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowFilter.GLOBAL"},{"$ref":"#/components/schemas/WorkflowFilter.ENTITY"}]},"WorkflowFilter.GLOBAL":{"title":"GLOBAL","required":["type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowFilter"}]},"WorkflowFilter.ENTITY":{"title":"ENTITY","required":["ownershipScope","requiredTeamRoles","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowFilter"},{"type":"object","properties":{"entityFilter":{"$ref":"#/components/schemas/CompoundFilter"},"ownershipScope":{"type":"string","description":"The ownership scope for the workflow","enum":["ALL","OWNER","EDITOR"]},"requiredTeamRoles":{"type":"array","description":"Tags of the team roles required to run the workflow. When non-empty, the runner must hold at least one of them on a team that owns the entity, in addition to what `ownershipScope` already requires. Only valid alongside an `ownershipScope` other than `ALL`.","items":{"type":"string","description":"Tags of the team roles required to run the workflow. When non-empty, the runner must hold at least one of them on a team that owns the entity, in addition to what `ownershipScope` already requires. Only valid alongside an `ownershipScope` other than `ALL`."}}}}]},"CompoundFilter":{"type":"object","properties":{"entityGroupFilter":{"$ref":"#/components/schemas/EntityGroupFilterDTO1"},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the workflow"},"EntityGroupFilterDTO1":{"required":["entityGroups","excludedEntityGroups"],"type":"object","properties":{"entityGroups":{"uniqueItems":true,"type":"array","description":"The entity groups to include","items":{"type":"string","description":"The entity groups to include"}},"excludedEntityGroups":{"uniqueItems":true,"type":"array","description":"The entity groups to exclude","items":{"type":"string","description":"The entity groups to exclude"}}},"description":"The entity group filter for the entity"},"RestrictionPolicyRelationship":{"required":["id","type"],"type":"object","properties":{"id":{"type":"string","description":"ID of the principal allowed to run the workflow"},"type":{"type":"string","description":"Type of the principal allowed to run the workflow","enum":["USER","TEAM","CUSTOM_ROLE"]}},"description":"List of restriction policies for the workflow"},"WorkflowVariable":{"required":["slug","type"],"type":"object","properties":{"defaultValue":{"$ref":"#/components/schemas/JsonNode"},"description":{"type":"string","description":"The description of the variable"},"slug":{"type":"string","description":"The slug of the variable"},"type":{"type":"string","description":"The type of the variable","enum":["STRING","NUMBER","BOOLEAN","OBJECT","ARRAY_OF_STRING","ARRAY_OF_NUMBER","ARRAY_OF_BOOLEAN","ARRAY_OF_OBJECT"]}},"description":"List of variable definitions for the workflow"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows":{"get":{"description":"List workflows.\n\nAPI key must have the `View workflows` permission.","operationId":"listWorkflows","parameters":[{"description":"When true, returns the list of actions for each workflow. Defaults to false.","in":"query","name":"includeActions","required":false,"schema":{"type":"boolean","default":false}},{"description":"When set, only returns workflows with the given substring in the name or description.","in":"query","name":"searchQuery","required":false,"schema":{"type":"string"}},{"description":"Number of results to return per page, between 1 and 1000. Default 250.","in":"query","name":"pageSize","required":true,"schema":{"type":"integer","format":"int32","default":250}},{"description":"Page number to return, 0-indexed. Default 0.","in":"query","name":"page","required":true,"schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowListResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/WorkflowListResponse"}}},"description":"Successfully found workflows"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List workflows","tags":["Workflows"]}}}}
```

## Retrieve workflow

> Retrieve workflow by tag or ID.\
> \
> API key must have the \`View workflows\` permission.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"WorkflowDefinition":{"required":["actions","filter","isDraft","name","restrictActionCompletionToRunnerUser","tag","variables"],"type":"object","properties":{"actions":{"type":"array","description":"List of actions in the workflow","items":{"$ref":"#/components/schemas/WorkflowAction"}},"createdAt":{"type":"string","description":"The date the workflow was created, in ISO 8601 format"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/User"}]},"description":{"type":"string","description":"Description of the workflow"},"failedRunResponseTemplate":{"type":"string","description":"Template for the response when the workflow run fails"},"filter":{"$ref":"#/components/schemas/WorkflowFilter"},"iconTag":{"type":"string","description":"Icon tag for the workflow"},"isDraft":{"type":"boolean","description":"Whether the workflow is a draft"},"isRunnableViaApi":{"type":"boolean","description":"Whether the workflow is runnable via the public API"},"lastUpdatedAt":{"type":"string","description":"The date the workflow was last updated, in ISO 8601 format"},"lastUpdatedBy":{"oneOf":[{"$ref":"#/components/schemas/User"}]},"name":{"type":"string","description":"Name of the workflow"},"restrictActionCompletionToRunnerUser":{"type":"boolean","description":"If true, only the user who started the workflow can complete actions. Defaults to false."},"runResponseTemplate":{"type":"string","description":"Template for the response when the workflow is completed successfully"},"runRestrictionPolicies":{"type":"array","description":"List of restriction policies for the workflow","items":{"$ref":"#/components/schemas/RestrictionPolicyRelationship"}},"tag":{"type":"string","description":"Tag of the workflow"},"variables":{"type":"array","description":"List of variable definitions for the workflow","items":{"$ref":"#/components/schemas/WorkflowVariable"}}}},"WorkflowAction":{"required":["isRootAction","name","outgoingActions","schema","slug"],"type":"object","properties":{"isRootAction":{"type":"boolean","description":"Whether the action is the root action of the workflow. There can be only one root action per workflow"},"name":{"type":"string","description":"The name of the action"},"outgoingActions":{"type":"array","description":"The actions that will be executed after this action","items":{"type":"string","description":"The actions that will be executed after this action"}},"schema":{"$ref":"#/components/schemas/WorkflowActionSchema"},"slug":{"type":"string","description":"The slug of the action"}},"description":"List of actions in the workflow"},"WorkflowActionSchema":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the action"}},"description":"The definition of the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.ADVANCED_HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST_ASYNC"},{"$ref":"#/components/schemas/WorkflowActionSchema.SCAFFOLDER"},{"$ref":"#/components/schemas/WorkflowActionSchema.USER_INPUT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JQ"},{"$ref":"#/components/schemas/WorkflowActionSchema.SLACK"},{"$ref":"#/components/schemas/WorkflowActionSchema.MANUAL_APPROVAL"},{"$ref":"#/components/schemas/WorkflowActionSchema.CONDITIONAL_BRANCH"},{"$ref":"#/components/schemas/WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE"},{"$ref":"#/components/schemas/WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE"},{"$ref":"#/components/schemas/WorkflowActionSchema.JAVASCRIPT"},{"$ref":"#/components/schemas/WorkflowActionSchema.SET_VARIABLES"},{"$ref":"#/components/schemas/WorkflowActionSchema.AWS"},{"$ref":"#/components/schemas/WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JIRA_CREATE_ISSUE"},{"$ref":"#/components/schemas/WorkflowActionSchema.RUN_WORKFLOW"}]},"WorkflowActionSchema.HTTP_REQUEST":{"title":"HTTP_REQUEST","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.ADVANCED_HTTP_REQUEST":{"title":"ADVANCED_HTTP_REQUEST","required":["actionIdentifier","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"integrationAlias":{"type":"string"},"type":{"type":"string"}}}]},"JsonNode":{"type":"object"},"WorkflowActionSchema.HTTP_REQUEST_ASYNC":{"title":"HTTP_REQUEST_ASYNC","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"timeoutInSeconds":{"type":"integer","description":"The timeout for the request in seconds","format":"int32"},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.SCAFFOLDER":{"title":"SCAFFOLDER","required":["inputOverrides","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"createNewRepository":{"type":"boolean","description":"Whether the Scaffolder should create a new repository. Defaults to `true`"},"createService":{"type":"boolean","description":"Whether the cortex service should be created."},"inputOverrides":{"type":"array","description":"The input overrides for the Scaffolder","items":{"$ref":"#/components/schemas/InputOverride"}},"scaffolderTemplateId":{"type":"string","description":"On input, accepts either the tag or the Cortex ID of the Scaffolder template. On output, always the template's Cortex ID, or `null` if the referenced template was deleted."},"scaffolderTemplateTag":{"type":"string","description":"The tag of the Scaffolder template. Preferred over `scaffolderTemplateId` when both are provided, so workflow definitions stay portable across workspaces."},"type":{"type":"string"}}}]},"InputOverride":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input override","enum":["OPTION","VALUE"]}},"description":"The list of overrides for the action inputs","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Option"},{"$ref":"#/components/schemas/Value"}]},"Option":{"required":["inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"Value":{"required":["editable","inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"editable":{"type":"boolean","description":"Whether the override is editable by the user. Defaults to `false`. If set to `true` it'll pause the execution of the workflow and wait for the user to provide the value"},"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"WorkflowActionSchema.USER_INPUT":{"title":"USER_INPUT","required":["inputOverrides","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"inputOverrides":{"type":"array","description":"The list of overrides for the action inputs","items":{"$ref":"#/components/schemas/InputOverride"}},"inputs":{"type":"array","description":"The list of inputs required for the action","items":{"$ref":"#/components/schemas/WorkflowInput"}},"jsValidatorScript":{"type":"string","description":"Optional JavaScript validator script to validate the provided inputs"},"type":{"type":"string"}}}]},"WorkflowInput":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input","enum":["INPUT_FIELD","TEXTAREA_FIELD","SELECT_FIELD","MULTISELECT_FIELD","TOGGLE_FIELD","CORTEX_ENTITY_FIELD","CORTEX_USER_FIELD","SLACK_FIELD","SECRET_FIELD","NUMBER_FIELD","DATE_FIELD","NESTED_FORM_FIELD"]}},"description":"The list of inputs required for the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowInput.INPUT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TEXTAREA_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.MULTISELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TOGGLE_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_ENTITY_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_USER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SLACK_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SECRET_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.NUMBER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.DATE_FIELD"}]},"WorkflowInput.INPUT_FIELD":{"title":"INPUT_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.TEXTAREA_FIELD":{"title":"TEXTAREA_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.SELECT_FIELD":{"title":"SELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.MULTISELECT_FIELD":{"title":"MULTISELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.TOGGLE_FIELD":{"title":"TOGGLE_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"boolean","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.CORTEX_ENTITY_FIELD":{"title":"CORTEX_ENTITY_FIELD","required":["allowMultiple","entityFilter","key","limitEntitiesToRunnerUserScope","name","required","shouldDisplayOptionsAsHierarchy","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"entityFilter":{"$ref":"#/components/schemas/WorkflowInputEntityFilter"},"key":{"type":"string","description":"The key of the input"},"limitEntitiesToRunnerUserScope":{"type":"boolean","description":"Whether to limit entity options to the workflow runner's entities. Defaults to `false`"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"shouldDisplayOptionsAsHierarchy":{"type":"boolean","description":"Whether the options should be displayed as a hierarchy. Defaults to `false`"},"type":{"type":"string"}}}]},"WorkflowInputEntityFilter":{"type":"object","properties":{"domainIds":{"type":"array","description":"Restrict options to entities related to the provided domains","items":{"type":"string","description":"Restrict options to entities related to the provided domains"}},"emailOwners":{"type":"array","description":"Restrict options to entities owned by the provided users","items":{"type":"string","description":"Restrict options to entities owned by the provided users"}},"excludedGroupTags":{"type":"array","description":"Restrict options to entities in the provided groups","items":{"type":"string","description":"Restrict options to entities in the provided groups"}},"groupTags":{"type":"array","description":"Restrict options to entities not in the provided groups","items":{"type":"string","description":"Restrict options to entities not in the provided groups"}},"teamIds":{"type":"array","description":"Restrict options to entities owned by the provided teams","items":{"type":"string","description":"Restrict options to entities owned by the provided teams"}},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the input"},"EntityTypeFilter1":{"required":["types"],"type":"object","properties":{"types":{"uniqueItems":true,"type":"array","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities","items":{"type":"string","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities"}}}},"WorkflowInput.CORTEX_USER_FIELD":{"title":"CORTEX_USER_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"$ref":"#/components/schemas/CortexUserIdentity"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputUserFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"CortexUserIdentity":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"name":{"type":"string","description":"The name of the user"}},"description":"The default value for the input"},"WorkflowInputUserFilter":{"type":"object","properties":{"teamCids":{"type":"array","description":"Restrict options to users on the provided teams","items":{"type":"string","description":"Restrict options to users on the provided teams"}},"userEmails":{"type":"array","description":"Restrict options to users with the provided emails","items":{"type":"string","description":"Restrict options to users with the provided emails"}}},"description":"The user filter for the input"},"WorkflowInput.SLACK_FIELD":{"title":"SLACK_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputSlackFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInputSlackFilter":{"required":["channels"],"type":"object","properties":{"channels":{"type":"array","description":"Restrict options to the provided channels","items":{"type":"string","description":"Restrict options to the provided channels"}}},"description":"The filters for the input"},"WorkflowInput.SECRET_FIELD":{"title":"SECRET_FIELD","required":["disabled","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.NUMBER_FIELD":{"title":"NUMBER_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"number","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The number format of the input","enum":["INTEGER","DECIMAL"]},"key":{"type":"string","description":"The key of the input"},"max":{"type":"number","description":"The maximum value of the input"},"min":{"type":"number","description":"The minimum value of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.DATE_FIELD":{"title":"DATE_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The date format of the input","enum":["DATE","DATETIME"]},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JQ":{"title":"JQ","required":["expression","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"expression":{"type":"string","description":"The JQ expression for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SLACK":{"title":"SLACK","required":["channel","message","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channel":{"type":"string","description":"The channel name to send the message to, without the `#`. For example for `#general` use `general`"},"message":{"type":"string","description":"The message to send"},"type":{"type":"string"}}}]},"WorkflowActionSchema.MANUAL_APPROVAL":{"title":"MANUAL_APPROVAL","required":["approvingTeamIds","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"approverDescription":{"type":"string","description":"A description that will be shown to approvers"},"approvingTeamIds":{"type":"array","description":"The IDs of the teams whose members can approve the action","items":{"type":"string","description":"The IDs of the teams whose members can approve the action"}},"approvingTeamIdsOverride":{"type":"string","description":"The path to the override value in the workflow context that resolves the approving teams at run time. The value at the path must be an array of team Cortex IDs or team tags."},"type":{"type":"string"}}}]},"WorkflowActionSchema.CONDITIONAL_BRANCH":{"title":"CONDITIONAL_BRANCH","required":["branches","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"branches":{"type":"array","description":"The list of conditional branches that will be evaluated in order","items":{"$ref":"#/components/schemas/Conditional"}},"fallbackBranch":{"$ref":"#/components/schemas/Fallback"},"joiningAction":{"type":"string","description":"The joining action that will run after all branches"},"type":{"type":"string"}}}]},"Conditional":{"required":["expression","name","slug"],"type":"object","properties":{"expression":{"type":"string","description":"The conditional expression for the branch"},"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The list of conditional branches that will be evaluated in order"},"Fallback":{"required":["name","slug"],"type":"object","properties":{"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The fallback branch that will be taken if no other branches evaluate to `true`"},"WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE":{"title":"GITHUB_CREATE_OR_UPDATE_FILE","required":["alias","commitMessage","content","path","repositoryName","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the github configuration to be used"},"author":{"$ref":"#/components/schemas/GithubAuthor"},"branch":{"type":"string","description":"The branch in the repository where the changes will be applied (optional; defaults to the main branch if not specified)"},"commitMessage":{"type":"string","description":"A message describing the purpose of the commit"},"committer":{"$ref":"#/components/schemas/GithubCommitter"},"content":{"type":"string","description":"The content of the file to be created or updated (not base64-encoded)"},"path":{"type":"string","description":"The full path to the file within the repository"},"repositoryName":{"type":"string","description":"The name of the repository where the file is being created or updated"},"type":{"type":"string"}}}]},"GithubAuthor":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the original author of the changes being committed (optional)"},"GithubCommitter":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the person or system making the commit, such as name and email (optional)"},"WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE":{"title":"MS_TEAMS_SEND_MESSAGE","required":["channelId","message","teamId","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channelId":{"type":"string","description":"The channel id to send the message to"},"message":{"type":"string","description":"The message to send"},"teamId":{"type":"string","description":"The team id to send the message to"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JAVASCRIPT":{"title":"JAVASCRIPT","required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"script":{"type":"string","description":"The JavaScript script for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SET_VARIABLES":{"title":"SET_VARIABLES","required":["type","variables"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"type":{"type":"string"},"variables":{"type":"array","description":"The variables to set for the action","items":{"$ref":"#/components/schemas/VariableAssignment"}}}}]},"VariableAssignment":{"required":["slug","source"],"type":"object","properties":{"slug":{"type":"string","description":"The type of the variable"},"source":{"oneOf":[{"$ref":"#/components/schemas/JavaScript"},{"$ref":"#/components/schemas/Reference"}]}},"description":"The variables to set for the action"},"JavaScript":{"required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"script":{"type":"string"}}}]},"VariableSource":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"How to set the variable","discriminator":{"propertyName":"type"}},"Reference":{"required":["path","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"path":{"type":"string"}}}]},"WorkflowActionSchema.AWS":{"title":"AWS","required":["accountId","actionIdentifier","inputs","region","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"accountId":{"type":"string"},"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"region":{"type":"string"},"type":{"type":"string"}}}]},"WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT":{"title":"PAGERDUTY_CREATE_INCIDENT","required":["body","fromEmail","serviceId","title","type","urgency"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"body":{"type":"string","description":"The body of the incident"},"fromEmail":{"type":"string","description":"The email address of a valid user associated with the account making the request"},"incidentTypeName":{"type":"string","description":"The incident type name"},"serviceId":{"type":"string","description":"The ID of the service to create the incident for"},"title":{"type":"string","description":"The title of the incident"},"type":{"type":"string"},"urgency":{"type":"string","description":"The urgency of the incident","enum":["HIGH","LOW"]}}}]},"WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT":{"title":"INCIDENT_IO_CREATE_INCIDENT","required":["alias","entityTag","name","severity","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias of the incident.io configuration to use"},"entityTag":{"type":"string","description":"The tag of the entity whose incident.io custom field registrations are attached to the incident"},"incidentType":{"type":"string","description":"The name of the incident type to create the incident with"},"mode":{"type":"string","description":"The mode of the incident: STANDARD, RETROSPECTIVE, TEST or TUTORIAL"},"name":{"type":"string","description":"The name of the incident"},"severity":{"type":"string","description":"The name of the severity to create the incident with"},"status":{"type":"string","description":"The name of the status to create the incident with"},"summary":{"type":"string","description":"The summary of the incident"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JIRA_CREATE_ISSUE":{"title":"JIRA_CREATE_ISSUE","required":["alias","components","description","fields","issueSummary","issueType","labels","projectKey","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the Jira configuration that will be used."},"assignee":{"type":"string","description":"The identifier of the assignee for the Jira issue. This field is optional."},"components":{"type":"array","description":"A list of components within the Jira project to which the issue belongs. This field is optional.","items":{"type":"string","description":"A list of components within the Jira project to which the issue belongs. This field is optional."}},"description":{"type":"string","description":"A detailed description of the issue, providing more context about what needs to be addressed."},"fields":{"type":"object","additionalProperties":{"type":"object","description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"issueSummary":{"type":"string","description":"A brief summary of the issue being created, typically representing the title of the issue."},"issueType":{"type":"string","description":"The type of the issue being created, such as 'Bug', 'Task', or 'Story'."},"labels":{"type":"array","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional.","items":{"type":"string","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional."}},"priority":{"type":"string","description":"The priority of the issue, such as 'High', 'Medium', or 'Low'. This field is optional."},"projectKey":{"type":"string","description":"The key of the Jira project where the issue will be created. Typically a short code like 'PROJ'."},"reporter":{"type":"string","description":"The identifier of the reporter who is raising the Jira issue. This field is optional."},"type":{"type":"string"}}}]},"WorkflowActionSchema.RUN_WORKFLOW":{"title":"RUN_WORKFLOW","required":["type","workflowId"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"entityId":{"type":"string","description":"The ID of the entity"},"type":{"type":"string"},"workflowId":{"type":"string","description":"The ID of the workflow to run"}}}]},"User":{"required":["name"],"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"name":{"type":"string","description":"Name"}}},"WorkflowFilter":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the workflow filter","enum":["GLOBAL","ENTITY"]}},"description":"Filter to determine in what entity contexts the workflow can run","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowFilter.GLOBAL"},{"$ref":"#/components/schemas/WorkflowFilter.ENTITY"}]},"WorkflowFilter.GLOBAL":{"title":"GLOBAL","required":["type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowFilter"}]},"WorkflowFilter.ENTITY":{"title":"ENTITY","required":["ownershipScope","requiredTeamRoles","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowFilter"},{"type":"object","properties":{"entityFilter":{"$ref":"#/components/schemas/CompoundFilter"},"ownershipScope":{"type":"string","description":"The ownership scope for the workflow","enum":["ALL","OWNER","EDITOR"]},"requiredTeamRoles":{"type":"array","description":"Tags of the team roles required to run the workflow. When non-empty, the runner must hold at least one of them on a team that owns the entity, in addition to what `ownershipScope` already requires. Only valid alongside an `ownershipScope` other than `ALL`.","items":{"type":"string","description":"Tags of the team roles required to run the workflow. When non-empty, the runner must hold at least one of them on a team that owns the entity, in addition to what `ownershipScope` already requires. Only valid alongside an `ownershipScope` other than `ALL`."}}}}]},"CompoundFilter":{"type":"object","properties":{"entityGroupFilter":{"$ref":"#/components/schemas/EntityGroupFilterDTO1"},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the workflow"},"EntityGroupFilterDTO1":{"required":["entityGroups","excludedEntityGroups"],"type":"object","properties":{"entityGroups":{"uniqueItems":true,"type":"array","description":"The entity groups to include","items":{"type":"string","description":"The entity groups to include"}},"excludedEntityGroups":{"uniqueItems":true,"type":"array","description":"The entity groups to exclude","items":{"type":"string","description":"The entity groups to exclude"}}},"description":"The entity group filter for the entity"},"RestrictionPolicyRelationship":{"required":["id","type"],"type":"object","properties":{"id":{"type":"string","description":"ID of the principal allowed to run the workflow"},"type":{"type":"string","description":"Type of the principal allowed to run the workflow","enum":["USER","TEAM","CUSTOM_ROLE"]}},"description":"List of restriction policies for the workflow"},"WorkflowVariable":{"required":["slug","type"],"type":"object","properties":{"defaultValue":{"$ref":"#/components/schemas/JsonNode"},"description":{"type":"string","description":"The description of the variable"},"slug":{"type":"string","description":"The slug of the variable"},"type":{"type":"string","description":"The type of the variable","enum":["STRING","NUMBER","BOOLEAN","OBJECT","ARRAY_OF_STRING","ARRAY_OF_NUMBER","ARRAY_OF_BOOLEAN","ARRAY_OF_OBJECT"]}},"description":"List of variable definitions for the workflow"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows/{tagOrId}":{"get":{"description":"Retrieve workflow by tag or ID.\n\nAPI key must have the `View workflows` permission.","operationId":"getWorkflow","parameters":[{"description":"The tag or unique, auto-generated identifier for the workflow.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinition"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/WorkflowDefinition"}}},"description":"Successfully found workflow"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workflow not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Retrieve workflow","tags":["Workflows"]}}}}
```

## Create or update workflow

> Create or update new workflow.\
> \
> API key must have the \`Edit workflows\` permission.\
> \
> \*\*Note:\*\* If a workflow with the same tag already exists, it will be updated.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"WorkflowDefinition":{"required":["actions","filter","isDraft","name","restrictActionCompletionToRunnerUser","tag","variables"],"type":"object","properties":{"actions":{"type":"array","description":"List of actions in the workflow","items":{"$ref":"#/components/schemas/WorkflowAction"}},"createdAt":{"type":"string","description":"The date the workflow was created, in ISO 8601 format"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/User"}]},"description":{"type":"string","description":"Description of the workflow"},"failedRunResponseTemplate":{"type":"string","description":"Template for the response when the workflow run fails"},"filter":{"$ref":"#/components/schemas/WorkflowFilter"},"iconTag":{"type":"string","description":"Icon tag for the workflow"},"isDraft":{"type":"boolean","description":"Whether the workflow is a draft"},"isRunnableViaApi":{"type":"boolean","description":"Whether the workflow is runnable via the public API"},"lastUpdatedAt":{"type":"string","description":"The date the workflow was last updated, in ISO 8601 format"},"lastUpdatedBy":{"oneOf":[{"$ref":"#/components/schemas/User"}]},"name":{"type":"string","description":"Name of the workflow"},"restrictActionCompletionToRunnerUser":{"type":"boolean","description":"If true, only the user who started the workflow can complete actions. Defaults to false."},"runResponseTemplate":{"type":"string","description":"Template for the response when the workflow is completed successfully"},"runRestrictionPolicies":{"type":"array","description":"List of restriction policies for the workflow","items":{"$ref":"#/components/schemas/RestrictionPolicyRelationship"}},"tag":{"type":"string","description":"Tag of the workflow"},"variables":{"type":"array","description":"List of variable definitions for the workflow","items":{"$ref":"#/components/schemas/WorkflowVariable"}}}},"WorkflowAction":{"required":["isRootAction","name","outgoingActions","schema","slug"],"type":"object","properties":{"isRootAction":{"type":"boolean","description":"Whether the action is the root action of the workflow. There can be only one root action per workflow"},"name":{"type":"string","description":"The name of the action"},"outgoingActions":{"type":"array","description":"The actions that will be executed after this action","items":{"type":"string","description":"The actions that will be executed after this action"}},"schema":{"$ref":"#/components/schemas/WorkflowActionSchema"},"slug":{"type":"string","description":"The slug of the action"}},"description":"List of actions in the workflow"},"WorkflowActionSchema":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the action"}},"description":"The definition of the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.ADVANCED_HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST_ASYNC"},{"$ref":"#/components/schemas/WorkflowActionSchema.SCAFFOLDER"},{"$ref":"#/components/schemas/WorkflowActionSchema.USER_INPUT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JQ"},{"$ref":"#/components/schemas/WorkflowActionSchema.SLACK"},{"$ref":"#/components/schemas/WorkflowActionSchema.MANUAL_APPROVAL"},{"$ref":"#/components/schemas/WorkflowActionSchema.CONDITIONAL_BRANCH"},{"$ref":"#/components/schemas/WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE"},{"$ref":"#/components/schemas/WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE"},{"$ref":"#/components/schemas/WorkflowActionSchema.JAVASCRIPT"},{"$ref":"#/components/schemas/WorkflowActionSchema.SET_VARIABLES"},{"$ref":"#/components/schemas/WorkflowActionSchema.AWS"},{"$ref":"#/components/schemas/WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JIRA_CREATE_ISSUE"},{"$ref":"#/components/schemas/WorkflowActionSchema.RUN_WORKFLOW"}]},"WorkflowActionSchema.HTTP_REQUEST":{"title":"HTTP_REQUEST","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.ADVANCED_HTTP_REQUEST":{"title":"ADVANCED_HTTP_REQUEST","required":["actionIdentifier","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"integrationAlias":{"type":"string"},"type":{"type":"string"}}}]},"JsonNode":{"type":"object"},"WorkflowActionSchema.HTTP_REQUEST_ASYNC":{"title":"HTTP_REQUEST_ASYNC","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"timeoutInSeconds":{"type":"integer","description":"The timeout for the request in seconds","format":"int32"},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.SCAFFOLDER":{"title":"SCAFFOLDER","required":["inputOverrides","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"createNewRepository":{"type":"boolean","description":"Whether the Scaffolder should create a new repository. Defaults to `true`"},"createService":{"type":"boolean","description":"Whether the cortex service should be created."},"inputOverrides":{"type":"array","description":"The input overrides for the Scaffolder","items":{"$ref":"#/components/schemas/InputOverride"}},"scaffolderTemplateId":{"type":"string","description":"On input, accepts either the tag or the Cortex ID of the Scaffolder template. On output, always the template's Cortex ID, or `null` if the referenced template was deleted."},"scaffolderTemplateTag":{"type":"string","description":"The tag of the Scaffolder template. Preferred over `scaffolderTemplateId` when both are provided, so workflow definitions stay portable across workspaces."},"type":{"type":"string"}}}]},"InputOverride":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input override","enum":["OPTION","VALUE"]}},"description":"The list of overrides for the action inputs","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Option"},{"$ref":"#/components/schemas/Value"}]},"Option":{"required":["inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"Value":{"required":["editable","inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"editable":{"type":"boolean","description":"Whether the override is editable by the user. Defaults to `false`. If set to `true` it'll pause the execution of the workflow and wait for the user to provide the value"},"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"WorkflowActionSchema.USER_INPUT":{"title":"USER_INPUT","required":["inputOverrides","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"inputOverrides":{"type":"array","description":"The list of overrides for the action inputs","items":{"$ref":"#/components/schemas/InputOverride"}},"inputs":{"type":"array","description":"The list of inputs required for the action","items":{"$ref":"#/components/schemas/WorkflowInput"}},"jsValidatorScript":{"type":"string","description":"Optional JavaScript validator script to validate the provided inputs"},"type":{"type":"string"}}}]},"WorkflowInput":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input","enum":["INPUT_FIELD","TEXTAREA_FIELD","SELECT_FIELD","MULTISELECT_FIELD","TOGGLE_FIELD","CORTEX_ENTITY_FIELD","CORTEX_USER_FIELD","SLACK_FIELD","SECRET_FIELD","NUMBER_FIELD","DATE_FIELD","NESTED_FORM_FIELD"]}},"description":"The list of inputs required for the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowInput.INPUT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TEXTAREA_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.MULTISELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TOGGLE_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_ENTITY_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_USER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SLACK_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SECRET_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.NUMBER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.DATE_FIELD"}]},"WorkflowInput.INPUT_FIELD":{"title":"INPUT_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.TEXTAREA_FIELD":{"title":"TEXTAREA_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.SELECT_FIELD":{"title":"SELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.MULTISELECT_FIELD":{"title":"MULTISELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.TOGGLE_FIELD":{"title":"TOGGLE_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"boolean","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.CORTEX_ENTITY_FIELD":{"title":"CORTEX_ENTITY_FIELD","required":["allowMultiple","entityFilter","key","limitEntitiesToRunnerUserScope","name","required","shouldDisplayOptionsAsHierarchy","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"entityFilter":{"$ref":"#/components/schemas/WorkflowInputEntityFilter"},"key":{"type":"string","description":"The key of the input"},"limitEntitiesToRunnerUserScope":{"type":"boolean","description":"Whether to limit entity options to the workflow runner's entities. Defaults to `false`"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"shouldDisplayOptionsAsHierarchy":{"type":"boolean","description":"Whether the options should be displayed as a hierarchy. Defaults to `false`"},"type":{"type":"string"}}}]},"WorkflowInputEntityFilter":{"type":"object","properties":{"domainIds":{"type":"array","description":"Restrict options to entities related to the provided domains","items":{"type":"string","description":"Restrict options to entities related to the provided domains"}},"emailOwners":{"type":"array","description":"Restrict options to entities owned by the provided users","items":{"type":"string","description":"Restrict options to entities owned by the provided users"}},"excludedGroupTags":{"type":"array","description":"Restrict options to entities in the provided groups","items":{"type":"string","description":"Restrict options to entities in the provided groups"}},"groupTags":{"type":"array","description":"Restrict options to entities not in the provided groups","items":{"type":"string","description":"Restrict options to entities not in the provided groups"}},"teamIds":{"type":"array","description":"Restrict options to entities owned by the provided teams","items":{"type":"string","description":"Restrict options to entities owned by the provided teams"}},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the input"},"EntityTypeFilter1":{"required":["types"],"type":"object","properties":{"types":{"uniqueItems":true,"type":"array","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities","items":{"type":"string","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities"}}}},"WorkflowInput.CORTEX_USER_FIELD":{"title":"CORTEX_USER_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"$ref":"#/components/schemas/CortexUserIdentity"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputUserFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"CortexUserIdentity":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"name":{"type":"string","description":"The name of the user"}},"description":"The default value for the input"},"WorkflowInputUserFilter":{"type":"object","properties":{"teamCids":{"type":"array","description":"Restrict options to users on the provided teams","items":{"type":"string","description":"Restrict options to users on the provided teams"}},"userEmails":{"type":"array","description":"Restrict options to users with the provided emails","items":{"type":"string","description":"Restrict options to users with the provided emails"}}},"description":"The user filter for the input"},"WorkflowInput.SLACK_FIELD":{"title":"SLACK_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputSlackFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInputSlackFilter":{"required":["channels"],"type":"object","properties":{"channels":{"type":"array","description":"Restrict options to the provided channels","items":{"type":"string","description":"Restrict options to the provided channels"}}},"description":"The filters for the input"},"WorkflowInput.SECRET_FIELD":{"title":"SECRET_FIELD","required":["disabled","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.NUMBER_FIELD":{"title":"NUMBER_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"number","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The number format of the input","enum":["INTEGER","DECIMAL"]},"key":{"type":"string","description":"The key of the input"},"max":{"type":"number","description":"The maximum value of the input"},"min":{"type":"number","description":"The minimum value of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.DATE_FIELD":{"title":"DATE_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The date format of the input","enum":["DATE","DATETIME"]},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JQ":{"title":"JQ","required":["expression","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"expression":{"type":"string","description":"The JQ expression for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SLACK":{"title":"SLACK","required":["channel","message","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channel":{"type":"string","description":"The channel name to send the message to, without the `#`. For example for `#general` use `general`"},"message":{"type":"string","description":"The message to send"},"type":{"type":"string"}}}]},"WorkflowActionSchema.MANUAL_APPROVAL":{"title":"MANUAL_APPROVAL","required":["approvingTeamIds","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"approverDescription":{"type":"string","description":"A description that will be shown to approvers"},"approvingTeamIds":{"type":"array","description":"The IDs of the teams whose members can approve the action","items":{"type":"string","description":"The IDs of the teams whose members can approve the action"}},"approvingTeamIdsOverride":{"type":"string","description":"The path to the override value in the workflow context that resolves the approving teams at run time. The value at the path must be an array of team Cortex IDs or team tags."},"type":{"type":"string"}}}]},"WorkflowActionSchema.CONDITIONAL_BRANCH":{"title":"CONDITIONAL_BRANCH","required":["branches","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"branches":{"type":"array","description":"The list of conditional branches that will be evaluated in order","items":{"$ref":"#/components/schemas/Conditional"}},"fallbackBranch":{"$ref":"#/components/schemas/Fallback"},"joiningAction":{"type":"string","description":"The joining action that will run after all branches"},"type":{"type":"string"}}}]},"Conditional":{"required":["expression","name","slug"],"type":"object","properties":{"expression":{"type":"string","description":"The conditional expression for the branch"},"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The list of conditional branches that will be evaluated in order"},"Fallback":{"required":["name","slug"],"type":"object","properties":{"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The fallback branch that will be taken if no other branches evaluate to `true`"},"WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE":{"title":"GITHUB_CREATE_OR_UPDATE_FILE","required":["alias","commitMessage","content","path","repositoryName","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the github configuration to be used"},"author":{"$ref":"#/components/schemas/GithubAuthor"},"branch":{"type":"string","description":"The branch in the repository where the changes will be applied (optional; defaults to the main branch if not specified)"},"commitMessage":{"type":"string","description":"A message describing the purpose of the commit"},"committer":{"$ref":"#/components/schemas/GithubCommitter"},"content":{"type":"string","description":"The content of the file to be created or updated (not base64-encoded)"},"path":{"type":"string","description":"The full path to the file within the repository"},"repositoryName":{"type":"string","description":"The name of the repository where the file is being created or updated"},"type":{"type":"string"}}}]},"GithubAuthor":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the original author of the changes being committed (optional)"},"GithubCommitter":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the person or system making the commit, such as name and email (optional)"},"WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE":{"title":"MS_TEAMS_SEND_MESSAGE","required":["channelId","message","teamId","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channelId":{"type":"string","description":"The channel id to send the message to"},"message":{"type":"string","description":"The message to send"},"teamId":{"type":"string","description":"The team id to send the message to"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JAVASCRIPT":{"title":"JAVASCRIPT","required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"script":{"type":"string","description":"The JavaScript script for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SET_VARIABLES":{"title":"SET_VARIABLES","required":["type","variables"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"type":{"type":"string"},"variables":{"type":"array","description":"The variables to set for the action","items":{"$ref":"#/components/schemas/VariableAssignment"}}}}]},"VariableAssignment":{"required":["slug","source"],"type":"object","properties":{"slug":{"type":"string","description":"The type of the variable"},"source":{"oneOf":[{"$ref":"#/components/schemas/JavaScript"},{"$ref":"#/components/schemas/Reference"}]}},"description":"The variables to set for the action"},"JavaScript":{"required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"script":{"type":"string"}}}]},"VariableSource":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"How to set the variable","discriminator":{"propertyName":"type"}},"Reference":{"required":["path","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"path":{"type":"string"}}}]},"WorkflowActionSchema.AWS":{"title":"AWS","required":["accountId","actionIdentifier","inputs","region","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"accountId":{"type":"string"},"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"region":{"type":"string"},"type":{"type":"string"}}}]},"WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT":{"title":"PAGERDUTY_CREATE_INCIDENT","required":["body","fromEmail","serviceId","title","type","urgency"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"body":{"type":"string","description":"The body of the incident"},"fromEmail":{"type":"string","description":"The email address of a valid user associated with the account making the request"},"incidentTypeName":{"type":"string","description":"The incident type name"},"serviceId":{"type":"string","description":"The ID of the service to create the incident for"},"title":{"type":"string","description":"The title of the incident"},"type":{"type":"string"},"urgency":{"type":"string","description":"The urgency of the incident","enum":["HIGH","LOW"]}}}]},"WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT":{"title":"INCIDENT_IO_CREATE_INCIDENT","required":["alias","entityTag","name","severity","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias of the incident.io configuration to use"},"entityTag":{"type":"string","description":"The tag of the entity whose incident.io custom field registrations are attached to the incident"},"incidentType":{"type":"string","description":"The name of the incident type to create the incident with"},"mode":{"type":"string","description":"The mode of the incident: STANDARD, RETROSPECTIVE, TEST or TUTORIAL"},"name":{"type":"string","description":"The name of the incident"},"severity":{"type":"string","description":"The name of the severity to create the incident with"},"status":{"type":"string","description":"The name of the status to create the incident with"},"summary":{"type":"string","description":"The summary of the incident"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JIRA_CREATE_ISSUE":{"title":"JIRA_CREATE_ISSUE","required":["alias","components","description","fields","issueSummary","issueType","labels","projectKey","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the Jira configuration that will be used."},"assignee":{"type":"string","description":"The identifier of the assignee for the Jira issue. This field is optional."},"components":{"type":"array","description":"A list of components within the Jira project to which the issue belongs. This field is optional.","items":{"type":"string","description":"A list of components within the Jira project to which the issue belongs. This field is optional."}},"description":{"type":"string","description":"A detailed description of the issue, providing more context about what needs to be addressed."},"fields":{"type":"object","additionalProperties":{"type":"object","description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"issueSummary":{"type":"string","description":"A brief summary of the issue being created, typically representing the title of the issue."},"issueType":{"type":"string","description":"The type of the issue being created, such as 'Bug', 'Task', or 'Story'."},"labels":{"type":"array","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional.","items":{"type":"string","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional."}},"priority":{"type":"string","description":"The priority of the issue, such as 'High', 'Medium', or 'Low'. This field is optional."},"projectKey":{"type":"string","description":"The key of the Jira project where the issue will be created. Typically a short code like 'PROJ'."},"reporter":{"type":"string","description":"The identifier of the reporter who is raising the Jira issue. This field is optional."},"type":{"type":"string"}}}]},"WorkflowActionSchema.RUN_WORKFLOW":{"title":"RUN_WORKFLOW","required":["type","workflowId"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"entityId":{"type":"string","description":"The ID of the entity"},"type":{"type":"string"},"workflowId":{"type":"string","description":"The ID of the workflow to run"}}}]},"User":{"required":["name"],"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"name":{"type":"string","description":"Name"}}},"WorkflowFilter":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the workflow filter","enum":["GLOBAL","ENTITY"]}},"description":"Filter to determine in what entity contexts the workflow can run","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowFilter.GLOBAL"},{"$ref":"#/components/schemas/WorkflowFilter.ENTITY"}]},"WorkflowFilter.GLOBAL":{"title":"GLOBAL","required":["type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowFilter"}]},"WorkflowFilter.ENTITY":{"title":"ENTITY","required":["ownershipScope","requiredTeamRoles","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowFilter"},{"type":"object","properties":{"entityFilter":{"$ref":"#/components/schemas/CompoundFilter"},"ownershipScope":{"type":"string","description":"The ownership scope for the workflow","enum":["ALL","OWNER","EDITOR"]},"requiredTeamRoles":{"type":"array","description":"Tags of the team roles required to run the workflow. When non-empty, the runner must hold at least one of them on a team that owns the entity, in addition to what `ownershipScope` already requires. Only valid alongside an `ownershipScope` other than `ALL`.","items":{"type":"string","description":"Tags of the team roles required to run the workflow. When non-empty, the runner must hold at least one of them on a team that owns the entity, in addition to what `ownershipScope` already requires. Only valid alongside an `ownershipScope` other than `ALL`."}}}}]},"CompoundFilter":{"type":"object","properties":{"entityGroupFilter":{"$ref":"#/components/schemas/EntityGroupFilterDTO1"},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the workflow"},"EntityGroupFilterDTO1":{"required":["entityGroups","excludedEntityGroups"],"type":"object","properties":{"entityGroups":{"uniqueItems":true,"type":"array","description":"The entity groups to include","items":{"type":"string","description":"The entity groups to include"}},"excludedEntityGroups":{"uniqueItems":true,"type":"array","description":"The entity groups to exclude","items":{"type":"string","description":"The entity groups to exclude"}}},"description":"The entity group filter for the entity"},"RestrictionPolicyRelationship":{"required":["id","type"],"type":"object","properties":{"id":{"type":"string","description":"ID of the principal allowed to run the workflow"},"type":{"type":"string","description":"Type of the principal allowed to run the workflow","enum":["USER","TEAM","CUSTOM_ROLE"]}},"description":"List of restriction policies for the workflow"},"WorkflowVariable":{"required":["slug","type"],"type":"object","properties":{"defaultValue":{"$ref":"#/components/schemas/JsonNode"},"description":{"type":"string","description":"The description of the variable"},"slug":{"type":"string","description":"The slug of the variable"},"type":{"type":"string","description":"The type of the variable","enum":["STRING","NUMBER","BOOLEAN","OBJECT","ARRAY_OF_STRING","ARRAY_OF_NUMBER","ARRAY_OF_BOOLEAN","ARRAY_OF_OBJECT"]}},"description":"List of variable definitions for the workflow"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows":{"post":{"description":"Create or update new workflow.\n\nAPI key must have the `Edit workflows` permission.\n\n**Note:** If a workflow with the same tag already exists, it will be updated.","operationId":"createOrUpdateWorkflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinition"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/WorkflowDefinition"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinition"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/WorkflowDefinition"}}},"description":"Workflow created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Create or update workflow","tags":["Workflows"]}}}}
```

## Validates YAML descriptor

> Validates YAML descriptor.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"OpenApiResponse":{"required":["ok","violations"],"type":"object","properties":{"ok":{"type":"boolean"},"violations":{"type":"array","items":{"$ref":"#/components/schemas/ViolationDTO"}}}},"ViolationDTO":{"required":["paths"],"type":"object","properties":{"description":{"type":"string"},"endLine":{"type":"integer","format":"int32"},"paths":{"type":"array","items":{"type":"string"}},"pointer":{"type":"string"},"ruleLink":{"type":"string"},"startLine":{"type":"integer","format":"int32"},"title":{"type":"string"},"violationType":{"type":"string","enum":["MUST","SHOULD","MAY","HINT"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows/validate":{"post":{"description":"Validates YAML descriptor.","operationId":"validateWorkflowDescriptor","requestBody":{"content":{"application/json":{"schema":{"type":"string"}},"application/yaml":{"schema":{"type":"string"}}},"description":"Raw text of the YAML"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiResponse"}}},"description":"Validation result"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Validates YAML descriptor","tags":["Workflows"]}}}}
```

## Update asynchronous HTTP request Workflow block

> Updates an asynchronous HTTP request Workflow block.\
> \
> API key must have the \`Edit workflow runs\` permission.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"CallbackRequest":{"required":["message","status"],"type":"object","properties":{"message":{"type":"string","description":"Human readable message to be shown to the user"},"response":{"type":"object","additionalProperties":{"type":"object","description":"Response from the callback request. If set, must be a JSON object"},"description":"Response from the callback request. If set, must be a JSON object"},"status":{"type":"string","description":"Status of the callback request. `UPDATE` keeps the workflow paused","enum":["SUCCESS","FAILURE","UPDATE"]}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows/{tagOrId}/callback/{callbackId}":{"post":{"description":"Updates an asynchronous HTTP request Workflow block.\n\nAPI key must have the `Edit workflow runs` permission.","operationId":"workflowsAsyncHttpCallback","parameters":[{"description":"The tag or unique, auto-generated identifier for the workflow.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"description":"Callback ID; Provided by the Workflow block when it runs","in":"path","name":"callbackId","required":true,"schema":{"type":"string","description":"Callback ID; Provided by the Workflow block when it runs"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackRequest"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/CallbackRequest"}}},"required":true},"responses":{"200":{"description":"Successfully received Workflow callback"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workflow run or block not found"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workflow block is not waiting for callback"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Update asynchronous HTTP request Workflow block","tags":["Workflows"]}}}}
```

## Delete workflow

> Delete workflow by tag or ID.\
> \
> API key must have the \`Edit workflows\` permission.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows/{tagOrId}":{"delete":{"description":"Delete workflow by tag or ID.\n\nAPI key must have the `Edit workflows` permission.","operationId":"deleteWorkflow","parameters":[{"description":"The tag or unique, auto-generated identifier for the workflow.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"responses":{"200":{"description":"Workflow deleted successfully"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workflow not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Delete workflow","tags":["Workflows"]}}}}
```

## Run a workflow

> Start a new run for a workflow.\
> \
> API key must have the \`Run workflows\` permission and the workflow must be runnable via API

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"WorkflowRunRequest":{"required":["scope"],"type":"object","properties":{"initialContext":{"$ref":"#/components/schemas/JsonNode"},"notificationRecipients":{"type":"array","description":"List of email addresses to notify of workflow updates.","items":{"type":"string","description":"List of email addresses to notify of workflow updates."}},"runAs":{"type":"string","description":"User's email to run the workflow as"},"scope":{"oneOf":[{"$ref":"#/components/schemas/Entity"},{"$ref":"#/components/schemas/Global"}]}}},"JsonNode":{"type":"object"},"Entity":{"required":["archived","cid","name","tag","type"],"type":"object","description":"Catalog entity (service, resource, or domain) owned by the user","allOf":[{"$ref":"#/components/schemas/MyWorkspaceItem"},{"type":"object","properties":{"archived":{"type":"boolean","description":"Whether the entity is archived"},"cid":{"type":"string","description":"Entity CID"},"name":{"type":"string","description":"Entity name"},"tag":{"type":"string","description":"Entity tag"},"type":{"type":"string","description":"Entity type (service, resource, domain)"}}}]},"MyWorkspaceItem":{"required":["itemType"],"type":"object","properties":{"itemType":{"type":"string"}},"description":"Item returned in My Workspace response - type varies by resourceType","discriminator":{"mapping":{"entity":"#/components/schemas/Entity","pull_request":"#/components/schemas/PullRequest","review_request":"#/components/schemas/ReviewRequest","scorecard":"#/components/schemas/Scorecard","team":"#/components/schemas/Team","work_item":"#/components/schemas/WorkItem"},"propertyName":"itemType"},"oneOf":[{"$ref":"#/components/schemas/Entity"},{"$ref":"#/components/schemas/Team"},{"$ref":"#/components/schemas/Scorecard"},{"$ref":"#/components/schemas/PullRequest"},{"$ref":"#/components/schemas/ReviewRequest"},{"$ref":"#/components/schemas/WorkItem"}]},"Team":{"required":["cid","name","tag"],"type":"object","description":"Team that the user belongs to","allOf":[{"$ref":"#/components/schemas/MyWorkspaceItem"},{"type":"object","properties":{"cid":{"type":"string","description":"Team CID"},"description":{"type":"string","description":"Team description"},"members":{"type":"array","description":"Team members (only populated if includeMembers is true)","items":{"$ref":"#/components/schemas/TeamMember"}},"name":{"type":"string","description":"Team name"},"tag":{"type":"string","description":"Team tag"}}}]},"TeamMember":{"required":["roles","sources"],"type":"object","properties":{"description":{"type":"string","description":"Description of the team member"},"email":{"type":"string","description":"Email of the team member"},"name":{"type":"string","description":"Name of the team member"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberSource"}}},"description":"Team member information"},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"TeamMemberSource":{"required":["type"],"type":"object","properties":{"externalGroupId":{"type":"string"},"externalId":{"type":"string"},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","BAMBOO_HR","GITHUB","GITLAB","GOOGLE","OKTA","OPSGENIE","WORKDAY","SERVICE_NOW"]},"type":{"type":"string","enum":["ENTITY_DEFINED","IDP_GROUP"]}}},"Scorecard":{"required":["draft","name","tag"],"type":"object","description":"Scorecard associated with user's entities","allOf":[{"$ref":"#/components/schemas/MyWorkspaceItem"},{"type":"object","properties":{"description":{"type":"string","description":"Scorecard description"},"draft":{"type":"boolean","description":"Whether the scorecard is a draft"},"name":{"type":"string","description":"Scorecard name"},"tag":{"type":"string","description":"Scorecard tag"}}}]},"PullRequest":{"required":["dateOpened","entityCids","entityIds","isComplex","isDraft","isOld","isQuick","lastUpdated","numComments","numReviewers","pullRequest","repository","source","status"],"type":"object","description":"Pull request authored by the user","allOf":[{"$ref":"#/components/schemas/MyWorkspaceItem"},{"type":"object","properties":{"dateOpened":{"type":"string","description":"Date the PR was opened"},"entityCids":{"type":"array","description":"CIDs of entities associated with this PR","items":{"type":"string","description":"CIDs of entities associated with this PR"}},"entityIds":{"type":"array","description":"IDs of entities associated with this PR","items":{"type":"integer","description":"IDs of entities associated with this PR","format":"int64"}},"isComplex":{"type":"boolean","description":"Whether the PR is considered complex"},"isDraft":{"type":"boolean","description":"Whether the PR is a draft"},"isOld":{"type":"boolean","description":"Whether the PR is considered old"},"isQuick":{"type":"boolean","description":"Whether the PR is considered quick"},"lastUpdated":{"type":"string","description":"Last update timestamp"},"numComments":{"type":"integer","description":"Number of comments","format":"int32"},"numFilesChanged":{"type":"integer","description":"Number of files changed","format":"int32"},"numLinesAdded":{"type":"integer","description":"Number of lines added","format":"int32"},"numLinesDeleted":{"type":"integer","description":"Number of lines deleted","format":"int32"},"numReviewers":{"type":"integer","description":"Number of reviewers","format":"int32"},"pullRequest":{"$ref":"#/components/schemas/PullRequestInfo"},"repository":{"$ref":"#/components/schemas/RepositoryInfo"},"source":{"type":"string","description":"Git provider (GitHub, GitLab, etc.)","enum":["AZURE_DEVOPS","BITBUCKET","GITHUB","GITLAB"]},"status":{"type":"string","description":"Review status","enum":["APPROVED","CHANGES_REQUESTED","REVIEW_REQUIRED"]}}}]},"PullRequestInfo":{"required":["number","title","url"],"type":"object","properties":{"number":{"type":"integer","description":"PR number","format":"int64"},"title":{"type":"string","description":"PR title"},"url":{"type":"string","description":"PR URL"}},"description":"Pull request details"},"RepositoryInfo":{"required":["name","url"],"type":"object","properties":{"name":{"type":"string","description":"Repository name"},"url":{"type":"string","description":"Repository URL"}},"description":"Repository details"},"ReviewRequest":{"required":["dateOpened","entityCids","entityIds","isComplex","isDraft","isOld","isQuick","lastUpdated","numComments","numReviewers","pullRequest","repository","source","status"],"type":"object","description":"Pull request where the user is requested as a reviewer","allOf":[{"$ref":"#/components/schemas/MyWorkspaceItem"},{"type":"object","properties":{"dateOpened":{"type":"string","description":"Date the PR was opened"},"entityCids":{"type":"array","description":"CIDs of entities associated with this PR","items":{"type":"string","description":"CIDs of entities associated with this PR"}},"entityIds":{"type":"array","description":"IDs of entities associated with this PR","items":{"type":"integer","description":"IDs of entities associated with this PR","format":"int64"}},"isComplex":{"type":"boolean","description":"Whether the PR is considered complex"},"isDraft":{"type":"boolean","description":"Whether the PR is a draft"},"isOld":{"type":"boolean","description":"Whether the PR is considered old"},"isQuick":{"type":"boolean","description":"Whether the PR is considered quick"},"lastUpdated":{"type":"string","description":"Last update timestamp"},"numComments":{"type":"integer","description":"Number of comments","format":"int32"},"numFilesChanged":{"type":"integer","description":"Number of files changed","format":"int32"},"numLinesAdded":{"type":"integer","description":"Number of lines added","format":"int32"},"numLinesDeleted":{"type":"integer","description":"Number of lines deleted","format":"int32"},"numReviewers":{"type":"integer","description":"Number of reviewers","format":"int32"},"pullRequest":{"$ref":"#/components/schemas/PullRequestInfo"},"repository":{"$ref":"#/components/schemas/RepositoryInfo"},"source":{"type":"string","description":"Git provider (GitHub, GitLab, etc.)","enum":["AZURE_DEVOPS","BITBUCKET","GITHUB","GITLAB"]},"status":{"type":"string","description":"Review status","enum":["APPROVED","CHANGES_REQUESTED","REVIEW_REQUIRED"]}}}]},"WorkItem":{"required":["id","source","status","title","url"],"type":"object","description":"Work item (Jira, Linear, Azure DevOps issue) assigned to the user","allOf":[{"$ref":"#/components/schemas/MyWorkspaceItem"},{"type":"object","properties":{"alias":{"type":"string","description":"Work item alias/key"},"dueDate":{"type":"string","description":"Due date","format":"date-time"},"id":{"type":"string","description":"Work item ID"},"project":{"$ref":"#/components/schemas/WorkItemProject"},"source":{"type":"string","description":"Issue tracking system (Jira, Linear, Azure)","enum":["AZURE_DEVOPS_WORK_ITEMS","CLICKUP","GITHUB","JIRA"]},"status":{"$ref":"#/components/schemas/WorkItemStatus"},"title":{"type":"string","description":"Work item title"},"url":{"type":"string","description":"URL to the work item"}}}]},"WorkItemProject":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Project name"},"url":{"type":"string","description":"Project URL"}},"description":"Work item project details"},"WorkItemStatus":{"required":["statusBackgroundColor","statusIconColor","statusText","statusType"],"type":"object","properties":{"statusBackgroundColor":{"type":"string","description":"Status background color"},"statusIconColor":{"type":"string","description":"Status icon color"},"statusText":{"type":"string","description":"Status text"},"statusType":{"type":"string","description":"Status type"}},"description":"Work item status information"},"Global":{"required":["id","last4","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeySummary"}]},"ApiKeySummary":{"required":["id","last4","type"],"type":"object","properties":{"id":{"type":"string"},"last4":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"}},"WorkflowRunDetailsResponse":{"required":["actions","context","id","status","variables","workflow"],"type":"object","properties":{"actions":{"type":"array","description":"Actions and their states","items":{"$ref":"#/components/schemas/ActionRunDetailsResponse"}},"completedAt":{"type":"string","description":"Time the workflow run completed"},"context":{"type":"object","additionalProperties":{"type":"object","description":"Context of the run"},"description":"Context of the run"},"id":{"type":"string","description":"Id of the run"},"initiatedBy":{"oneOf":[{"$ref":"#/components/schemas/ApiKey"},{"$ref":"#/components/schemas/User"}]},"runResponse":{"type":"string"},"startedAt":{"type":"string","description":"Time the workflow run started"},"status":{"type":"string","description":"Status of the workflow run"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowRunDetailsVariableResponse"},"description":"Variable values"},"workflow":{"$ref":"#/components/schemas/WorkflowSummary"}}},"ActionRunDetailsResponse":{"required":["isRootAction","name","outgoingActions","schema","slug","state"],"type":"object","properties":{"completedAt":{"type":"string","description":"Time the action finished running"},"isRootAction":{"type":"boolean","description":"Whether the action is the root action of the workflow. There can be only one root action per workflow"},"name":{"type":"string","description":"The name of the action"},"outgoingActions":{"type":"array","description":"The actions that will be executed after this action","items":{"type":"string","description":"The actions that will be executed after this action"}},"schema":{"$ref":"#/components/schemas/WorkflowActionSchema"},"slug":{"type":"string","description":"The slug of the action"},"startedAt":{"type":"string","description":"Time the action started running"},"state":{"$ref":"#/components/schemas/WorkflowRunActionState"}},"description":"Actions and their states"},"WorkflowActionSchema":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the action"}},"description":"The definition of the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.ADVANCED_HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST_ASYNC"},{"$ref":"#/components/schemas/WorkflowActionSchema.SCAFFOLDER"},{"$ref":"#/components/schemas/WorkflowActionSchema.USER_INPUT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JQ"},{"$ref":"#/components/schemas/WorkflowActionSchema.SLACK"},{"$ref":"#/components/schemas/WorkflowActionSchema.MANUAL_APPROVAL"},{"$ref":"#/components/schemas/WorkflowActionSchema.CONDITIONAL_BRANCH"},{"$ref":"#/components/schemas/WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE"},{"$ref":"#/components/schemas/WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE"},{"$ref":"#/components/schemas/WorkflowActionSchema.JAVASCRIPT"},{"$ref":"#/components/schemas/WorkflowActionSchema.SET_VARIABLES"},{"$ref":"#/components/schemas/WorkflowActionSchema.AWS"},{"$ref":"#/components/schemas/WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JIRA_CREATE_ISSUE"},{"$ref":"#/components/schemas/WorkflowActionSchema.RUN_WORKFLOW"}]},"WorkflowActionSchema.HTTP_REQUEST":{"title":"HTTP_REQUEST","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.ADVANCED_HTTP_REQUEST":{"title":"ADVANCED_HTTP_REQUEST","required":["actionIdentifier","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"integrationAlias":{"type":"string"},"type":{"type":"string"}}}]},"WorkflowActionSchema.HTTP_REQUEST_ASYNC":{"title":"HTTP_REQUEST_ASYNC","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"timeoutInSeconds":{"type":"integer","description":"The timeout for the request in seconds","format":"int32"},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.SCAFFOLDER":{"title":"SCAFFOLDER","required":["inputOverrides","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"createNewRepository":{"type":"boolean","description":"Whether the Scaffolder should create a new repository. Defaults to `true`"},"createService":{"type":"boolean","description":"Whether the cortex service should be created."},"inputOverrides":{"type":"array","description":"The input overrides for the Scaffolder","items":{"$ref":"#/components/schemas/InputOverride"}},"scaffolderTemplateId":{"type":"string","description":"On input, accepts either the tag or the Cortex ID of the Scaffolder template. On output, always the template's Cortex ID, or `null` if the referenced template was deleted."},"scaffolderTemplateTag":{"type":"string","description":"The tag of the Scaffolder template. Preferred over `scaffolderTemplateId` when both are provided, so workflow definitions stay portable across workspaces."},"type":{"type":"string"}}}]},"InputOverride":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input override","enum":["OPTION","VALUE"]}},"description":"The list of overrides for the action inputs","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Option"},{"$ref":"#/components/schemas/Value"}]},"Option":{"required":["inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"Value":{"required":["editable","inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"editable":{"type":"boolean","description":"Whether the override is editable by the user. Defaults to `false`. If set to `true` it'll pause the execution of the workflow and wait for the user to provide the value"},"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"WorkflowActionSchema.USER_INPUT":{"title":"USER_INPUT","required":["inputOverrides","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"inputOverrides":{"type":"array","description":"The list of overrides for the action inputs","items":{"$ref":"#/components/schemas/InputOverride"}},"inputs":{"type":"array","description":"The list of inputs required for the action","items":{"$ref":"#/components/schemas/WorkflowInput"}},"jsValidatorScript":{"type":"string","description":"Optional JavaScript validator script to validate the provided inputs"},"type":{"type":"string"}}}]},"WorkflowInput":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input","enum":["INPUT_FIELD","TEXTAREA_FIELD","SELECT_FIELD","MULTISELECT_FIELD","TOGGLE_FIELD","CORTEX_ENTITY_FIELD","CORTEX_USER_FIELD","SLACK_FIELD","SECRET_FIELD","NUMBER_FIELD","DATE_FIELD","NESTED_FORM_FIELD"]}},"description":"The list of inputs required for the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowInput.INPUT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TEXTAREA_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.MULTISELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TOGGLE_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_ENTITY_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_USER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SLACK_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SECRET_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.NUMBER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.DATE_FIELD"}]},"WorkflowInput.INPUT_FIELD":{"title":"INPUT_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.TEXTAREA_FIELD":{"title":"TEXTAREA_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.SELECT_FIELD":{"title":"SELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.MULTISELECT_FIELD":{"title":"MULTISELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.TOGGLE_FIELD":{"title":"TOGGLE_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"boolean","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.CORTEX_ENTITY_FIELD":{"title":"CORTEX_ENTITY_FIELD","required":["allowMultiple","entityFilter","key","limitEntitiesToRunnerUserScope","name","required","shouldDisplayOptionsAsHierarchy","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"entityFilter":{"$ref":"#/components/schemas/WorkflowInputEntityFilter"},"key":{"type":"string","description":"The key of the input"},"limitEntitiesToRunnerUserScope":{"type":"boolean","description":"Whether to limit entity options to the workflow runner's entities. Defaults to `false`"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"shouldDisplayOptionsAsHierarchy":{"type":"boolean","description":"Whether the options should be displayed as a hierarchy. Defaults to `false`"},"type":{"type":"string"}}}]},"WorkflowInputEntityFilter":{"type":"object","properties":{"domainIds":{"type":"array","description":"Restrict options to entities related to the provided domains","items":{"type":"string","description":"Restrict options to entities related to the provided domains"}},"emailOwners":{"type":"array","description":"Restrict options to entities owned by the provided users","items":{"type":"string","description":"Restrict options to entities owned by the provided users"}},"excludedGroupTags":{"type":"array","description":"Restrict options to entities in the provided groups","items":{"type":"string","description":"Restrict options to entities in the provided groups"}},"groupTags":{"type":"array","description":"Restrict options to entities not in the provided groups","items":{"type":"string","description":"Restrict options to entities not in the provided groups"}},"teamIds":{"type":"array","description":"Restrict options to entities owned by the provided teams","items":{"type":"string","description":"Restrict options to entities owned by the provided teams"}},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the input"},"EntityTypeFilter1":{"required":["types"],"type":"object","properties":{"types":{"uniqueItems":true,"type":"array","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities","items":{"type":"string","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities"}}}},"WorkflowInput.CORTEX_USER_FIELD":{"title":"CORTEX_USER_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"$ref":"#/components/schemas/CortexUserIdentity"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputUserFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"CortexUserIdentity":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"name":{"type":"string","description":"The name of the user"}},"description":"The default value for the input"},"WorkflowInputUserFilter":{"type":"object","properties":{"teamCids":{"type":"array","description":"Restrict options to users on the provided teams","items":{"type":"string","description":"Restrict options to users on the provided teams"}},"userEmails":{"type":"array","description":"Restrict options to users with the provided emails","items":{"type":"string","description":"Restrict options to users with the provided emails"}}},"description":"The user filter for the input"},"WorkflowInput.SLACK_FIELD":{"title":"SLACK_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputSlackFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInputSlackFilter":{"required":["channels"],"type":"object","properties":{"channels":{"type":"array","description":"Restrict options to the provided channels","items":{"type":"string","description":"Restrict options to the provided channels"}}},"description":"The filters for the input"},"WorkflowInput.SECRET_FIELD":{"title":"SECRET_FIELD","required":["disabled","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.NUMBER_FIELD":{"title":"NUMBER_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"number","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The number format of the input","enum":["INTEGER","DECIMAL"]},"key":{"type":"string","description":"The key of the input"},"max":{"type":"number","description":"The maximum value of the input"},"min":{"type":"number","description":"The minimum value of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.DATE_FIELD":{"title":"DATE_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The date format of the input","enum":["DATE","DATETIME"]},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JQ":{"title":"JQ","required":["expression","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"expression":{"type":"string","description":"The JQ expression for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SLACK":{"title":"SLACK","required":["channel","message","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channel":{"type":"string","description":"The channel name to send the message to, without the `#`. For example for `#general` use `general`"},"message":{"type":"string","description":"The message to send"},"type":{"type":"string"}}}]},"WorkflowActionSchema.MANUAL_APPROVAL":{"title":"MANUAL_APPROVAL","required":["approvingTeamIds","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"approverDescription":{"type":"string","description":"A description that will be shown to approvers"},"approvingTeamIds":{"type":"array","description":"The IDs of the teams whose members can approve the action","items":{"type":"string","description":"The IDs of the teams whose members can approve the action"}},"approvingTeamIdsOverride":{"type":"string","description":"The path to the override value in the workflow context that resolves the approving teams at run time. The value at the path must be an array of team Cortex IDs or team tags."},"type":{"type":"string"}}}]},"WorkflowActionSchema.CONDITIONAL_BRANCH":{"title":"CONDITIONAL_BRANCH","required":["branches","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"branches":{"type":"array","description":"The list of conditional branches that will be evaluated in order","items":{"$ref":"#/components/schemas/Conditional"}},"fallbackBranch":{"$ref":"#/components/schemas/Fallback"},"joiningAction":{"type":"string","description":"The joining action that will run after all branches"},"type":{"type":"string"}}}]},"Conditional":{"required":["expression","name","slug"],"type":"object","properties":{"expression":{"type":"string","description":"The conditional expression for the branch"},"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The list of conditional branches that will be evaluated in order"},"Fallback":{"required":["name","slug"],"type":"object","properties":{"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The fallback branch that will be taken if no other branches evaluate to `true`"},"WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE":{"title":"GITHUB_CREATE_OR_UPDATE_FILE","required":["alias","commitMessage","content","path","repositoryName","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the github configuration to be used"},"author":{"$ref":"#/components/schemas/GithubAuthor"},"branch":{"type":"string","description":"The branch in the repository where the changes will be applied (optional; defaults to the main branch if not specified)"},"commitMessage":{"type":"string","description":"A message describing the purpose of the commit"},"committer":{"$ref":"#/components/schemas/GithubCommitter"},"content":{"type":"string","description":"The content of the file to be created or updated (not base64-encoded)"},"path":{"type":"string","description":"The full path to the file within the repository"},"repositoryName":{"type":"string","description":"The name of the repository where the file is being created or updated"},"type":{"type":"string"}}}]},"GithubAuthor":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the original author of the changes being committed (optional)"},"GithubCommitter":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the person or system making the commit, such as name and email (optional)"},"WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE":{"title":"MS_TEAMS_SEND_MESSAGE","required":["channelId","message","teamId","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channelId":{"type":"string","description":"The channel id to send the message to"},"message":{"type":"string","description":"The message to send"},"teamId":{"type":"string","description":"The team id to send the message to"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JAVASCRIPT":{"title":"JAVASCRIPT","required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"script":{"type":"string","description":"The JavaScript script for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SET_VARIABLES":{"title":"SET_VARIABLES","required":["type","variables"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"type":{"type":"string"},"variables":{"type":"array","description":"The variables to set for the action","items":{"$ref":"#/components/schemas/VariableAssignment"}}}}]},"VariableAssignment":{"required":["slug","source"],"type":"object","properties":{"slug":{"type":"string","description":"The type of the variable"},"source":{"oneOf":[{"$ref":"#/components/schemas/JavaScript"},{"$ref":"#/components/schemas/Reference"}]}},"description":"The variables to set for the action"},"JavaScript":{"required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"script":{"type":"string"}}}]},"VariableSource":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"How to set the variable","discriminator":{"propertyName":"type"}},"Reference":{"required":["path","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"path":{"type":"string"}}}]},"WorkflowActionSchema.AWS":{"title":"AWS","required":["accountId","actionIdentifier","inputs","region","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"accountId":{"type":"string"},"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"region":{"type":"string"},"type":{"type":"string"}}}]},"WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT":{"title":"PAGERDUTY_CREATE_INCIDENT","required":["body","fromEmail","serviceId","title","type","urgency"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"body":{"type":"string","description":"The body of the incident"},"fromEmail":{"type":"string","description":"The email address of a valid user associated with the account making the request"},"incidentTypeName":{"type":"string","description":"The incident type name"},"serviceId":{"type":"string","description":"The ID of the service to create the incident for"},"title":{"type":"string","description":"The title of the incident"},"type":{"type":"string"},"urgency":{"type":"string","description":"The urgency of the incident","enum":["HIGH","LOW"]}}}]},"WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT":{"title":"INCIDENT_IO_CREATE_INCIDENT","required":["alias","entityTag","name","severity","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias of the incident.io configuration to use"},"entityTag":{"type":"string","description":"The tag of the entity whose incident.io custom field registrations are attached to the incident"},"incidentType":{"type":"string","description":"The name of the incident type to create the incident with"},"mode":{"type":"string","description":"The mode of the incident: STANDARD, RETROSPECTIVE, TEST or TUTORIAL"},"name":{"type":"string","description":"The name of the incident"},"severity":{"type":"string","description":"The name of the severity to create the incident with"},"status":{"type":"string","description":"The name of the status to create the incident with"},"summary":{"type":"string","description":"The summary of the incident"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JIRA_CREATE_ISSUE":{"title":"JIRA_CREATE_ISSUE","required":["alias","components","description","fields","issueSummary","issueType","labels","projectKey","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the Jira configuration that will be used."},"assignee":{"type":"string","description":"The identifier of the assignee for the Jira issue. This field is optional."},"components":{"type":"array","description":"A list of components within the Jira project to which the issue belongs. This field is optional.","items":{"type":"string","description":"A list of components within the Jira project to which the issue belongs. This field is optional."}},"description":{"type":"string","description":"A detailed description of the issue, providing more context about what needs to be addressed."},"fields":{"type":"object","additionalProperties":{"type":"object","description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"issueSummary":{"type":"string","description":"A brief summary of the issue being created, typically representing the title of the issue."},"issueType":{"type":"string","description":"The type of the issue being created, such as 'Bug', 'Task', or 'Story'."},"labels":{"type":"array","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional.","items":{"type":"string","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional."}},"priority":{"type":"string","description":"The priority of the issue, such as 'High', 'Medium', or 'Low'. This field is optional."},"projectKey":{"type":"string","description":"The key of the Jira project where the issue will be created. Typically a short code like 'PROJ'."},"reporter":{"type":"string","description":"The identifier of the reporter who is raising the Jira issue. This field is optional."},"type":{"type":"string"}}}]},"WorkflowActionSchema.RUN_WORKFLOW":{"title":"RUN_WORKFLOW","required":["type","workflowId"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"entityId":{"type":"string","description":"The ID of the entity"},"type":{"type":"string"},"workflowId":{"type":"string","description":"The ID of the workflow to run"}}}]},"WorkflowRunActionState":{"required":["status"],"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"status":{"type":"string","enum":["NOT_INITIATED","COMPLETED","FAILED","IN_PROGRESS","PAUSED","CANCELED","TIMED_OUT"]},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}}},"description":"Running state of action","discriminator":{"propertyName":"status"},"oneOf":[{"$ref":"#/components/schemas/WorkflowRunActionState.NotInitiated"},{"$ref":"#/components/schemas/WorkflowRunActionState.InProgress"},{"$ref":"#/components/schemas/WorkflowRunActionState.Paused"},{"$ref":"#/components/schemas/WorkflowRunActionState.TimedOut"},{"$ref":"#/components/schemas/WorkflowRunActionState.Failed"},{"$ref":"#/components/schemas/WorkflowRunActionState.Canceled"},{"$ref":"#/components/schemas/WorkflowRunActionState.Completed"}]},"WorkflowRunActionState.NotInitiated":{"title":"NotInitiated","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"}]},"WorkflowRunActionState.InProgress":{"title":"InProgress","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Paused":{"title":"Paused","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.TimedOut":{"title":"TimedOut","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Failed":{"title":"Failed","required":["errorMessage","status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"errorMessage":{"type":"string","description":"Error from the failed action"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Canceled":{"title":"Canceled","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Completed":{"title":"Completed","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"ApiKey":{"required":["type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunInitiatorResponse"},{"type":"object","properties":{"apiKey":{"oneOf":[{"$ref":"#/components/schemas/Global"},{"$ref":"#/components/schemas/Personal"}]}}}]},"WorkflowRunInitiatorResponse":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"Who initiated the workflow run","discriminator":{"propertyName":"type"}},"Personal":{"required":["id","last4","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeySummary"},{"type":"object","properties":{"user":{"$ref":"#/components/schemas/CortexUserSummary"}}}]},"CortexUserSummary":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The user who verified the entity. Null while the status is PENDING, and null when a global API key verified it."},"User":{"required":["name"],"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"name":{"type":"string","description":"Name"}}},"WorkflowRunDetailsVariableResponse":{"required":["type","value"],"type":"object","properties":{"type":{"type":"string","description":"The type of the variable"},"value":{"$ref":"#/components/schemas/JsonNode"}},"description":"Variable values"},"WorkflowSummary":{"required":["cid","name"],"type":"object","properties":{"cid":{"type":"string","description":"The id of the workflow"},"name":{"type":"string","description":"The slug of the workflow"}},"description":"Summary of the workflow"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows/{tagOrId}/runs":{"post":{"description":"Start a new run for a workflow.\n\nAPI key must have the `Run workflows` permission and the workflow must be runnable via API","operationId":"runWorkflow","parameters":[{"description":"The tag or unique, auto-generated identifier for the workflow.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunDetailsResponse"}}},"description":"Workflow run started successfully"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied or running workflow is disabled"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workflow not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Run a workflow","tags":["Workflows"]}}}}
```

## Get workflow run details

> Retrieve details of a specific workflow run.\
> \
> API key must have the \`View workflow runs\` permission.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"WorkflowRunDetailsResponse":{"required":["actions","context","id","status","variables","workflow"],"type":"object","properties":{"actions":{"type":"array","description":"Actions and their states","items":{"$ref":"#/components/schemas/ActionRunDetailsResponse"}},"completedAt":{"type":"string","description":"Time the workflow run completed"},"context":{"type":"object","additionalProperties":{"type":"object","description":"Context of the run"},"description":"Context of the run"},"id":{"type":"string","description":"Id of the run"},"initiatedBy":{"oneOf":[{"$ref":"#/components/schemas/ApiKey"},{"$ref":"#/components/schemas/User"}]},"runResponse":{"type":"string"},"startedAt":{"type":"string","description":"Time the workflow run started"},"status":{"type":"string","description":"Status of the workflow run"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowRunDetailsVariableResponse"},"description":"Variable values"},"workflow":{"$ref":"#/components/schemas/WorkflowSummary"}}},"ActionRunDetailsResponse":{"required":["isRootAction","name","outgoingActions","schema","slug","state"],"type":"object","properties":{"completedAt":{"type":"string","description":"Time the action finished running"},"isRootAction":{"type":"boolean","description":"Whether the action is the root action of the workflow. There can be only one root action per workflow"},"name":{"type":"string","description":"The name of the action"},"outgoingActions":{"type":"array","description":"The actions that will be executed after this action","items":{"type":"string","description":"The actions that will be executed after this action"}},"schema":{"$ref":"#/components/schemas/WorkflowActionSchema"},"slug":{"type":"string","description":"The slug of the action"},"startedAt":{"type":"string","description":"Time the action started running"},"state":{"$ref":"#/components/schemas/WorkflowRunActionState"}},"description":"Actions and their states"},"WorkflowActionSchema":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the action"}},"description":"The definition of the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.ADVANCED_HTTP_REQUEST"},{"$ref":"#/components/schemas/WorkflowActionSchema.HTTP_REQUEST_ASYNC"},{"$ref":"#/components/schemas/WorkflowActionSchema.SCAFFOLDER"},{"$ref":"#/components/schemas/WorkflowActionSchema.USER_INPUT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JQ"},{"$ref":"#/components/schemas/WorkflowActionSchema.SLACK"},{"$ref":"#/components/schemas/WorkflowActionSchema.MANUAL_APPROVAL"},{"$ref":"#/components/schemas/WorkflowActionSchema.CONDITIONAL_BRANCH"},{"$ref":"#/components/schemas/WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE"},{"$ref":"#/components/schemas/WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE"},{"$ref":"#/components/schemas/WorkflowActionSchema.JAVASCRIPT"},{"$ref":"#/components/schemas/WorkflowActionSchema.SET_VARIABLES"},{"$ref":"#/components/schemas/WorkflowActionSchema.AWS"},{"$ref":"#/components/schemas/WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT"},{"$ref":"#/components/schemas/WorkflowActionSchema.JIRA_CREATE_ISSUE"},{"$ref":"#/components/schemas/WorkflowActionSchema.RUN_WORKFLOW"}]},"WorkflowActionSchema.HTTP_REQUEST":{"title":"HTTP_REQUEST","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.ADVANCED_HTTP_REQUEST":{"title":"ADVANCED_HTTP_REQUEST","required":["actionIdentifier","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"integrationAlias":{"type":"string"},"type":{"type":"string"}}}]},"JsonNode":{"type":"object"},"WorkflowActionSchema.HTTP_REQUEST_ASYNC":{"title":"HTTP_REQUEST_ASYNC","required":["headers","httpMethod","type","url"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string","description":"The headers for the HTTP request"},"description":"The headers for the HTTP request"},"httpMethod":{"type":"string","description":"The HTTP method for the request","enum":["GET","POST","PUT","DELETE","PATCH"]},"integration":{"type":"string","description":"The integration to use for authentication","enum":["AzureDevops","Bitbucket","GitHub","LaunchDarkly","ServiceNow","GitLab","Pagerduty","Slack","Cortex","Jenkins","Google","Harness"]},"integrationAlias":{"type":"string","description":"The alias of the integration configuration to use"},"payload":{"type":"string","description":"The payload for the request"},"targetHost":{"type":"string","description":"The *.googleapis.com host to target when using the Google Cloud integration. Setting this with any other integration is rejected as invalid. Defaults to cloudresourcemanager.googleapis.com when unset."},"timeoutInSeconds":{"type":"integer","description":"The timeout for the request in seconds","format":"int32"},"type":{"type":"string"},"url":{"type":"string","description":"The URL for the request"}}}]},"WorkflowActionSchema.SCAFFOLDER":{"title":"SCAFFOLDER","required":["inputOverrides","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"createNewRepository":{"type":"boolean","description":"Whether the Scaffolder should create a new repository. Defaults to `true`"},"createService":{"type":"boolean","description":"Whether the cortex service should be created."},"inputOverrides":{"type":"array","description":"The input overrides for the Scaffolder","items":{"$ref":"#/components/schemas/InputOverride"}},"scaffolderTemplateId":{"type":"string","description":"On input, accepts either the tag or the Cortex ID of the Scaffolder template. On output, always the template's Cortex ID, or `null` if the referenced template was deleted."},"scaffolderTemplateTag":{"type":"string","description":"The tag of the Scaffolder template. Preferred over `scaffolderTemplateId` when both are provided, so workflow definitions stay portable across workspaces."},"type":{"type":"string"}}}]},"InputOverride":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input override","enum":["OPTION","VALUE"]}},"description":"The list of overrides for the action inputs","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Option"},{"$ref":"#/components/schemas/Value"}]},"Option":{"required":["inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"Value":{"required":["editable","inputKey","outputVariable","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/InputOverride"},{"type":"object","properties":{"editable":{"type":"boolean","description":"Whether the override is editable by the user. Defaults to `false`. If set to `true` it'll pause the execution of the workflow and wait for the user to provide the value"},"inputKey":{"type":"string","description":"The input key to override"},"outputVariable":{"type":"string","description":"The path to the override value in the workflow context"},"type":{"type":"string"}}}]},"WorkflowActionSchema.USER_INPUT":{"title":"USER_INPUT","required":["inputOverrides","inputs","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"inputOverrides":{"type":"array","description":"The list of overrides for the action inputs","items":{"$ref":"#/components/schemas/InputOverride"}},"inputs":{"type":"array","description":"The list of inputs required for the action","items":{"$ref":"#/components/schemas/WorkflowInput"}},"jsValidatorScript":{"type":"string","description":"Optional JavaScript validator script to validate the provided inputs"},"type":{"type":"string"}}}]},"WorkflowInput":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of the input","enum":["INPUT_FIELD","TEXTAREA_FIELD","SELECT_FIELD","MULTISELECT_FIELD","TOGGLE_FIELD","CORTEX_ENTITY_FIELD","CORTEX_USER_FIELD","SLACK_FIELD","SECRET_FIELD","NUMBER_FIELD","DATE_FIELD","NESTED_FORM_FIELD"]}},"description":"The list of inputs required for the action","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WorkflowInput.INPUT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TEXTAREA_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.MULTISELECT_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.TOGGLE_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_ENTITY_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.CORTEX_USER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SLACK_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.SECRET_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.NUMBER_FIELD"},{"$ref":"#/components/schemas/WorkflowInput.DATE_FIELD"}]},"WorkflowInput.INPUT_FIELD":{"title":"INPUT_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.TEXTAREA_FIELD":{"title":"TEXTAREA_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.SELECT_FIELD":{"title":"SELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.MULTISELECT_FIELD":{"title":"MULTISELECT_FIELD","required":["allowAdditionalOptions","key","name","options","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowAdditionalOptions":{"type":"boolean","description":"Whether additional options are allowed. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"options":{"type":"array","description":"The list of options for the input","items":{"type":"string","description":"The list of options for the input"}},"optionsLabels":{"type":"array","description":"The list of labels for the options. If not provided, the options will be used as labels","items":{"type":"string","description":"The list of labels for the options. If not provided, the options will be used as labels"}},"placeholder":{"type":"string","description":"The placeholder value for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.TOGGLE_FIELD":{"title":"TOGGLE_FIELD","required":["key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"boolean","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.CORTEX_ENTITY_FIELD":{"title":"CORTEX_ENTITY_FIELD","required":["allowMultiple","entityFilter","key","limitEntitiesToRunnerUserScope","name","required","shouldDisplayOptionsAsHierarchy","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"entityFilter":{"$ref":"#/components/schemas/WorkflowInputEntityFilter"},"key":{"type":"string","description":"The key of the input"},"limitEntitiesToRunnerUserScope":{"type":"boolean","description":"Whether to limit entity options to the workflow runner's entities. Defaults to `false`"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"shouldDisplayOptionsAsHierarchy":{"type":"boolean","description":"Whether the options should be displayed as a hierarchy. Defaults to `false`"},"type":{"type":"string"}}}]},"WorkflowInputEntityFilter":{"type":"object","properties":{"domainIds":{"type":"array","description":"Restrict options to entities related to the provided domains","items":{"type":"string","description":"Restrict options to entities related to the provided domains"}},"emailOwners":{"type":"array","description":"Restrict options to entities owned by the provided users","items":{"type":"string","description":"Restrict options to entities owned by the provided users"}},"excludedGroupTags":{"type":"array","description":"Restrict options to entities in the provided groups","items":{"type":"string","description":"Restrict options to entities in the provided groups"}},"groupTags":{"type":"array","description":"Restrict options to entities not in the provided groups","items":{"type":"string","description":"Restrict options to entities not in the provided groups"}},"teamIds":{"type":"array","description":"Restrict options to entities owned by the provided teams","items":{"type":"string","description":"Restrict options to entities owned by the provided teams"}},"typeFilter":{"$ref":"#/components/schemas/EntityTypeFilter1"}},"description":"The entity filter for the input"},"EntityTypeFilter1":{"required":["types"],"type":"object","properties":{"types":{"uniqueItems":true,"type":"array","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities","items":{"type":"string","description":"The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities"}}}},"WorkflowInput.CORTEX_USER_FIELD":{"title":"CORTEX_USER_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"$ref":"#/components/schemas/CortexUserIdentity"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputUserFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"CortexUserIdentity":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"name":{"type":"string","description":"The name of the user"}},"description":"The default value for the input"},"WorkflowInputUserFilter":{"type":"object","properties":{"teamCids":{"type":"array","description":"Restrict options to users on the provided teams","items":{"type":"string","description":"Restrict options to users on the provided teams"}},"userEmails":{"type":"array","description":"Restrict options to users with the provided emails","items":{"type":"string","description":"Restrict options to users with the provided emails"}}},"description":"The user filter for the input"},"WorkflowInput.SLACK_FIELD":{"title":"SLACK_FIELD","required":["allowMultiple","filter","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"allowMultiple":{"type":"boolean","description":"Whether the input allows multiple values. Defaults to `false`"},"defaultValue":{"type":"array","description":"The default value for the input","items":{"type":"string","description":"The default value for the input"}},"description":{"type":"string","description":"The description of the input"},"filter":{"$ref":"#/components/schemas/WorkflowInputSlackFilter"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInputSlackFilter":{"required":["channels"],"type":"object","properties":{"channels":{"type":"array","description":"Restrict options to the provided channels","items":{"type":"string","description":"Restrict options to the provided channels"}}},"description":"The filters for the input"},"WorkflowInput.SECRET_FIELD":{"title":"SECRET_FIELD","required":["disabled","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"},"validationRegex":{"type":"string","description":"The validation regex for the input"}}}]},"WorkflowInput.NUMBER_FIELD":{"title":"NUMBER_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"number","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The number format of the input","enum":["INTEGER","DECIMAL"]},"key":{"type":"string","description":"The key of the input"},"max":{"type":"number","description":"The maximum value of the input"},"min":{"type":"number","description":"The minimum value of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowInput.DATE_FIELD":{"title":"DATE_FIELD","required":["disabled","format","key","name","required","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowInput"},{"type":"object","properties":{"defaultValue":{"type":"string","description":"The default value for the input"},"description":{"type":"string","description":"The description of the input"},"disabled":{"type":"boolean","description":"Whether the input should be disabled"},"format":{"type":"string","description":"The date format of the input","enum":["DATE","DATETIME"]},"key":{"type":"string","description":"The key of the input"},"name":{"type":"string","description":"The name of the input"},"placeholder":{"type":"string","description":"The placeholder for the input"},"required":{"type":"boolean","description":"Whether the input is required"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JQ":{"title":"JQ","required":["expression","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"expression":{"type":"string","description":"The JQ expression for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SLACK":{"title":"SLACK","required":["channel","message","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channel":{"type":"string","description":"The channel name to send the message to, without the `#`. For example for `#general` use `general`"},"message":{"type":"string","description":"The message to send"},"type":{"type":"string"}}}]},"WorkflowActionSchema.MANUAL_APPROVAL":{"title":"MANUAL_APPROVAL","required":["approvingTeamIds","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"approverDescription":{"type":"string","description":"A description that will be shown to approvers"},"approvingTeamIds":{"type":"array","description":"The IDs of the teams whose members can approve the action","items":{"type":"string","description":"The IDs of the teams whose members can approve the action"}},"approvingTeamIdsOverride":{"type":"string","description":"The path to the override value in the workflow context that resolves the approving teams at run time. The value at the path must be an array of team Cortex IDs or team tags."},"type":{"type":"string"}}}]},"WorkflowActionSchema.CONDITIONAL_BRANCH":{"title":"CONDITIONAL_BRANCH","required":["branches","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"branches":{"type":"array","description":"The list of conditional branches that will be evaluated in order","items":{"$ref":"#/components/schemas/Conditional"}},"fallbackBranch":{"$ref":"#/components/schemas/Fallback"},"joiningAction":{"type":"string","description":"The joining action that will run after all branches"},"type":{"type":"string"}}}]},"Conditional":{"required":["expression","name","slug"],"type":"object","properties":{"expression":{"type":"string","description":"The conditional expression for the branch"},"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The list of conditional branches that will be evaluated in order"},"Fallback":{"required":["name","slug"],"type":"object","properties":{"name":{"type":"string","description":"The name of the branch"},"outgoingAction":{"type":"string","description":"The first action to execute in this branch path"},"slug":{"type":"string","description":"The slug of the branch"}},"description":"The fallback branch that will be taken if no other branches evaluate to `true`"},"WorkflowActionSchema.GITHUB_CREATE_OR_UPDATE_FILE":{"title":"GITHUB_CREATE_OR_UPDATE_FILE","required":["alias","commitMessage","content","path","repositoryName","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the github configuration to be used"},"author":{"$ref":"#/components/schemas/GithubAuthor"},"branch":{"type":"string","description":"The branch in the repository where the changes will be applied (optional; defaults to the main branch if not specified)"},"commitMessage":{"type":"string","description":"A message describing the purpose of the commit"},"committer":{"$ref":"#/components/schemas/GithubCommitter"},"content":{"type":"string","description":"The content of the file to be created or updated (not base64-encoded)"},"path":{"type":"string","description":"The full path to the file within the repository"},"repositoryName":{"type":"string","description":"The name of the repository where the file is being created or updated"},"type":{"type":"string"}}}]},"GithubAuthor":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the original author of the changes being committed (optional)"},"GithubCommitter":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The details of the person or system making the commit, such as name and email (optional)"},"WorkflowActionSchema.MS_TEAMS_SEND_MESSAGE":{"title":"MS_TEAMS_SEND_MESSAGE","required":["channelId","message","teamId","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"channelId":{"type":"string","description":"The channel id to send the message to"},"message":{"type":"string","description":"The message to send"},"teamId":{"type":"string","description":"The team id to send the message to"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JAVASCRIPT":{"title":"JAVASCRIPT","required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"script":{"type":"string","description":"The JavaScript script for the action"},"type":{"type":"string"}}}]},"WorkflowActionSchema.SET_VARIABLES":{"title":"SET_VARIABLES","required":["type","variables"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"type":{"type":"string"},"variables":{"type":"array","description":"The variables to set for the action","items":{"$ref":"#/components/schemas/VariableAssignment"}}}}]},"VariableAssignment":{"required":["slug","source"],"type":"object","properties":{"slug":{"type":"string","description":"The type of the variable"},"source":{"oneOf":[{"$ref":"#/components/schemas/JavaScript"},{"$ref":"#/components/schemas/Reference"}]}},"description":"The variables to set for the action"},"JavaScript":{"required":["script","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"script":{"type":"string"}}}]},"VariableSource":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"How to set the variable","discriminator":{"propertyName":"type"}},"Reference":{"required":["path","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/VariableSource"},{"type":"object","properties":{"path":{"type":"string"}}}]},"WorkflowActionSchema.AWS":{"title":"AWS","required":["accountId","actionIdentifier","inputs","region","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"accountId":{"type":"string"},"actionIdentifier":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"region":{"type":"string"},"type":{"type":"string"}}}]},"WorkflowActionSchema.PAGERDUTY_CREATE_INCIDENT":{"title":"PAGERDUTY_CREATE_INCIDENT","required":["body","fromEmail","serviceId","title","type","urgency"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"body":{"type":"string","description":"The body of the incident"},"fromEmail":{"type":"string","description":"The email address of a valid user associated with the account making the request"},"incidentTypeName":{"type":"string","description":"The incident type name"},"serviceId":{"type":"string","description":"The ID of the service to create the incident for"},"title":{"type":"string","description":"The title of the incident"},"type":{"type":"string"},"urgency":{"type":"string","description":"The urgency of the incident","enum":["HIGH","LOW"]}}}]},"WorkflowActionSchema.INCIDENT_IO_CREATE_INCIDENT":{"title":"INCIDENT_IO_CREATE_INCIDENT","required":["alias","entityTag","name","severity","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias of the incident.io configuration to use"},"entityTag":{"type":"string","description":"The tag of the entity whose incident.io custom field registrations are attached to the incident"},"incidentType":{"type":"string","description":"The name of the incident type to create the incident with"},"mode":{"type":"string","description":"The mode of the incident: STANDARD, RETROSPECTIVE, TEST or TUTORIAL"},"name":{"type":"string","description":"The name of the incident"},"severity":{"type":"string","description":"The name of the severity to create the incident with"},"status":{"type":"string","description":"The name of the status to create the incident with"},"summary":{"type":"string","description":"The summary of the incident"},"type":{"type":"string"}}}]},"WorkflowActionSchema.JIRA_CREATE_ISSUE":{"title":"JIRA_CREATE_ISSUE","required":["alias","components","description","fields","issueSummary","issueType","labels","projectKey","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"alias":{"type":"string","description":"The alias for the Jira configuration that will be used."},"assignee":{"type":"string","description":"The identifier of the assignee for the Jira issue. This field is optional."},"components":{"type":"array","description":"A list of components within the Jira project to which the issue belongs. This field is optional.","items":{"type":"string","description":"A list of components within the Jira project to which the issue belongs. This field is optional."}},"description":{"type":"string","description":"A detailed description of the issue, providing more context about what needs to be addressed."},"fields":{"type":"object","additionalProperties":{"type":"object","description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"description":"A map containing additional fields that are to be provided for the Jira issue, such as custom fields or extra attributes. This field is optional."},"issueSummary":{"type":"string","description":"A brief summary of the issue being created, typically representing the title of the issue."},"issueType":{"type":"string","description":"The type of the issue being created, such as 'Bug', 'Task', or 'Story'."},"labels":{"type":"array","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional.","items":{"type":"string","description":"A list of labels or tags to categorize or highlight the Jira issue. This field is optional."}},"priority":{"type":"string","description":"The priority of the issue, such as 'High', 'Medium', or 'Low'. This field is optional."},"projectKey":{"type":"string","description":"The key of the Jira project where the issue will be created. Typically a short code like 'PROJ'."},"reporter":{"type":"string","description":"The identifier of the reporter who is raising the Jira issue. This field is optional."},"type":{"type":"string"}}}]},"WorkflowActionSchema.RUN_WORKFLOW":{"title":"RUN_WORKFLOW","required":["type","workflowId"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowActionSchema"},{"type":"object","properties":{"entityId":{"type":"string","description":"The ID of the entity"},"type":{"type":"string"},"workflowId":{"type":"string","description":"The ID of the workflow to run"}}}]},"WorkflowRunActionState":{"required":["status"],"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"status":{"type":"string","enum":["NOT_INITIATED","COMPLETED","FAILED","IN_PROGRESS","PAUSED","CANCELED","TIMED_OUT"]},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}}},"description":"Running state of action","discriminator":{"propertyName":"status"},"oneOf":[{"$ref":"#/components/schemas/WorkflowRunActionState.NotInitiated"},{"$ref":"#/components/schemas/WorkflowRunActionState.InProgress"},{"$ref":"#/components/schemas/WorkflowRunActionState.Paused"},{"$ref":"#/components/schemas/WorkflowRunActionState.TimedOut"},{"$ref":"#/components/schemas/WorkflowRunActionState.Failed"},{"$ref":"#/components/schemas/WorkflowRunActionState.Canceled"},{"$ref":"#/components/schemas/WorkflowRunActionState.Completed"}]},"WorkflowRunActionState.NotInitiated":{"title":"NotInitiated","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"}]},"WorkflowRunActionState.InProgress":{"title":"InProgress","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Paused":{"title":"Paused","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.TimedOut":{"title":"TimedOut","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Failed":{"title":"Failed","required":["errorMessage","status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"errorMessage":{"type":"string","description":"Error from the failed action"},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Canceled":{"title":"Canceled","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"WorkflowRunActionState.Completed":{"title":"Completed","required":["status"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunActionState"},{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Inputs for the action"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Metadata from the action run"},"outputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Outputs from the action"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Variables from the action run"}}}]},"ApiKey":{"required":["type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunInitiatorResponse"},{"type":"object","properties":{"apiKey":{"oneOf":[{"$ref":"#/components/schemas/Global"},{"$ref":"#/components/schemas/Personal"}]}}}]},"WorkflowRunInitiatorResponse":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"Who initiated the workflow run","discriminator":{"propertyName":"type"}},"Global":{"required":["id","last4","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeySummary"}]},"ApiKeySummary":{"required":["id","last4","type"],"type":"object","properties":{"id":{"type":"string"},"last4":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"}},"Personal":{"required":["id","last4","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeySummary"},{"type":"object","properties":{"user":{"$ref":"#/components/schemas/CortexUserSummary"}}}]},"CortexUserSummary":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The user who verified the entity. Null while the status is PENDING, and null when a global API key verified it."},"User":{"required":["name"],"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"name":{"type":"string","description":"Name"}}},"WorkflowRunDetailsVariableResponse":{"required":["type","value"],"type":"object","properties":{"type":{"type":"string","description":"The type of the variable"},"value":{"$ref":"#/components/schemas/JsonNode"}},"description":"Variable values"},"WorkflowSummary":{"required":["cid","name"],"type":"object","properties":{"cid":{"type":"string","description":"The id of the workflow"},"name":{"type":"string","description":"The slug of the workflow"}},"description":"Summary of the workflow"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows/{tagOrId}/runs/{runId}":{"get":{"description":"Retrieve details of a specific workflow run.\n\nAPI key must have the `View workflow runs` permission.","operationId":"getWorkflowRun","parameters":[{"description":"The tag or unique, auto-generated identifier for the workflow.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"in":"path","name":"runId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunDetailsResponse"}}},"description":"Successfully found workflow run"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workflow or run not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Get workflow run details","tags":["Workflows"]}}}}
```

## List workflow runs

> List workflow runs based on filters.\
> \
> API key must have the \`View workflow runs\` permission.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Workflows"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"WorkflowRunQuery":{"type":"object","properties":{"entityId":{"type":"string","description":"Filter by target entity"},"initiatedBy":{"type":"array","description":"Filter by user who initiated the run","items":{"type":"string","description":"Filter by user who initiated the run"}},"searchQuery":{"type":"string","description":"Search query for run name or description"},"startedAfter":{"type":"string","description":"Filter runs started after this date","format":"date-time"},"startedBefore":{"type":"string","description":"Filter runs started before this date","format":"date-time"},"workflowIds":{"type":"array","description":"Filter by workflow","items":{"type":"string","description":"Entity identifier - can be a tag or CID"}}}},"Pageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"type":"array","items":{"type":"string"}}}},"PaginatedResultWorkflowRunSummaryResponse":{"required":["hasMore","items","page","total","totalCapped","totalPages"],"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunSummaryResponse"}},"page":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"totalCapped":{"type":"boolean"},"totalPages":{"type":"integer","format":"int32"}}},"WorkflowRunSummaryResponse":{"required":["context","id","status","variables","workflow"],"type":"object","properties":{"completedAt":{"type":"string","description":"Time the workflow run completed"},"context":{"type":"object","additionalProperties":{"type":"object","description":"Context of the run"},"description":"Context of the run"},"id":{"type":"string","description":"Id of the run"},"initiatedBy":{"oneOf":[{"$ref":"#/components/schemas/ApiKey"},{"$ref":"#/components/schemas/User"}]},"runResponse":{"type":"string"},"startedAt":{"type":"string","description":"Time the workflow run started"},"status":{"type":"string","description":"Status of the workflow run"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowRunDetailsVariableResponse"},"description":"Variable values"},"workflow":{"$ref":"#/components/schemas/WorkflowSummary"}}},"ApiKey":{"required":["type"],"type":"object","allOf":[{"$ref":"#/components/schemas/WorkflowRunInitiatorResponse"},{"type":"object","properties":{"apiKey":{"oneOf":[{"$ref":"#/components/schemas/Global"},{"$ref":"#/components/schemas/Personal"}]}}}]},"WorkflowRunInitiatorResponse":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"Who initiated the workflow run","discriminator":{"propertyName":"type"}},"Global":{"required":["id","last4","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeySummary"}]},"ApiKeySummary":{"required":["id","last4","type"],"type":"object","properties":{"id":{"type":"string"},"last4":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"}},"Personal":{"required":["id","last4","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeySummary"},{"type":"object","properties":{"user":{"$ref":"#/components/schemas/CortexUserSummary"}}}]},"CortexUserSummary":{"required":["email","name"],"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"description":"The user who verified the entity. Null while the status is PENDING, and null when a global API key verified it."},"User":{"required":["name"],"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"name":{"type":"string","description":"Name"}}},"WorkflowRunDetailsVariableResponse":{"required":["type","value"],"type":"object","properties":{"type":{"type":"string","description":"The type of the variable"},"value":{"$ref":"#/components/schemas/JsonNode"}},"description":"Variable values"},"JsonNode":{"type":"object"},"WorkflowSummary":{"required":["cid","name"],"type":"object","properties":{"cid":{"type":"string","description":"The id of the workflow"},"name":{"type":"string","description":"The slug of the workflow"}},"description":"Summary of the workflow"},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/workflows/runs":{"get":{"description":"List workflow runs based on filters.\n\nAPI key must have the `View workflow runs` permission.","operationId":"listWorkflowRuns","parameters":[{"in":"query","name":"workflowRunQuery","required":true,"schema":{"$ref":"#/components/schemas/WorkflowRunQuery"}},{"in":"query","name":"pageable","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultWorkflowRunSummaryResponse"}}},"description":"Successfully found workflow runs"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List workflow runs","tags":["Workflows"]}}}}
```
