For the complete documentation index, see llms.txt. This page is also available as Markdown.

Attributes

APIS to create and manage Target Group Attributes

Returns all custom attributes for the project

get

Returns all the custom attributes the given environment

Authorizations
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier

Example: {"value":"default"}
orgIdentifierstringRequired

Organization Identifier

Example: {"value":"default_org"}
projectIdentifierstringRequired

The Project identifier

environmentIdentifierstringRequired

Environment Identifier

pageNumberintegerOptional

PageNumber

pageSizeintegerOptional

PageSize

sortOrderstring · enumOptional

SortOrder

Possible values:
customAttributesbooleanOptional

Returns only custom attributes

attributeCountsbooleanOptional

Returns attribute

Responses
200

OK

application/json

A list of Attributes

itemCountintegerRequired

The total number of items

Example: 1
pageCountintegerRequired

The total number of pages

Example: 100
pageIndexintegerRequired

The current page

Example: 0
pageSizeintegerRequired

The number of items per page

Example: 1
versionintegerOptional

The version of this object. The version will be incremented each time the object is modified

Example: 5
get/admin/attributes
GET /gateway/cf/admin/attributes?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: app.harness.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "itemCount": 1,
  "pageCount": 100,
  "pageIndex": 0,
  "pageSize": 1,
  "version": 5,
  "attributes": [
    {
      "key": "age"
    }
  ]
}

Creates a custom Attribute

post

Creates a custom attribute for given environment

Authorizations
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier

Example: {"value":"default"}
orgIdentifierstringRequired

Organization Identifier

Example: {"value":"default_org"}
projectIdentifierstringRequired

The Project identifier

environmentIdentifierstringRequired

Environment Identifier

Body

An Attribute, object property to evaluate targets on.

keystringRequired

The attribute key

Example: age
Responses
201

OK

application/json
post/admin/attributes
POST /gateway/cf/admin/attributes?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: app.harness.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "key": "age"
}
{
  "details": {
    "governanceMetadata": {}
  }
}

Returns an Attribute

get

Returns Attribute

Authorizations
x-api-keystringRequired
Path parameters
keystringRequired

Unique key for the attribute in the API.

Query parameters
accountIdentifierstringRequired

Account Identifier

Example: {"value":"default"}
orgIdentifierstringRequired

Organization Identifier

Example: {"value":"default_org"}
projectIdentifierstringRequired

The Project identifier

environmentIdentifierstringRequired

Environment Identifier

Responses
200

OK

application/json

An Attribute, object property to evaluate targets on.

keystringRequired

The attribute key

Example: age
get/admin/attributes/{key}
GET /gateway/cf/admin/attributes/{key}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: app.harness.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "key": "age"
}

Delete an Attribute

delete

Delete an Attribute for the given key and environmentID

Authorizations
x-api-keystringRequired
Path parameters
keystringRequired

Unique key for the attribute in the API.

Query parameters
accountIdentifierstringRequired

Account Identifier

Example: {"value":"default"}
orgIdentifierstringRequired

Organization Identifier

Example: {"value":"default_org"}
projectIdentifierstringRequired

The Project identifier

environmentIdentifierstringRequired

Environment Identifier

Responses
204

No content

No content

delete/admin/attributes/{key}
DELETE /gateway/cf/admin/attributes/{key}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: app.harness.io
x-api-key: YOUR_API_KEY
Accept: */*

No content

Update Attribute for the environment

patch

Updates Attribute key details for the given environment

Authorizations
x-api-keystringRequired
Path parameters
keystringRequired

Unique key for the attribute in the API.

Query parameters
accountIdentifierstringRequired

Account Identifier

Example: {"value":"default"}
orgIdentifierstringRequired

Organization Identifier

Example: {"value":"default_org"}
projectIdentifierstringRequired

The Project identifier

environmentIdentifierstringRequired

Environment Identifier

Body
commentstringOptional

A comment explaining the reason for this patch operation

Example: This is a comment string
executionTimeintegerOptional

Time of execution in unix epoch milliseconds when the scheduled changes will be applied

Responses
200

OK

application/json
patch/admin/attributes/{key}
PATCH /gateway/cf/admin/attributes/{key}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: app.harness.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "instructions": [
    {
      "kind": "updateAttribute",
      "parameters": {
        "key": "Updated attributeKey"
      }
    }
  ]
}
{
  "details": {
    "governanceMetadata": {}
  }
}

Last updated

Was this helpful?