For the complete documentation index, see llms.txt. This page is also available as Markdown.

Secrets

Use these operations to interact with secrets in Cortex.

Required permissions

  • Your API key must have the Create secrets permission.

List secrets

get

API key must have the Create secrets permission.

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.

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 secrets

application/json
pageinteger · int32Required

Current page number, 0-indexed

totalinteger · int32Required

Total number of results

totalPagesinteger · int32Required

Total number of pages

get/api/v1/secrets
GET /api/v1/secrets?pageSize=250&page=0 HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "page": 1,
  "secrets": [
    {
      "id": "se2da8159dbeefb974",
      "name": "My Secret",
      "tag": "my-secret"
    }
  ],
  "total": 1,
  "totalPages": 1
}

Retrieve secret

get

API key must have the Create secrets permission.

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
tagOrIdstringRequired

Entity identifier - can be a tag or CID

Responses
200

Successfully retrieved secret

application/json
idstringRequired

Unique, immutable, 18-character auto-generated identifier for the secret

Example: se2da8159dbeefb974
namestringOptional

Human-readable name for the secret

Example: My Secret
tagstringRequired

Unique identifier for the secret

Example: my-secret
get/api/v1/secrets/{tagOrId}
GET /api/v1/secrets/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "se2da8159dbeefb974",
  "name": "My Secret",
  "tag": "my-secret"
}

Create secret

post

API key must have the Create secrets permission.

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
namestringRequired

Human-readable name for the secret

Example: My Secret
secretstringRequired

Value of the secret

Example: my-secret-password
tagstringRequired

Unique identifier for the secret

Example: my-secret
Responses
200

Successfully created secret

application/json
idstringRequired

Unique, immutable, 18-character auto-generated identifier for the secret

Example: se2da8159dbeefb974
namestringOptional

Human-readable name for the secret

Example: My Secret
tagstringRequired

Unique identifier for the secret

Example: my-secret
post/api/v1/secrets
POST /api/v1/secrets HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "name": "My Secret",
  "secret": "my-secret-password",
  "tag": "my-secret"
}
{
  "id": "se2da8159dbeefb974",
  "name": "My Secret",
  "tag": "my-secret"
}

Update secret

put

API key must have the Create secrets permission.

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
tagOrIdstringRequired

Entity identifier - can be a tag or CID

Body
namestringOptional

Human-readable name for the secret

Example: My Secret
secretstringOptional

Value of the secret

Example: my-secret-password
Responses
200

Successfully updated secret

application/json
idstringRequired

Unique, immutable, 18-character auto-generated identifier for the secret

Example: se2da8159dbeefb974
namestringOptional

Human-readable name for the secret

Example: My Secret
tagstringRequired

Unique identifier for the secret

Example: my-secret
put/api/v1/secrets/{tagOrId}
PUT /api/v1/secrets/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 50

{
  "name": "My Secret",
  "secret": "my-secret-password"
}
{
  "id": "se2da8159dbeefb974",
  "name": "My Secret",
  "tag": "my-secret"
}

Delete secret

delete

API key must have the Create secrets permission.

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
tagOrIdstringRequired

Entity identifier - can be a tag or CID

Responses
200

Secret successfully deleted

No content

delete/api/v1/secrets/{tagOrId}
DELETE /api/v1/secrets/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?