Credential

API List

Create Credential

Endpoint: /openapi/v1/credentials/create

Method: POST

Description: Creates a new credential for a container image registry.

Authorizations

Name
Location
Type
Required
Description

X-API-Key

header

string

required

Your API Key

Request Body (JSON)

Name
Type
Required
Description

name

string

required

The name of the credential.

username

string

required

The username for the image registry account.

token

string

required

The token or password for the image registry account.

Example — curl

curl --request POST \
--url 'https://api.yottalabs.ai/openapi/v1/credentials/create' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <YOUR_API_KEY>' \
--data '{
  "name": "Test-Credential",
  "username": "Test-Credential-username",
  "token": "Test-Credential-token"
}'

Response

Returns an object containing data of type CredentialDetail. (See Common Models below)


List Credentials

Endpoint: /openapi/v1/credentials/list

Method: GET

Description: Retrieves a list of all credentials under the current organization.

Authorizations

Name
Location
Type
Required
Description

X-API-Key

header

string

required

Your API Key

Example — curl

Response

Returns an object containing data as a list of CredentialDetail. (See Common Models below)


Get Credential Details

Endpoint: /openapi/v1/credentials/{id}

Method: GET

Description: Retrieves details of a specific credential identified by its ID.

Authorizations

Name
Location
Type
Required
Description

X-API-Key

header

string

required

Your API Key

Path Parameters

Name
Type
Required
Description

id

string

required

Credential ID

Example — curl

Response

Returns an object containing data of type CredentialDetail. (See Common Models below)


Delete Credential

Endpoint: /openapi/v1/credentials/{id}

Method: DELETE

Description: Deletes the credential with the specified ID. Note: Credentials currently in use cannot be deleted.

Authorizations

Name
Location
Type
Required
Description

X-API-Key

header

string

required

Your API Key

Path Parameters

Name
Type
Required
Description

id

string

required

Credential ID

Example — curl

Response

Success (Credential not in use): returns data: null.

Failure (Credential is in use): returns code: 25002 and a list of CredentialUsageDetail.


Common Models

CredentialDetail

Name
Type
Description

id

string

Credential ID

name

string

Credential Name

CredentialUsageDetail

Name
Type
Description

type

string

Resource type using the credential. Values: POD (Used by Pod), ELASTIC (Used by Elastic Deployment).

id

string

Pod ID or Elastic Deployment ID

name

string

Pod Name or Elastic Deployment Name

Response Codes

Code
Message
Description

10000

success

Request successful

10004

no permissions

Permission denied. Cannot delete credentials created by others.

25000

Credential does not exist

The credential being queried or deleted does not exist.

25001

You’ve reached the limit of %s access tokens

Organization limit for credentials reached.

25002

Credential is in use and cannot be deleted.

The credential is currently in use and cannot be deleted.

Last updated

Was this helpful?