API Keys Commands
See API Keys module docs for permissions and data model.
soat list-api-keys
List API keys
- Method:
GET - Path:
/api/v1/api-keys
Usage
soat list-api-keys
Options
This command has no options.
soat create-api-key
Create an API key
- Method:
POST - Path:
/api/v1/api-keys
Usage
soat create-api-key --name <string> --project-id <string>
Options
--name
Key name for identification
- Source:
body - Required: yes
- Type:
string - Example:
CI/CD Pipeline
--project-id
Project ID this key is scoped to. Required — keys cannot span projects.
- Source:
body - Required: yes
- Type:
string - Example:
proj_V1StGXR8Z5jdHi6B
--policy-ids
Optional list of policy IDs to attach. Key permissions become the intersection of user policies and these policies.
- Source:
body - Required: no
- Type:
array<string> - Example:
["pol_V1StGXR8Z5jdHi6B"]
soat get-api-key
Get an API key
- Method:
GET - Path:
/api/v1/api-keys/{api_key_id}
Usage
soat get-api-key --api-key-id <string>
Options
--api-key-id
API key public ID (key_ prefix)
- Source:
path - Required: yes
- Type:
string - Example:
key_V1StGXR8Z5jdHi6B
soat update-api-key
Update an API key
- Method:
PUT - Path:
/api/v1/api-keys/{api_key_id}
Usage
soat update-api-key --api-key-id <string>
Options
--api-key-id
API key public ID (key_ prefix)
- Source:
path - Required: yes
- Type:
string - Example:
key_V1StGXR8Z5jdHi6B
--name
—
- Source:
body - Required: no
- Type:
string - Example:
Updated Key Name
--project-id
Re-scope the key to a different project. Cannot be null — keys are always project-scoped.
- Source:
body - Required: no
- Type:
string - Example:
proj_V1StGXR8Z5jdHi6B
--policy-ids
Replace the key's policy list (empty array removes all)
- Source:
body - Required: no
- Type:
array<string> - Example:
["pol_V1StGXR8Z5jdHi6B"]
soat delete-api-key
Delete an API key
- Method:
DELETE - Path:
/api/v1/api-keys/{api_key_id}
Usage
soat delete-api-key --api-key-id <string>
Options
--api-key-id
API key public ID (key_ prefix)
- Source:
path - Required: yes
- Type:
string - Example:
key_V1StGXR8Z5jdHi6B