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

Feature Flags

APIs to create and manage Feature Flags

Returns all Feature Flags for the project

get

Returns all the Feature Flag details for the given project

Authorizations
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier

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

Organization Identifier

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

The Project identifier

environmentIdentifierstringOptional

Environment

pageNumberintegerOptional

PageNumber

pageSizeintegerOptional

PageSize

sortOrderstring · enumOptional

SortOrder

Possible values:
sortByFieldstring · enumOptional

SortByField

Possible values:
namestringOptional

Name of the field

identifierstringOptional

Identifier of the field

archivedbooleanOptional

Status of the feature flag

kindstring · enumOptional

Kind of the feature flag

Possible values:
targetIdentifierstringOptional

Identifier of a target

targetIdentifierFilterstringOptional

Identifier of the target to filter on

featureIdentifiersstringOptional

Comma separated identifiers for multiple Features

excludedFeaturesstringOptional

Comma separated identifiers to exclude from the response

statusstringOptional

Filter for flags based on their status (active,never-requested,recently-accessed,potentially-stale)

lifetimestringOptional

Filter for flags based on their lifetime (permanent/temporary)

enabledbooleanOptional

Filter for flags based on if they are enabled or disabled

flagCountsbooleanOptional

Returns counts for the different types of flags e.g num active, potentially-stale, recently-accessed etc

summarybooleanOptional

Returns summary info on flags if set to true

tagsstringOptional

Filter for flags based on their tag values supplied as comma separated list

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/features
GET /gateway/cf/admin/features?accountIdentifier=text&orgIdentifier=text&projectIdentifier=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,
  "featureCounts": {
    "totalActive": 5,
    "totalAnomaly": 4,
    "totalArchived": 10,
    "totalEnabled": 2,
    "totalFeatures": 10,
    "totalPermanent": 7,
    "totalPotentiallyStale": 3,
    "totalRecentlyAccessed": 2
  },
  "features": [
    {
      "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"
        }
      ]
    }
  ]
}

Creates a Feature Flag

post

Creates a Feature Flag in the Project

Authorizations
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier

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

Organization Identifier

Example: {"value":"default_org"}
Body
archivedbooleanOptional
defaultOffVariationstringRequired
defaultOnVariationstringRequired
descriptionstringOptional
identifierstringRequired
kindstring · enumRequiredExample: booleanPossible values:
namestringRequired
ownerstringOptional
permanentbooleanRequired
projectstringRequired
Responses
201

OK

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

{
  "archived": true,
  "defaultOffVariation": "text",
  "defaultOnVariation": "text",
  "description": "text",
  "gitDetails": {
    "commitMsg": "Turning on flag test-flag for production"
  },
  "identifier": "text",
  "kind": "boolean",
  "name": "text",
  "owner": "text",
  "permanent": true,
  "prerequisites": [
    {
      "feature": "text",
      "variations": [
        "text"
      ]
    }
  ],
  "project": "text",
  "services": [
    {
      "identifier": "text",
      "name": "text"
    }
  ],
  "tags": [
    {
      "identifier": "feature-flag-tag-1",
      "name": "feature-flag-tag-1"
    }
  ],
  "variations": [
    {
      "description": "text",
      "identifier": "off-variation",
      "name": "Off VAriation",
      "value": "true"
    }
  ]
}
{
  "details": {
    "governanceMetadata": {},
    "pipelineMetadata": {
      "pipelineExecutionId": "text",
      "pipelineTriggered": true
    }
  }
}

Returns a Feature Flag

get

Returns details such as Variation name, identifier etc for the given Feature Flag

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

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/features/{identifier}
GET /gateway/cf/admin/features/{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"
    }
  ]
}

Updates a Feature Flag

put

Updates a Feature Flag in the Project

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

Body
defaultOffVariationstringOptional
defaultOnVariationstringOptional
descriptionstringOptional
namestringOptional
permanentbooleanOptional
Responses
200

OK

application/json
put/admin/features/{identifier}
PUT /gateway/cf/admin/features/{identifier}?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: 527

{
  "defaultOffVariation": "text",
  "defaultOnVariation": "text",
  "description": "text",
  "environments": [
    {
      "defaultOffVariation": "red",
      "defaultOnVariation": "blue",
      "identifier": "env1",
      "rules": [
        {
          "targets": [
            "target1",
            "target2"
          ],
          "variation": true
        }
      ],
      "state": "on"
    }
  ],
  "gitDetails": {
    "commitMsg": "Turning on flag test-flag for production"
  },
  "name": "text",
  "permanent": true,
  "tags": [
    {
      "identifier": "feature-flag-tag-1",
      "name": "feature-flag-tag-1"
    }
  ],
  "variations": [
    {
      "description": "text",
      "identifier": "off-variation",
      "name": "Off VAriation",
      "value": "true"
    }
  ]
}
{
  "details": {
    "governanceMetadata": {},
    "pipelineMetadata": {
      "pipelineExecutionId": "text",
      "pipelineTriggered": true
    }
  }
}

Delete a Feature Flag

delete

Delete Feature Flag 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/features/{identifier}
DELETE /gateway/cf/admin/features/{identifier}?accountIdentifier=text&orgIdentifier=text&projectIdentifier=text HTTP/1.1
Host: app.harness.io
x-api-key: YOUR_API_KEY
Accept: */*

No content

Updates a Feature Flag

patch

This operation is used to modify a Feature Flag. The request body can include one or more instructions that can modify flag attributes such as the state (off|on), the variations that are returned and serving rules. For example if you want to turn a flag off you can use this opeartion and send the setFeatureFlagState

{ "kind": "setFeatureFlagState", "parameters": { "state": "off" } }

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

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/features/{identifier}
PATCH /gateway/cf/admin/features/{identifier}?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: 3477

{
  "gitDetails": {
    "commitMsg": "Making some changes"
  },
  "instructions": [
    {
      "kind": "updateName",
      "parameters": {
        "name": "Updated Name"
      }
    },
    {
      "kind": "updateDescription",
      "parameters": {
        "description": "Updated Description"
      }
    },
    {
      "kind": "addPrerequisite",
      "parameters": {
        "feature": "feature1",
        "variations": [
          "variation1",
          "variation2"
        ]
      }
    },
    {
      "kind": "updatePrerequisite",
      "parameters": {
        "feature": "feature1",
        "variations": [
          "variation1"
        ]
      }
    },
    {
      "kind": "removePrerequisite",
      "parameters": {
        "feature": "feature1"
      }
    },
    {
      "kind": "addVariation",
      "parameters": {
        "description": "Variation 1 description",
        "identifier": "variation_1",
        "name": "variation1",
        "value": "v1"
      }
    },
    {
      "kind": "updateVariation",
      "parameters": {
        "description": "Variation 1 description",
        "identifier": "variation_1",
        "name": "variation1",
        "value": "v1"
      }
    },
    {
      "kind": "deleteVariation",
      "parameters": {
        "identifier": "variation_1"
      }
    },
    {
      "kind": "setDefaultOnVariation",
      "parameters": {
        "identifier": "variation_1"
      }
    },
    {
      "kind": "setDefaultOffVariation",
      "parameters": {
        "identifier": "variation_1"
      }
    },
    {
      "kind": "addTag",
      "parameters": {
        "name": "TagName",
        "value": "TagValue"
      }
    },
    {
      "kind": "updateTag",
      "parameters": {
        "name": "TagName",
        "value": "TagValue"
      }
    },
    {
      "kind": "removeTag",
      "parameters": {
        "name": "TagName",
        "value": "TagValue"
      }
    },
    {
      "kind": "setFeatureFlagState",
      "parameters": {
        "state": "on"
      }
    },
    {
      "kind": "setFeatureFlagState",
      "parameters": {
        "state": "off"
      }
    },
    {
      "kind": "addTargetsToVariationTargetMap",
      "parameters": {
        "targets": [
          "target1-identifier",
          "target2-identifier"
        ],
        "variation": "variation-identifier"
      }
    },
    {
      "kind": "removeTargetsToVariationTargetMap",
      "parameters": {
        "targets": [
          "target1-identifier",
          "target2-identifier"
        ],
        "variation": "variation-identifier"
      }
    },
    {
      "kind": "addSegmentToVariationTargetMap",
      "parameters": {
        "targetSegments": [
          "segment1",
          "segment2"
        ],
        "variation": "variation-identifier"
      }
    },
    {
      "kind": "removeSegmentToVariationTargetMap",
      "parameters": {
        "targetSegments": [
          "segment3",
          "segment4"
        ],
        "variation": "variation-identifier"
      }
    },
    {
      "kind": "clearVariationTargetMapping",
      "parameters": {
        "variation": "variation-identifier"
      }
    },
    {
      "kind": "addRule",
      "parameters": {
        "clauses": [
          {
            "attribute": "email",
            "op": "eq",
            "values": [
              "user1@gmail.com",
              "user2@gmail.com"
            ]
          }
        ],
        "priority": 1,
        "serve": {
          "variation": "variation1"
        },
        "uuid": "fd2ebf1f-7efb-4324-a7ee-6de0a47bf826"
      }
    },
    {
      "kind": "removeRule",
      "parameters": {
        "ruleID": "testRuleID"
      }
    },
    {
      "kind": "addClause",
      "parameters": {
        "clause": {
          "attribute": "email",
          "op": "eq",
          "values": [
            "user1@gmail.com",
            "user2@gmail.com"
          ]
        },
        "ruleID": "testRuleID"
      }
    },
    {
      "kind": "removeClause",
      "parameters": {
        "clauseID": "testClauseID",
        "ruleID": "testRuleID"
      }
    },
    {
      "kind": "updateClause",
      "parameters": {
        "clause": [
          {
            "attribute": "email",
            "op": "eq",
            "values": [
              "user1@gmail.com",
              "user2@gmail.com"
            ]
          }
        ],
        "clauseID": "testClauseID",
        "ruleID": "testRuleID"
      }
    },
    {
      "kind": "reorderRules",
      "parameters": {
        "rules": [
          "rule1",
          "rule2",
          "rule3"
        ]
      }
    },
    {
      "kind": "updateDefaultServe",
      "parameters": {
        "bucketBy": "accountID",
        "variations": [
          {
            "variation": "variation1",
            "weight": 30
          },
          {
            "variation": "variation2",
            "weight": 60
          },
          {
            "variation": "variation3",
            "weight": 10
          }
        ]
      }
    },
    {
      "kind": "updateRule",
      "parameters": {
        "ruleID": "testRuleID",
        "variation": "variation1"
      }
    },
    {
      "kind": "updateRule",
      "parameters": {
        "bucketBy": "accountID",
        "ruleID": "testRuleID",
        "variations": [
          {
            "variation": "variation1",
            "weight": 30
          },
          {
            "variation": "variation2",
            "weight": 60.66
          },
          {
            "variation": "variation3",
            "weight": 10.01
          }
        ]
      }
    },
    {
      "kind": "updateDefaultServe",
      "parameters": {
        "variation": "variation1"
      }
    },
    {
      "kind": "updateOffVariation",
      "parameters": {
        "variation": "variation1"
      }
    },
    {
      "Kind": "updateArchived",
      "parameters": {
        "archived": true
      }
    },
    {
      "Kind": "updatePermanent",
      "parameters": {
        "permanent": true
      }
    }
  ]
}
{
  "details": {
    "governanceMetadata": {},
    "pipelineMetadata": {
      "pipelineExecutionId": "text",
      "pipelineTriggered": true
    }
  }
}

Return a list of dependant flags

get

Given identifier return list all the flags which depend on it.

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

pageNumberintegerOptional

PageNumber

pageSizeintegerOptional

PageSize

sortOrderstring · enumOptional

SortOrder

Possible values:
sortByFieldstring · enumOptional

SortByField

Possible values:
namestringOptional

Name of the field

archivedbooleanOptional

Status of the feature flag

kindstring · enumOptional

Kind of the feature flag

Possible values:
targetIdentifierstringOptional

Identifier of a target

targetIdentifierFilterstringOptional

Identifier of the target to filter on

metricsbooleanOptional

Parameter to indicate if metrics data is requested in response

featureIdentifiersstringOptional

Comma separated identifiers for multiple Features

excludedFeaturesstringOptional

Comma separated identifiers to exclude from the response

statusstringOptional

Filter for flags based on their status (active,never-requested,recently-accessed,potentially-stale)

lifetimestringOptional

Filter for flags based on their lifetime (permanent/temporary)

enabledbooleanOptional

Filter for flags based on if they are enabled or disabled

flagCountsbooleanOptional

Returns counts for the different types of flags e.g num active, potentially-stale, recently-accessed etc

summarybooleanOptional

Returns summary info on flags if set to true

tagsstringOptional

Filter for flags based on their tag values supplied as comma separated list

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/features/{identifier}/dependants
GET /gateway/cf/admin/features/{identifier}/dependants?accountIdentifier=text&orgIdentifier=text&projectIdentifier=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,
  "featureCounts": {
    "totalActive": 5,
    "totalAnomaly": 4,
    "totalArchived": 10,
    "totalEnabled": 2,
    "totalFeatures": 10,
    "totalPermanent": 7,
    "totalPotentiallyStale": 3,
    "totalRecentlyAccessed": 2
  },
  "features": [
    {
      "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"
        }
      ]
    }
  ]
}

Restore a Feature Flag

post

Restore Feature Flag 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

Responses
204

No content

No content

post/admin/features/{identifier}/restore
POST /gateway/cf/admin/features/{identifier}/restore?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?