Skip to content

Add Access Token

POST
/api/v1/container_registry/token/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/container_registry/token/?project_name=<PROJECT_NAME>&project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"token_name": "admin",
"duration": -1,
"description": "This token will never expire.",
"permissions": [
"pull",
"push"
]
}'
project_name
required
integer

Container Registry name

project_id
required
integer
location
required
string
Allowed values: Delhi Chennai

Deployment region for the resource. Accepted values: Delhi, Chennai.

Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.

Media typeapplication/json
object
token_name
string

Example

admin
duration

Duration in days or a special value like -1 for non-expiry.

number
<= 5000

Example

-1
description
string

Example

This token will never expire.
permissions
Array<array>

Example

[
"pull",
"push"
]

Credential secret created successfully.

Media typeapplication/json
object
code
integer
data
object
creation_time
string format: date-time
expires_at
integer
id
integer
name
string
secret
string
errors
object
key
additional properties
message
string

Example

{
"code": 201,
"data": {
"creation_time": "2025-04-29T12:16:28.842Z",
"expires_at": -1,
"id": 12345,
"name": "<token_name>",
"secret": "<token_value>"
},
"errors": {},
"message": "Created Successfully"
}