Delegate Token Resource

Contains APIs related to Delegate Token management

Creates Delegate Token.

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

tokenName
required
string

Delegate Token name

Responses
400

Bad Request

500

Internal server error

default

A created Token.

post/ng/api/delegate-token-ng
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/delegate-token-ng?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&tokenName=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Lists delegate groups that are using the specified delegate token.

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

delegateTokenName
string

Delegate Token name

Responses
400

Bad Request

500

Internal server error

default

A list of delegate groups that are usign the specified token.

get/ng/api/delegate-token-ng/delegate-groups
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/delegate-token-ng/delegate-groups?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&delegateTokenName=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Retrieves Delegate Tokens by Account, Organization, Project and status.

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

status
string

Status of Delegate Token (ACTIVE or REVOKED). If left empty both active and revoked tokens will be retrieved

Enum: "ACTIVE" "REVOKED"
Responses
400

Bad Request

500

Internal server error

default

A list of Delegate Tokens

get/ng/api/delegate-token-ng
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/delegate-token-ng?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&status=ACTIVE' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Revokes Delegate Token.

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

tokenName
required
string

Delegate Token name

Responses
400

Bad Request

500

Internal server error

default

200 Ok response if everything successfully revoked token

put/ng/api/delegate-token-ng
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/ng/api/delegate-token-ng?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&tokenName=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}