token

Get token

Request
Security:
ApiKey (readwrite)
query Parameters
tokenId
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/token
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/token?tokenId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Create token

Request
Security:
ApiKey (readwrite)
Request Body schema:
identifier
required
string
name
required
string
validFrom
integer <int64>
validTo
integer <int64>
scheduledExpireTime
integer <int64>
valid
boolean
accountIdentifier
required
string
projectIdentifier
string
orgIdentifier
string
apiKeyIdentifier
required
string
parentIdentifier
required
string
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
description
string [ 0 .. 1024 ] characters
object
email
string
username
string
encodedPassword
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

post/ng/api/token
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "validFrom": 0,
  • "validTo": 0,
  • "scheduledExpireTime": 0,
  • "valid": true,
  • "accountIdentifier": "string",
  • "projectIdentifier": "string",
  • "orgIdentifier": "string",
  • "apiKeyIdentifier": "string",
  • "parentIdentifier": "string",
  • "apiKeyType": "USER",
  • "description": "string",
  • "tags": {
    },
  • "email": "string",
  • "username": "string",
  • "encodedPassword": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "data": "string",
  • "metaData": { },
  • "correlationId": "string"
}

Update token

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string
Request Body schema:
identifier
required
string
name
required
string
validFrom
integer <int64>
validTo
integer <int64>
scheduledExpireTime
integer <int64>
valid
boolean
accountIdentifier
required
string
projectIdentifier
string
orgIdentifier
string
apiKeyIdentifier
required
string
parentIdentifier
required
string
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
description
string [ 0 .. 1024 ] characters
object
email
string
username
string
encodedPassword
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

put/ng/api/token/{identifier}
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "validFrom": 0,
  • "validTo": 0,
  • "scheduledExpireTime": 0,
  • "valid": true,
  • "accountIdentifier": "string",
  • "projectIdentifier": "string",
  • "orgIdentifier": "string",
  • "apiKeyIdentifier": "string",
  • "parentIdentifier": "string",
  • "apiKeyType": "USER",
  • "description": "string",
  • "tags": {
    },
  • "email": "string",
  • "username": "string",
  • "encodedPassword": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Delete token

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
parentIdentifier
required
string
apiKeyIdentifier
required
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

delete/ng/api/token/{identifier}
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/token/:identifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&apiKeyType=USER&parentIdentifier=string&apiKeyIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": true,
  • "metaData": { },
  • "correlationId": "string"
}

List tokens

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
parentIdentifier
required
string
apiKeyIdentifier
required
string
identifiers
Array of strings
pageIndex
integer <int32>
Default: 0
pageSize
integer <int32> <= 100
Default: 50
sortOrders
Array of strings
searchTerm
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/token/aggregate
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/token/aggregate?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&apiKeyType=USER&parentIdentifier=string&apiKeyIdentifier=string&identifiers=string&pageIndex=0&pageSize=50&sortOrders=string&searchTerm=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Rotate token

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string
query Parameters
rotateTimestamp
integer <int64>
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
parentIdentifier
required
string
apiKeyIdentifier
required
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

post/ng/api/token/rotate/{identifier}
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/token/rotate/:identifier?rotateTimestamp=0&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&apiKeyType=USER&parentIdentifier=string&apiKeyIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": "string",
  • "metaData": { },
  • "correlationId": "string"
}