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

Tags

APIs to create and manage Feature Flag Tags

Returns all Tags

get

Returns all the Tags for the given Account ID

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:
sortByFieldstring · enumOptional

SortByField

Possible values:
tagIdentifierFilterstringOptional

Partial Search of Tag Identifiers to filter on

Responses
200

OK

application/json
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/tags
GET /gateway/cf/admin/tags?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,
  "tags": [
    {
      "identifier": "feature-flag-tag-1",
      "name": "feature-flag-tag-1"
    }
  ]
}

Creates a Tag

post

Create Tags for the given identifier

Authorizations
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier

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

Organization Identifier

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

The Project identifier

Body

A Tag object used to tag feature flags - consists of name and identifier

identifierstringRequired

The identifier of the tag

Example: feature-flag-tag-1
namestringRequired

The name of the tag

Example: feature-flag-tag-1
Responses
201

OK

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

{
  "identifier": "feature-flag-tag-1",
  "name": "feature-flag-tag-1"
}
{
  "details": {
    "governanceMetadata": {}
  }
}

Returns a Tag

get

Returns details such as identifier,Associated Feature Flag etc for the given Tag

Authorizations
x-api-keystringRequired
Path parameters
identifierstringRequired

Unique identifier for the object in the API.

Query parameters
accountIdentifierstringRequired

Account Identifier

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

Organization Identifier

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

The Project identifier

environmentIdentifierstringOptional

Environment

metricsbooleanOptional

Parameter to indicate if metrics data is requested in response

archivedbooleanOptional

Status of the feature flag

Responses
200

OK

application/json

A Feature Flag response

archivedbooleanOptional

Indicates if the flag has been archived and is no longer used

Example: false
createdAtinteger · int64Required

The date the flag was created in milliseconds

defaultOffVariationstringRequired

The default value returned when a flag is off

Example: true
defaultOnVariationstringRequired

The default value returned when a flag is on

Example: true
descriptionstringOptional

A description for this flag

Example: A flag to control a new feature in production
evaluationstringOptional

The value that the flag will return for the current user

Example: true
evaluationIdentifierstringOptional

The identifier for the returned evaluation

Example: on-variation
identifierstringRequired

The Feature Flag identifier

Example: bool-flag
kindstring · enumRequired

The type of Feature flag

Example: booleanPossible values:
modifiedAtinteger · int64Optional

The date the flag was last modified in milliseconds

namestringRequired

The name of the Feature Flag

Example: My Boolean Flag
ownerstring[]Optional

The user who created the flag

Example: johndoe
permanentbooleanOptional

Indicates if this is a permanent flag, or one that should expire

Example: true
projectstringRequired

The project this Feature belongs to

Example: test-project
stalebooleanOptional

Whether the flag is stale or not

Example: false
staleReasonstringOptional

The reason that the flag was marked as stale

Example: matched-criteria
get/admin/tags/{identifier}
GET /gateway/cf/admin/tags/{identifier}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text HTTP/1.1
Host: app.harness.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "archived": false,
  "createdAt": 1,
  "defaultOffVariation": true,
  "defaultOnVariation": true,
  "description": "A flag to control a new feature in production",
  "envProperties": {
    "ccm": {
      "anomalies": [
        {
          "acknowledgedAt": 0,
          "anomalyId": "123456",
          "costDifference": 123,
          "createdAt": 0,
          "foundAt": 0,
          "isAcknowledged": false,
          "status": "found"
        }
      ],
      "perspectiveIdentifier": "123456",
      "perspectiveName": "myCluster"
    },
    "defaultServe": {
      "distribution": {
        "bucketBy": "text",
        "variations": [
          {
            "variation": "off-variation",
            "weight": 50
          }
        ]
      },
      "variation": "text"
    },
    "environment": "text",
    "jiraEnabled": true,
    "jiraIssues": [
      {
        "issueKey": "FFM-7777",
        "issueURL": "https://harness-dev1.atlassian.net"
      }
    ],
    "modifiedAt": 1,
    "offVariation": "text",
    "pipelineConfigured": true,
    "pipelineDetails": {
      "createdAt": 1,
      "description": "text",
      "identifier": "text",
      "lastUpdatedAt": 1,
      "name": "text"
    },
    "pipelineErrorReason": "text",
    "pipelineErrorState": true,
    "rules": [
      {
        "clauses": [
          {
            "attribute": "identifier",
            "id": 32434243,
            "negate": false,
            "op": "starts_with",
            "values": [
              "text"
            ]
          }
        ],
        "priority": 1,
        "ruleId": "text",
        "serve": {
          "distribution": {
            "bucketBy": "text",
            "variations": [
              {
                "variation": "off-variation",
                "weight": 50
              }
            ]
          },
          "variation": "text"
        }
      }
    ],
    "state": "on",
    "variationMap": [
      {
        "targetSegments": [
          "text"
        ],
        "targets": [
          {
            "identifier": "text",
            "name": "text"
          }
        ],
        "variation": "off-variation"
      }
    ],
    "version": 1
  },
  "evaluation": true,
  "evaluationIdentifier": "on-variation",
  "identifier": "bool-flag",
  "kind": "boolean",
  "modifiedAt": 1,
  "name": "My Boolean Flag",
  "owner": "johndoe",
  "permanent": true,
  "prerequisites": [
    {
      "feature": "text",
      "variations": [
        "text"
      ]
    }
  ],
  "project": "test-project",
  "results": [
    {
      "count": 1,
      "variationIdentifier": "defaultOnVariation",
      "variationName": "Default On Variation"
    }
  ],
  "services": [
    {
      "identifier": "text",
      "name": "text"
    }
  ],
  "stale": false,
  "staleReason": "matched-criteria",
  "tags": [
    {
      "identifier": "feature-flag-tag-1",
      "name": "feature-flag-tag-1"
    }
  ],
  "variations": [
    {
      "description": "text",
      "identifier": "off-variation",
      "name": "Off VAriation",
      "value": "true"
    }
  ]
}

Delete a Tag

delete

Delete Tag for the given identifier and account ID

Authorizations
x-api-keystringRequired
Path parameters
identifierstringRequired

Unique identifier for the object in the API.

Query parameters
accountIdentifierstringRequired

Account Identifier

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

Organization Identifier

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

The Project identifier

commitMsgstringOptional

Git commit message

forceDeletebooleanOptional

Permanently deletes the the feature flag

Responses
204

No content

No content

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

No content

Last updated

Was this helpful?