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

API Keys

APIs for managing API Keys

Get existing API Keys

post

Get a list of API Keys filtered by expiration date, role, or ID.

Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.

Header parameters
authorizationstringRequired

api_key

Example: your-api-key
x-xdr-auth-idstringRequired

api_key_id

Example: 1
x-xdr-timestampstringOptional

timestamp in milliseconds

x-xdr-noncestringOptional

64 byte random string

x-child-tenant-idstringOptional

child tenant ID

Body
Responses
200

OK

application/json
post/public_api/v1/api_keys/get_api_keys
POST /public_api/v1/api_keys/get_api_keys HTTP/1.1
Host: api-yourfqdn
authorization: your-api-key
x-xdr-auth-id: 1
Content-Type: application/json
Accept: */*
Content-Length: 170

{
  "request_data": {
    "filters": [
      {
        "field": "expiration",
        "operator": "gte",
        "value": 1721149909250
      }
    ],
    "sort": {
      "field": "expiration",
      "keyword": "asc"
    },
    "search_from": 0,
    "search_to": 100
  }
}
200

OK

{
  "reply": {
    "DATA": [
      {
        "id": 25,
        "creation_time": 1709544947832,
        "created_by": "N/A",
        "user_name": "Public API - 21",
        "roles": [
          "default"
        ],
        "security_level": "standard",
        "comment": null,
        "expiration": 1710149747184
      },
      {
        "id": 24,
        "creation_time": 1709544787367,
        "created_by": "N/A",
        "user_name": "Public API - 21",
        "roles": [
          "default"
        ],
        "security_level": "standard",
        "comment": null,
        "expiration": 1710149586852
      },
      {
        "id": 23,
        "creation_time": 1709544227320,
        "created_by": "N/A",
        "user_name": "Public API - 21",
        "roles": [
          "default"
        ],
        "security_level": "standard",
        "comment": null,
        "expiration": 1710149026834
      }
    ],
    "FILTER_COUNT": 3,
    "TOTAL_COUNT": 70
  }
}

Generate an API Key

post

Generate a new API Key and define the roles assigned to it and whether the security level is standard or advanced.

Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.

Header parameters
authorizationstringRequired

api_key

Example: your-api-key
x-xdr-auth-idstringRequired

api_key_id

Example: 1
x-xdr-timestampstringOptional

timestamp in milliseconds

x-xdr-noncestringOptional

64 byte random string

x-child-tenant-idstringOptional

child tenant ID

Body
Responses
200

OK

application/json
post/public_api/v1/api_keys/generate
POST /public_api/v1/api_keys/generate HTTP/1.1
Host: api-yourfqdn
authorization: your-api-key
x-xdr-auth-id: 1
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "request_data": {
    "roles": [
      "Public API Action"
    ],
    "security_level": "standard",
    "comment": "API Key for John"
  }
}
{
  "reply": {
    "id": 4267,
    "key": "oZFaXmXCLCdoWIXTb9ITSqUvl4OBLsUQgCeuZc5FdwMpmpY5QBn8OUePZiLMb"
  }
}

Delete API Keys

post

Delete API Keys by ID.

Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.

Header parameters
authorizationstringRequired

api_key

Example: your-api-key
x-xdr-auth-idstringRequired

api_key_id

Example: 1
x-xdr-timestampstringOptional

timestamp in milliseconds

x-xdr-noncestringOptional

64 byte random string

x-child-tenant-idstringOptional

child tenant ID

Body
Responses
200

OK

application/json
post/public_api/v1/api_keys/delete
POST /public_api/v1/api_keys/delete HTTP/1.1
Host: api-yourfqdn
authorization: your-api-key
x-xdr-auth-id: 1
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "request_data": {
    "filters": [
      {
        "field": "id",
        "operator": "in",
        "value": [
          121,
          134
        ]
      }
    ]
  }
}
{
  "reply": {
    "update_count": 2
  }
}

Last updated

Was this helpful?