Authorizations
API key for authentication. Format: zdb_your_api_key_here
Body
application/json
curl --request POST \
--url http://localhost:3000/auth/keys \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"permissions": {
"read": true,
"write": false,
"admin": false
},
"scope": {},
"expiresAt": "2023-11-07T05:31:56Z",
"rateLimit": 1000
}
'{
"success": true,
"data": {
"key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key_prefix": "<string>",
"name": "<string>",
"permissions": {
"read": true,
"write": true,
"admin": true
},
"scope": {},
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"last_used": "2023-11-07T05:31:56Z",
"rate_limit": 123
}
}Creates a new API key with specified permissions
curl --request POST \
--url http://localhost:3000/auth/keys \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"permissions": {
"read": true,
"write": false,
"admin": false
},
"scope": {},
"expiresAt": "2023-11-07T05:31:56Z",
"rateLimit": 1000
}
'{
"success": true,
"data": {
"key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key_prefix": "<string>",
"name": "<string>",
"permissions": {
"read": true,
"write": true,
"admin": true
},
"scope": {},
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"last_used": "2023-11-07T05:31:56Z",
"rate_limit": 123
}
}API key for authentication. Format: zdb_your_api_key_here
Was this page helpful?