apikey

List api keys

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
parentIdentifier
required
string
identifiers
Array of strings
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/apikey
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/apikey?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&apiKeyType=USER&parentIdentifier=string&identifiers=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": [
    ],
  • "metaData": { },
  • "correlationId": "string"
}

Create api key

Request
Security:
ApiKey (readwrite)
Request Body schema:
identifier
required
string
name
required
string
description
string [ 0 .. 1024 ] characters
object
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
parentIdentifier
required
string
defaultTimeToExpireToken
integer <int64>
accountIdentifier
required
string
projectIdentifier
string
orgIdentifier
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

post/ng/api/apikey
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "description": "string",
  • "tags": {
    },
  • "apiKeyType": "USER",
  • "parentIdentifier": "string",
  • "defaultTimeToExpireToken": 0,
  • "accountIdentifier": "string",
  • "projectIdentifier": "string",
  • "orgIdentifier": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Update api key

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string
Request Body schema:
identifier
required
string
name
required
string
description
string [ 0 .. 1024 ] characters
object
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
parentIdentifier
required
string
defaultTimeToExpireToken
integer <int64>
accountIdentifier
required
string
projectIdentifier
string
orgIdentifier
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

put/ng/api/apikey/{identifier}
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "description": "string",
  • "tags": {
    },
  • "apiKeyType": "USER",
  • "parentIdentifier": "string",
  • "defaultTimeToExpireToken": 0,
  • "accountIdentifier": "string",
  • "projectIdentifier": "string",
  • "orgIdentifier": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Delete api key

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
Responses
200

successful operation

400

Bad Request

500

Internal server error

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

List api key

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
apiKeyType
required
string
Enum: "USER" "SERVICE_ACCOUNT"
parentIdentifier
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/apikey/aggregate
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/apikey/aggregate?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&apiKeyType=USER&parentIdentifier=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"
}

Get api key

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
Responses
200

successful operation

400

Bad Request

500

Internal server error

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