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" ]}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/container_registry/token/", params={"project_name": "<PROJECT_NAME>", "project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "token_name": "admin", "duration": -1, "description": "This token will never expire.", "permissions": [ "pull", "push", ], },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/container_registry/token/");url.search = new URLSearchParams({ project_name: "<PROJECT_NAME>", project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "token_name": "admin", "duration": -1, "description": "This token will never expire.", "permissions": [ "pull", "push" ] }),});console.log(await response.json());Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”project_name
required
integer
Container Registry name
project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Body
Section titled “Request Body”Media typeapplication/json
object
token_name
string
Example
adminduration
Duration in days or a special value like -1 for non-expiry.
number
Example
-1description
string
Example
This token will never expire.permissions
Array<array>
Example
[ "pull", "push"]Responses
Section titled “Responses”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"}