PUT
/api/v1/container_registry/token/{token_name}/
curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/container_registry/token/{token_name}/?project_name=<PROJECT_NAME>&project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "duration": 2, "description": "This token will expire in 2 days.", "permissions": [ "pull", "push" ], "disable": false}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/container_registry/token/{token_name}/", params={"project_name": "<PROJECT_NAME>", "project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "duration": 2, "description": "This token will expire in 2 days.", "permissions": [ "pull", "push", ], "disable": False, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/container_registry/token/{token_name}/");url.search = new URLSearchParams({ project_name: "<PROJECT_NAME>", project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "duration": 2, "description": "This token will expire in 2 days.", "permissions": [ "pull", "push" ], "disable": false }),});console.log(await response.json());Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”token_name
required
string
Token Name
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
duration
Duration in days or a special value like -1 for non-expiry.
number
Example
2description
string
Example
This token will expire in 2 days.permissions
Array<array>
Example
[ "pull", "push"]disable
Whether the token should be disabled or not.
boolean
Example
falseResponses
Section titled “Responses”Token updated successfully.
Media typeapplication/json
object
code
integer
data
object
errors
object
message
string
Example
{ "code": 200, "data": {}, "errors": {}, "message": "Success"}