curl --request POST \
--url https://api.gcore.com/cloud/v1/caas/keys/{project_id}/{region_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"containers": [
{
"name": "my-container",
"namespace": "space"
}
],
"description": "my first key",
"expire": "2023-07-31T00:00:00Z",
"is_disabled": false,
"name": "my-key"
}'
{
"containers": [
{
"name": "my-container",
"namespace": "space"
}
],
"created_at": "2023-08-22T11:21:00Z",
"description": "my first key",
"expire": "2023-07-31T00:00:00Z",
"is_disabled": false,
"name": "my-key",
"secret": "my-secret",
"source": "cloud",
"status": "Expired"
}
Create a new API key for container authentication.
curl --request POST \
--url https://api.gcore.com/cloud/v1/caas/keys/{project_id}/{region_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"containers": [
{
"name": "my-container",
"namespace": "space"
}
],
"description": "my first key",
"expire": "2023-07-31T00:00:00Z",
"is_disabled": false,
"name": "my-key"
}'
{
"containers": [
{
"name": "my-container",
"namespace": "space"
}
],
"created_at": "2023-08-22T11:21:00Z",
"description": "my first key",
"expire": "2023-07-31T00:00:00Z",
"is_disabled": false,
"name": "my-key",
"secret": "my-secret",
"source": "cloud",
"status": "Expired"
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Project id
1
Region id
1
OK
The response is of type object
.
Was this page helpful?