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
      • 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
    • Running a Workflow
    • Blocks
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Developer 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

Entity Relationships (Beta)

Last updated 13 hours ago

Was this helpful?

Use these operations to interact with in Cortex.

Required permissions

Create and Update Relationships: Your API key must have the Edit entities permission. Your tenant must also have the Entity relationships feature enabled.

Operations

entity relationships

List entity destinations for a relationship type

get

List all entity destinations for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.

Authorizations
Path parameters
tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

relationshipTypeTagstringRequired
Query parameters
depthstringOptional

How many relationships to traverse the relationship tree. Defaults to immediate relationships

includeArchivedbooleanOptional

If true will include relationships that traverse archived entities

Default: false
Responses
200
Successfully retrieved entity sources
application/json
404
Entity or relationship type not found
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
get
GET /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "destinations": [
    {
      "description": "text",
      "id": "en2da8159dbeefb974",
      "name": "My Favorite Entity",
      "tag": "my-favorite-entity",
      "type": "service"
    }
  ]
}

List entity sources for a relationship type

get

List all entity sources for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.

Authorizations
Path parameters
tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

relationshipTypeTagstringRequired
Query parameters
depthstringOptional

How many relationships to traverse the relationship tree. Defaults to immediate relationships

includeArchivedbooleanOptional

If true will include relationships that traverse archived entities

Default: false
Responses
200
Successfully retrieved entity sources
application/json
404
Entity or relationship type not found
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
get
GET /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "sources": [
    {
      "description": "text",
      "id": "en2da8159dbeefb974",
      "name": "My Favorite Entity",
      "tag": "my-favorite-entity",
      "type": "service"
    }
  ]
}

List entity relationships for a relationship type

get

List all entity relationships for a certain relationship type.

Authorizations
Path parameters
relationshipTypeTagstringRequired
Query parameters
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 retrieved entity relationships
application/json
404
Relationship type not found
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
get
GET /api/v1/relationships/{relationshipTypeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "page": 1,
  "relationships": [
    {
      "destinationEntity": {
        "description": "text",
        "id": "en2da8159dbeefb974",
        "name": "My Favorite Entity",
        "tag": "my-favorite-entity",
        "type": "service"
      },
      "providerType": "WORKDAY",
      "relationshipTypeTag": "text",
      "sourceEntity": {
        "description": "text",
        "id": "en2da8159dbeefb974",
        "name": "My Favorite Entity",
        "tag": "my-favorite-entity",
        "type": "service"
      }
    }
  ],
  "total": 1,
  "totalPages": 1
}
  • Required permissions
  • Operations
  • GETList entity destinations for a relationship type
  • PUTUpdate direct entity destinations for a given entity
  • POSTAdd direct entity destinations for a given entity
  • GETList entity sources for a relationship type
  • PUTUpdate direct entity sources for a given entity
  • POSTAdd direct entity sources for a given entity
  • GETList entity relationships for a relationship type
  • PUTUpdate entity relationships for a relationship type
  • POSTAdd entity relationships for a relationship type

Update direct entity destinations for a given entity

put

Update all direct destinations for a given entity and entity relationship type

Authorizations
Path parameters
tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

relationshipTypeTagstringRequired
Query parameters
forcebooleanOptional

When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.

Body

Updates to entity relationship destinations

destinationsstring[]Required

List of code tags for the entities to add as sources

Example: ["entity-1","entity-2"]
Responses
200
Successfully updated entity destinations
application/json
400
Relationship validation error
application/json
404
Entity or relationship type not found
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
put
PUT /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "destinations": [
    "entity-1",
    "entity-2"
  ]
}
{
  "destinations": [
    {
      "description": "text",
      "id": "en2da8159dbeefb974",
      "name": "My Favorite Entity",
      "tag": "my-favorite-entity",
      "type": "service"
    }
  ]
}

Add direct entity destinations for a given entity

post

Add direct destinations for a given entity and entity relationship type

Authorizations
Path parameters
tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

relationshipTypeTagstringRequired
Query parameters
forcebooleanOptional

When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.

Body

Updates to entity relationship destinations

destinationsstring[]Required

List of code tags for the entities to add as sources

Example: ["entity-1","entity-2"]
Responses
200
Successfully added entity destinations
application/json
400
Relationship validation error
application/json
404
Entity or relationship type not found
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/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "destinations": [
    "entity-1",
    "entity-2"
  ]
}
{
  "destinations": [
    {
      "description": "text",
      "id": "en2da8159dbeefb974",
      "name": "My Favorite Entity",
      "tag": "my-favorite-entity",
      "type": "service"
    }
  ]
}

Update direct entity sources for a given entity

put

Update all direct sources for a given entity and entity relationship type

Authorizations
Path parameters
tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

relationshipTypeTagstringRequired
Query parameters
forcebooleanOptional

When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.

Body

Updates to entity relationship sources

sourcesstring[]Required

List of code tags for the entities to add as sources

Example: ["entity-1","entity-2"]
Responses
200
Successfully updated entity sources
application/json
400
Relationship validation error
application/json
404
Entity or relationship type not found
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
put
PUT /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "sources": [
    "entity-1",
    "entity-2"
  ]
}
{
  "sources": [
    {
      "description": "text",
      "id": "en2da8159dbeefb974",
      "name": "My Favorite Entity",
      "tag": "my-favorite-entity",
      "type": "service"
    }
  ]
}

Add direct entity sources for a given entity

post

Add direct sources for a given entity and entity relationship type

Authorizations
Path parameters
tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

relationshipTypeTagstringRequired
Query parameters
forcebooleanOptional

When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.

Body

Updates to entity relationship sources

sourcesstring[]Required

List of code tags for the entities to add as sources

Example: ["entity-1","entity-2"]
Responses
200
Successfully added entity sources
application/json
400
Relationship validation error
application/json
404
Entity or relationship type not found
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/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "sources": [
    "entity-1",
    "entity-2"
  ]
}
{
  "sources": [
    {
      "description": "text",
      "id": "en2da8159dbeefb974",
      "name": "My Favorite Entity",
      "tag": "my-favorite-entity",
      "type": "service"
    }
  ]
}

Update entity relationships for a relationship type

put

Update all entity relationships for a certain relationship type.

Authorizations
Path parameters
relationshipTypeTagstringRequired
Query parameters
forcebooleanOptional

When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.

Body

Updates to entity relationships

Responses
200
Successfully updated entity relationships
application/json
404
Relationship type not found
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
put
PUT /api/v1/relationships/{relationshipTypeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "relationships": [
    {
      "destination": "text",
      "source": "text"
    }
  ]
}
{
  "errors": [
    {
      "destinationEntityTag": "text",
      "errorMessage": "text",
      "relationshipTypeTag": "text",
      "sourceEntityTag": "text"
    }
  ],
  "relationships": [
    {
      "destinationEntityTag": "text",
      "providerType": "WORKDAY",
      "relationshipTypeTag": "text",
      "sourceEntityTag": "text"
    }
  ]
}

Add entity relationships for a relationship type

post

Add all entity relationships for a certain relationship type.

Authorizations
Path parameters
relationshipTypeTagstringRequired
Query parameters
forcebooleanOptional

When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.

Body

Updates to entity relationships

Responses
200
Successfully added entity relationships
application/json
404
Relationship type not found
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/relationships/{relationshipTypeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "relationships": [
    {
      "destination": "text",
      "source": "text"
    }
  ]
}
{
  "errors": [
    {
      "destinationEntityTag": "text",
      "errorMessage": "text",
      "relationshipTypeTag": "text",
      "sourceEntityTag": "text"
    }
  ],
  "relationships": [
    {
      "destinationEntityTag": "text",
      "providerType": "WORKDAY",
      "relationshipTypeTag": "text",
      "sourceEntityTag": "text"
    }
  ]
}