Dependencies

Use these operations to interact with dependencies in Cortex.

Required permissions

Your API key must have the Edit entities permission.

Operations

Retrieve all dependencies for an entity

get
Authorizations
AuthorizationstringRequired

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.

Path parameters
callerTagstringRequired
Query parameters
includeOutgoingbooleanOptionalDefault: true
includeIncomingbooleanOptionalDefault: false
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 entity dependencies

application/json
get
/api/v1/catalog/{callerTag}/dependencies
GET /api/v1/catalog/{callerTag}/dependencies?pageSize=250&page=0 HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "calleeTag": "text",
  "calleeType": "text",
  "callerTag": "text",
  "callerType": "text",
  "description": "text",
  "metadata": {},
  "method": "text",
  "path": "text"
}

Retrieve dependency between entities

get

If a dependency exists between the callee and the caller, returns metadata about the edge.

Authorizations
AuthorizationstringRequired

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.

Path parameters
callerTagstringRequired
calleeTagstringRequired
Query parameters
methodstringOptional
pathstringOptional
Responses
200

Successfully found dependency

application/json
get
/api/v1/catalog/{callerTag}/dependencies/{calleeTag}
GET /api/v1/catalog/{callerTag}/dependencies/{calleeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "calleeTag": "text",
  "calleeType": "text",
  "callerTag": "text",
  "callerType": "text",
  "description": "text",
  "metadata": {},
  "method": "text",
  "path": "text"
}

Create dependency from entity

post
Authorizations
AuthorizationstringRequired

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.

Path parameters
callerTagstringRequired

The entity tag (x-cortex-tag) for the callee entity ("from" entity)

calleeTagstringRequired

The entity tag (x-cortex-tag) for the caller entity ("to" entity)

Query parameters
methodstringOptional

HTTP Method

Example: POST
pathstringOptional
Body
descriptionstringOptional
metadataobjectOptional
Responses
post
/api/v1/catalog/{callerTag}/dependencies/{calleeTag}
POST /api/v1/catalog/{callerTag}/dependencies/{calleeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "description": "text",
  "metadata": {}
}
{
  "calleeTag": "text",
  "calleeType": "text",
  "callerTag": "text",
  "callerType": "text",
  "description": "text",
  "metadata": {},
  "method": "text",
  "path": "text"
}

Create or update dependencies in bulk

put

This API allows you to create multiple dependencies for multiple entities at once.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

Successfully created / updated dependencies

application/json
put
/api/v1/catalog/dependencies
PUT /api/v1/catalog/dependencies HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "values": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "description": "text",
        "metadata": {},
        "method": "text",
        "path": "text",
        "tag": "text"
      }
    ]
  }
}
{
  "values": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "description": "text",
        "metadata": {},
        "method": {},
        "path": "text",
        "tag": "text"
      }
    ]
  }
}

Update dependency between entities

put

If a dependency exists between two entities, replace the metadata with the payload. Note: This only supports dependencies created via the API.

Authorizations
AuthorizationstringRequired

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.

Path parameters
callerTagstringRequired
calleeTagstringRequired
Query parameters
methodstringOptional
pathstringOptional
Body
descriptionstringRequired
metadataobjectRequired
Responses
200

Successfully updated dependency

application/json
put
/api/v1/catalog/{callerTag}/dependencies/{calleeTag}
PUT /api/v1/catalog/{callerTag}/dependencies/{calleeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "description": "text",
  "metadata": {}
}
{
  "calleeTag": "text",
  "calleeType": "text",
  "callerTag": "text",
  "callerType": "text",
  "description": "text",
  "metadata": {},
  "method": "text",
  "path": "text"
}

Delete dependency

delete

Deletes a single dependency edge between the caller and the callee. Note: This is only supported for edges created via the API.

Authorizations
AuthorizationstringRequired

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.

Path parameters
callerTagstringRequired
calleeTagstringRequired
Query parameters
methodstringOptional
pathstringOptional
Responses
delete
/api/v1/catalog/{callerTag}/dependencies/{calleeTag}
DELETE /api/v1/catalog/{callerTag}/dependencies/{calleeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "calleeTag": "text",
  "calleeType": "text",
  "callerTag": "text",
  "callerType": "text",
  "description": "text",
  "metadata": {},
  "method": "text",
  "path": "text"
}

Delete dependencies from entity

delete

Deletes any outgoing dependencies from the entity. Note: this only deletes dependencies that were created via the API.

Authorizations
AuthorizationstringRequired

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.

Path parameters
callerTagstringRequired
Responses
delete
/api/v1/catalog/{callerTag}/dependencies
DELETE /api/v1/catalog/{callerTag}/dependencies HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "calleeTag": "text",
  "calleeType": "text",
  "callerTag": "text",
  "callerType": "text",
  "description": "text",
  "metadata": {},
  "method": "text",
  "path": "text"
}

Delete dependencies in bulk

delete
Authorizations
AuthorizationstringRequired

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.

Body
Responses
delete
/api/v1/catalog/dependencies
DELETE /api/v1/catalog/dependencies HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "values": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "description": "text",
        "metadata": {},
        "method": "text",
        "path": "text",
        "tag": "text"
      }
    ]
  }
}

No content

Last updated

Was this helpful?