# Returns all Feature Flags for the project

Returns all the Feature Flag details for the given project

Endpoint: GET /cf/admin/features
Version: 1.0
Security: x-api-key

## Query parameters:

  - `accountIdentifier` (string, required)
    Account Identifier

  - `orgIdentifier` (string, required)
    Organization Identifier

  - `projectIdentifier` (string, required)
    The Project identifier

  - `environmentIdentifier` (string)
    Environment

  - `pageNumber` (integer)
    PageNumber

  - `pageSize` (integer)
    PageSize

  - `sortOrder` (string)
    SortOrder
    Enum: "ASCENDING", "DESCENDING"

  - `sortByField` (string)
    SortByField
    Enum: "name", "identifier", "archived", "kind", "modifiedAt"

  - `name` (string)
    Name of the field

  - `identifier` (string)
    Identifier of the field

  - `archived` (boolean)
    Status of the feature flag

  - `kind` (string)
    Kind of the feature flag
    Enum: "json", "string", "int", "boolean"

  - `targetIdentifier` (string)
    Identifier of a target

  - `targetIdentifierFilter` (string)
    Identifier of the target to filter on

  - `featureIdentifiers` (string)
    Comma separated identifiers for multiple Features

  - `excludedFeatures` (string)
    Comma separated identifiers to exclude from the response

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

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

  - `enabled` (boolean)
    Filter for flags based on if they are enabled or disabled

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

  - `summary` (boolean)
    Returns summary info on flags if set to true

  - `tags` (string)
    Filter for flags based on their tag values supplied as comma separated list

## Response 200 fields (application/json):

  - `itemCount` (integer, required)
    The total number of items
    Example: 1

  - `pageCount` (integer, required)
    The total number of pages
    Example: 100

  - `pageIndex` (integer, required)
    The current page

  - `pageSize` (integer, required)
    The number of items per page
    Example: 1

  - `version` (integer)
    The version of this object.  The version will be incremented each time the object is modified
    Example: 5

  - `featureCounts` (object)

  - `featureCounts.totalActive` (integer)
    The total number of flags with a active status in a project/environment
    Example: 5

  - `featureCounts.totalAnomaly` (integer)
    The total number of flags with an unacknowledged anomaly status in the project/environment
    Example: 4

  - `featureCounts.totalArchived` (integer)
    The total number of archived flags in the project/environment
    Example: 10

  - `featureCounts.totalEnabled` (integer)
    The total number of flags that are turned on in a project/environment
    Example: 2

  - `featureCounts.totalFeatures` (integer)
    The total number of flags in the project/environment
    Example: 10

  - `featureCounts.totalPermanent` (integer)
    The total number of permanent flags in a project/environment
    Example: 7

  - `featureCounts.totalPotentiallyStale` (integer)
    The total number of flags with a potentially-stale status in a project/environment
    Example: 3

  - `featureCounts.totalRecentlyAccessed` (integer)
    The total number of flags with a recently-accessed status in a project/environment
    Example: 2

  - `features` (array)

  - `features.archived` (boolean)
    Indicates if the flag has been archived and is no longer used

  - `features.createdAt` (integer, required)
    The date the flag was created in milliseconds

  - `features.defaultOffVariation` (string, required)
    The default value returned when a flag is off
    Example: true

  - `features.defaultOnVariation` (string, required)
    The default value returned when a flag is on
    Example: true

  - `features.description` (string)
    A description for this flag
    Example: "A flag to control a new feature in production"

  - `features.envProperties` (object)
    The Feature Flag rules for a given environment

  - `features.envProperties.ccm` (object)
    CCM Details for environment

  - `features.envProperties.ccm.anomalies` (array)
    List of anomalies detected

  - `features.envProperties.ccm.anomalies.acknowledgedAt` (integer)
    The timestamp when the anomaly was acknowledged

  - `features.envProperties.ccm.anomalies.anomalyId` (string, required)
    The Id of the anomaly
    Example: "123456"

  - `features.envProperties.ccm.anomalies.costDifference` (integer)
    The difference value for the anomaly
    Example: 123

  - `features.envProperties.ccm.anomalies.createdAt` (integer, required)
    The creation timestamp of the anomaly record

  - `features.envProperties.ccm.anomalies.foundAt` (integer)
    The timestamp when the anomaly was found

  - `features.envProperties.ccm.anomalies.isAcknowledged` (boolean, required)
    Flag to indicate if the anomaly is acknowledged

  - `features.envProperties.ccm.anomalies.status` (string, required)
    The current status of the anomaly
    Example: "found"

  - `features.envProperties.ccm.perspectiveIdentifier` (string, required)
    Example: "123456"

  - `features.envProperties.ccm.perspectiveName` (string, required)
    Example: "myCluster"

  - `features.envProperties.defaultServe` (object, required)
    Describe the distribution rule and the variation that should be served to the target

  - `features.envProperties.defaultServe.distribution` (object)
    Describes a distribution rule

  - `features.envProperties.defaultServe.distribution.bucketBy` (string, required)
    The attribute to use when distributing targets across buckets

  - `features.envProperties.defaultServe.distribution.variations` (array, required)
    A list of variations and the weight that should be given to each

  - `features.envProperties.defaultServe.distribution.variations.variation` (string, required)
    The variation identifier
    Example: "off-variation"

  - `features.envProperties.defaultServe.distribution.variations.weight` (integer, required)
    The weight to be given to the variation in percent
    Example: 50

  - `features.envProperties.defaultServe.variation` (string)

  - `features.envProperties.environment` (string, required)
    The environment identifier

  - `features.envProperties.jiraEnabled` (boolean)
    Indicates whether jira functionality is enabled for the given account, project, org, and environment

  - `features.envProperties.jiraIssues` (array)
    An array of Jira Issues linked to this Feature. Returns empty if none exist

  - `features.envProperties.jiraIssues.issueKey` (string, required)
    The Jira Issue key
    Example: "FFM-7777"

  - `features.envProperties.jiraIssues.issueURL` (string, required)
    The jira issue URL
    Example: "https://harness-dev1.atlassian.net"

  - `features.envProperties.modifiedAt` (integer)
    The last time the flag was modified in this environment

  - `features.envProperties.offVariation` (string, required)
    The variation to serve for this flag in this environment when the flag is off

  - `features.envProperties.pipelineConfigured` (boolean, required)

  - `features.envProperties.pipelineDetails` (object)
    A pipeline configured to update a feature

  - `features.envProperties.pipelineDetails.createdAt` (integer)
    creation date in milliseconds

  - `features.envProperties.pipelineDetails.description` (string)
    The description of the pipeline

  - `features.envProperties.pipelineDetails.identifier` (string, required)
    The identifier of the pipeline

  - `features.envProperties.pipelineDetails.lastUpdatedAt` (integer)
    last updated date in milliseconds

  - `features.envProperties.pipelineDetails.name` (string, required)
    The name of the pipeline

  - `features.envProperties.pipelineErrorReason` (string)

  - `features.envProperties.pipelineErrorState` (boolean)

  - `features.envProperties.rules` (array)
    A list of rules to use when evaluating this flag in this environment

  - `features.envProperties.rules.clauses` (array, required)
    A list of clauses to use in the rule

  - `features.envProperties.rules.clauses.attribute` (string, required)
    The attribute to use in the clause.  This can be any target attribute
    Example: "identifier"

  - `features.envProperties.rules.clauses.id` (string)
    The unique ID for the clause
    Example: 32434243

  - `features.envProperties.rules.clauses.negate` (boolean, required)
    Is the operation negated?

  - `features.envProperties.rules.clauses.op` (string, required)
    The type of operation such as equals, starts_with, contains
    Example: "starts_with"

  - `features.envProperties.rules.clauses.values` (array, required)
    The values that are compared against the operator

  - `features.envProperties.rules.priority` (integer, required)
    The rules priority relative to other rules.  The rules are evaluated in order with 1 being the highest
    Example: 1

  - `features.envProperties.rules.ruleId` (string)
    The unique identifier for this rule

  - `features.envProperties.rules.serve` (object, required)
    Describe the distribution rule and the variation that should be served to the target

  - `features.envProperties.state` (string, required)
    The state of a flag either off or on
    Enum: "on", "off"

  - `features.envProperties.variationMap` (array)
    A list of the variations that will be served to specific targets or target groups in an environment.

  - `features.envProperties.variationMap.targetSegments` (array)
    A list of target groups (segments)

  - `features.envProperties.variationMap.targets` (array)
    A list of target mappings

  - `features.envProperties.variationMap.targets.identifier` (string, required)
    The identifier for the target

  - `features.envProperties.variationMap.targets.name` (string, required)
    The name of the target

  - `features.envProperties.variationMap.variation` (string, required)
    The variation identifier
    Example: "off-variation"

  - `features.envProperties.version` (integer)
    The version of the flag.  This is incremented each time it is changed

  - `features.evaluation` (string)
    The value that the flag will return for the current user
    Example: true

  - `features.evaluationIdentifier` (string)
    The identifier for the returned evaluation
    Example: "on-variation"

  - `features.identifier` (string, required)
    The Feature Flag identifier
    Example: "bool-flag"

  - `features.kind` (string, required)
    The type of Feature flag
    Enum: "boolean", "int", "string", "json"

  - `features.modifiedAt` (integer)
    The date the flag was last modified in milliseconds

  - `features.name` (string, required)
    The name of the Feature Flag
    Example: "My Boolean Flag"

  - `features.owner` (array)
    The user who created the flag
    Example: "johndoe"

  - `features.permanent` (boolean)
    Indicates if this is a permanent flag, or one that should expire
    Example: true

  - `features.prerequisites` (array)

  - `features.prerequisites.feature` (string, required)
    The feature identifier that is the prerequisite

  - `features.prerequisites.variations` (array, required)
    A list of variations that must be met

  - `features.project` (string, required)
    The project this Feature belongs to
    Example: "test-project"

  - `features.results` (array)
    The results shows which variations have been evaluated, and how many times each of these have been evaluated.

  - `features.results.count` (integer, required)
    The number of times this variation has been returned in a evaluation

  - `features.results.variationIdentifier` (string, required)
    The unique variation identifier
    Example: "defaultOnVariation"

  - `features.results.variationName` (string, required)
    The user friendly variation name
    Example: "Default On Variation"

  - `features.services` (array)
    A list of services linked to this Feature Flag

  - `features.services.identifier` (string, required)
    The identifier of the service

  - `features.services.name` (string, required)
    The name of the service

  - `features.stale` (boolean)
    Whether the flag is stale or not

  - `features.staleReason` (string)
    The reason that the flag was marked as stale
    Example: "matched-criteria"

  - `features.tags` (array)
    A list of tags for this Feature Flag

  - `features.tags.identifier` (string, required)
    The identifier of the tag
    Example: "feature-flag-tag-1"

  - `features.tags.name` (string, required)
    The name of the tag
    Example: "feature-flag-tag-1"

  - `features.variations` (array, required)
    The variations that can be returned for this flag

  - `features.variations.description` (string)
    A description of the variation

  - `features.variations.identifier` (string, required)
    The unique identifier for the variation
    Example: "off-variation"

  - `features.variations.name` (string)
    The user friendly name of the variation
    Example: "Off VAriation"

  - `features.variations.value` (string, required)
    The variation value to serve such as true or false for a boolean flag
    Example: "true"

## Response 401 fields (application/json):

  - `code` (string, required)
    The http error code
    Example: 404

  - `details` (object)
    Additional details about the error

  - `message` (string, required)
    The reason the request failed
    Example: "Error retrieving projects, organization 'default_org' does not exist"


