CreateContextStoreAPIKey
Creates an API key.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
agentloop:CreateContextStoreAPIKey |
create |
*ContextStoreAPIKey
|
None | None |
Request syntax
POST /agentspace/{agentSpace}/contextstore/{contextStoreName}/apikey HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| agentSpace |
string |
Yes |
The AgentSpace name. |
my-agent-space |
| contextStoreName |
string |
Yes |
The context store name. |
my-context-store |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| name |
string |
Yes |
The display name of the API key, used to identify its purpose. |
my-api-key |
| clientToken |
string |
No |
The client token, which is a unique string generated by the client to ensure the idempotence of the create operation. |
a1b2c3d4-1234-5678-90ab-cdef12345678 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| requestId |
string |
The request ID. |
9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M |
| apiKey |
string |
The full value of the API key. |
sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| name |
string |
The name of the API key. |
my-api-key |
Examples
Success response
JSON format
{
"requestId": "9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M",
"apiKey": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "my-api-key"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.