LogoLogo
Login to CortexBook a DemoCortex Academycortex.io
  • Cortex Docs
  • Cortex Quick Start
  • Ingesting data into Cortex
    • Managing Entities
      • Adding entities
        • Add services
        • Add domains
        • Add teams
        • Add custom entity types
        • Defining dependencies
      • Entity details page
      • Defining ownership
      • Defining relationship types
      • Grouping entities
      • Adding external documentation
      • Adding Deploy data
      • Adding custom data
      • Viewing discovered entities
      • Archiving entities
      • Relationship graph
      • Using On-call Assistant for incidents
      • Managing Terraform infra in Cortex
    • Managing Catalogs
    • Integrations
      • Internally hosted integrations
      • ArgoCD
      • AWS
      • Azure DevOps
      • Azure Resources
      • BambooHR
      • Bitbucket
      • BugSnag
      • Buildkite
      • Checkmarx
      • CircleCI
      • ClickUp
      • Codecov
      • Coralogix
      • Custom webhook integrations
      • Datadog
      • Dynatrace
      • Entra ID (Azure AD)
      • FireHydrant
      • GitHub
      • GitLab
      • Google
      • Grafana
      • incident.io
      • Instana
      • Jenkins
      • Jira
      • Kubernetes
      • LaunchDarkly
      • Lightstep
      • Mend
      • Microsoft Teams
      • New Relic
      • Okta
      • Opsgenie
      • PagerDuty
      • Prometheus
      • Rollbar
      • Rootly
      • Sentry
      • ServiceNow
      • Slack
      • Snyk
      • SonarQube
      • Splunk Observability Cloud (SignalFx)
      • Splunk On-Call (VictorOps)
      • Sumo Logic
      • Veracode
      • Wiz
      • Workday
      • xMatters
  • Scorecards
    • Initiatives and Action items
      • Creating issues based on Initiatives
    • Scorecard rule exemptions
    • Scorecard rule filters
    • Scorecard examples
    • Scorecards as code
  • Reports
    • Executive report
    • All Scorecards report
    • Bird's eye report
    • Progress report
    • Report card
  • Eng Intelligence
    • Custom Metrics
    • Jira Metrics
    • Metrics Explorer (Beta)
  • Cortex Query Language (CQL)
    • Using CQL reports
    • Using JQ in Cortex
  • Workflows
    • Creating a Workflow
      • Workflows as code
    • Blocks
    • Running a Workflow
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
    • Calling internal service endpoints in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Engineering homepage
  • Workspace Settings
    • Using GitOps for Cortex
      • GitOps logs
    • Managing users
      • Roles and permissions
        • Custom roles
        • Team ownership entity editing
      • Configuring SSO
        • Microsoft Entra ID
        • Google
        • Other OIDC providers
        • Okta
          • Okta SCIM
      • Configuring identity mappings
      • Onboarding management
    • API keys, secrets, and tokens
      • Secrets
      • Personal tokens
    • Audit logs
    • Entity settings
      • Data verification
      • Auto archiving entities
    • IP allowlist
    • Notifications
      • Notification logs
    • Customizing your workspace
    • Using search in Cortex
  • Cortex API
    • REST API operations
      • API Keys
      • Audit Logs
      • Catalog Entities
      • Custom Data
        • Custom Data (Advanced)
      • Custom Events
      • Custom Metrics
      • Dependencies
      • Deploys
      • Discovery Audit
      • Docs
      • Eng Intel: User Labels
      • Entity Relationship Types (Beta)
      • Entity Relationships (Beta)
      • Entity Types
      • GitOps Logs
      • Groups
      • Initiatives
      • Integrations APIs
        • Azure Active Directory (Entra ID) API
        • Azure Resources API
        • AWS API
        • Azure DevOps API
        • CircleCI API
        • Coralogix API
        • Datadog API
        • GitHub API
        • GitLab API
        • incident.io API
        • LaunchDarkly API
        • New Relic API
        • PagerDuty API
        • Prometheus API
        • SonarQube API
      • IP Allowlist
      • Notification Logs
      • On call
      • Packages
      • Plugins
      • Queries
      • SCIM
      • Scorecards
      • Secrets
      • Team Hierarchies
      • Teams
      • Workflows
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Cortex API
  2. REST API operations

Workflows

Last updated 7 days ago

Was this helpful?

Use these operations to interact with 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.

Operations

Workflows

List workflows

get

List workflows.

API key must have the View workflows permission.

Authorizations
Query parameters
includeActionsbooleanOptional

When true, returns the list of actions for each workflow. Defaults to false.

Default: false
searchQuerystringOptional

When set, only returns workflows with the given substring in the name or description.

pageSizeinteger · int32Required

Number of results to return per page, between 1 and 1000. Default 250.

Default: 250
pageinteger · int32Required

Page number to return, 0-indexed. Default 0.

Default: 0
Responses
200
Successfully found workflows
403
Access denied
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
get
GET /api/v1/workflows HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "page": 1,
  "total": 1,
  "totalPages": 1,
  "workflows": [
    {
      "actions": [
        {
          "isRootAction": true,
          "name": "text",
          "outgoingActions": [
            "text"
          ],
          "schema": {
            "type": "text",
            "headers": {
              "ANY_ADDITIONAL_PROPERTY": "text"
            },
            "httpMethod": "GET",
            "payload": "text",
            "url": "text"
          },
          "slug": "text"
        }
      ],
      "description": "text",
      "filter": {
        "type": "GLOBAL"
      },
      "iconTag": "text",
      "isDraft": true,
      "name": "text",
      "runResponseTemplate": "text",
      "runRestrictionPolicies": [
        {
          "id": "text",
          "type": "USER"
        }
      ],
      "tag": "text"
    }
  ]
}

Retrieve workflow

get

Retrieve workflow by tag or ID.

API key must have the View workflows permission.

Authorizations
Path parameters
tagOrIdstringRequired

The tag or unique, auto-generated identifier for the workflow.

Responses
200
Successfully found workflow
403
Access denied
404
Workflow not found
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
get
GET /api/v1/workflows/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "actions": [
    {
      "isRootAction": true,
      "name": "text",
      "outgoingActions": [
        "text"
      ],
      "schema": {
        "type": "text",
        "headers": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "httpMethod": "GET",
        "payload": "text",
        "url": "text"
      },
      "slug": "text"
    }
  ],
  "description": "text",
  "filter": {
    "type": "GLOBAL"
  },
  "iconTag": "text",
  "isDraft": true,
  "name": "text",
  "runResponseTemplate": "text",
  "runRestrictionPolicies": [
    {
      "id": "text",
      "type": "USER"
    }
  ],
  "tag": "text"
}

Delete workflow

delete

Delete workflow by tag or ID.

API key must have the Edit workflows permission.

Authorizations
Path parameters
tagOrIdstringRequired

The tag or unique, auto-generated identifier for the workflow.

Responses
200
Workflow deleted successfully
404
Workflow not found
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
delete
DELETE /api/v1/workflows/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*

No content

Create or update workflow

post

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.

Authorizations
Body
descriptionstringOptional

Description of the workflow

iconTagstringOptional

Icon tag for the workflow

isDraftbooleanRequired

Whether the workflow is a draft

namestringRequired

Name of the workflow

runResponseTemplatestringOptional

Template for the response when the workflow is run

tagstringRequired

Tag of the workflow

Responses
200
Workflow created successfully
400
Bad request
403
Access denied
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
post
POST /api/v1/workflows HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 400

{
  "actions": [
    {
      "isRootAction": true,
      "name": "text",
      "outgoingActions": [
        "text"
      ],
      "schema": {
        "type": "text",
        "headers": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "httpMethod": "GET",
        "payload": "text",
        "url": "text"
      },
      "slug": "text"
    }
  ],
  "description": "text",
  "filter": {
    "type": "GLOBAL"
  },
  "iconTag": "text",
  "isDraft": true,
  "name": "text",
  "runResponseTemplate": "text",
  "runRestrictionPolicies": [
    {
      "id": "text",
      "type": "USER"
    }
  ],
  "tag": "text"
}
{
  "actions": [
    {
      "isRootAction": true,
      "name": "text",
      "outgoingActions": [
        "text"
      ],
      "schema": {
        "type": "text",
        "headers": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "httpMethod": "GET",
        "payload": "text",
        "url": "text"
      },
      "slug": "text"
    }
  ],
  "description": "text",
  "filter": {
    "type": "GLOBAL"
  },
  "iconTag": "text",
  "isDraft": true,
  "name": "text",
  "runResponseTemplate": "text",
  "runRestrictionPolicies": [
    {
      "id": "text",
      "type": "USER"
    }
  ],
  "tag": "text"
}

Update asynchronous HTTP request Workflow block

post

Updates an asynchronous HTTP request Workflow block.

API key must have the Edit workflow runs permission.

Authorizations
Path parameters
tagOrIdstringRequired

The tag or unique, auto-generated identifier for the workflow.

callbackIdstringRequired

Callback ID; Provided by the Workflow block when it runs

Body
messagestringRequired

Human readable message to be shown to the user

statusstring · enumRequired

Status of the callback request. UPDATE keeps the workflow paused

Possible values:
Responses
200
Successfully received Workflow callback
400
Bad request
403
Access denied
404
Workflow run or block not found
406
Workflow block is not waiting for callback
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
post
POST /api/v1/workflows/{tagOrId}/callback/{callbackId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "message": "text",
  "response": {
    "ANY_ADDITIONAL_PROPERTY": {}
  },
  "status": "SUCCESS"
}

No content

  • Required permissions
  • Operations
  • GETList workflows
  • GETRetrieve workflow
  • POSTCreate or update workflow
  • POSTValidates YAML descriptor
  • POSTUpdate asynchronous HTTP request Workflow block
  • DELETEDelete workflow

Validates YAML descriptor

post

Validates YAML descriptor.

Authorizations
Body
anyOptional
Responses
200
Validation result
application/json
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
post
POST /api/v1/workflows/validate HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
{
  "ok": true,
  "violations": [
    {
      "description": "text",
      "endLine": 1,
      "paths": [
        "text"
      ],
      "pointer": "text",
      "ruleLink": "text",
      "startLine": 1,
      "title": "text",
      "violationType": "MUST"
    }
  ]
}