Target Groups

APIs to create and manage Feature Flag Target Groups

Returns all Target Groups

Returns Target Group details for the given account

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier

Examples:
accountIdentifier=default
orgIdentifier
required
string

Organization Identifier

Examples:
orgIdentifier=default_org
environmentIdentifier
required
string

Environment Identifier

projectIdentifier
required
string

The Project identifier

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

rules
string

When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.

Responses
200

OK

401

Unauthenticated

403

Unauthorized

500

Internal server error

get/cf/admin/segments
Request samples
Response samples
application/json
{
  • "itemCount": 1,
  • "pageCount": 100,
  • "pageIndex": 0,
  • "pageSize": 1,
  • "version": 5,
  • "segments": [
    ]
}

Creates a Target Group

Creates a Target Group in the given Project

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier

Examples:
accountIdentifier=default
orgIdentifier
required
string

Organization Identifier

Examples:
orgIdentifier=default_org
Request Body schema: application/json
required
environment
required
string
excluded
Array of strings
identifier
string
included
Array of strings
name
required
string

Name of the target segment.

project
required
string
Array of objects (Clause)

An array of rules that can cause a user to be included in this segment.

Array of objects (GroupServingRule)

An array of rules that can cause a user to be included in this segment.

Array of objects (Tag)
Responses
201

Created

400

Bad request

401

Unauthenticated

403

Unauthorized

409

The specified resource already exists

500

Internal server error

post/cf/admin/segments
Request samples
application/json
{
  • "environment": "string",
  • "excluded": [
    ],
  • "identifier": "beta-testers",
  • "included": [
    ],
  • "name": "Beta Testers",
  • "project": "string",
  • "rules": [
    ],
  • "servingRules": [
    ],
  • "tags": [
    ]
}
Response samples
application/json
{
  • "code": 404,
  • "details": { },
  • "message": "Error retrieving projects, organization 'default_org' does not exist"
}

Deletes a Target Group

Deletes a Target Group for the given ID

Securityx-api-key
Request
path Parameters
identifier
required
string

Unique identifier for the object in the API.

query Parameters
accountIdentifier
required
string

Account Identifier

Examples:
accountIdentifier=default
orgIdentifier
required
string

Organization Identifier

Examples:
orgIdentifier=default_org
projectIdentifier
required
string

The Project identifier

environmentIdentifier
required
string

Environment Identifier

Responses
204

No content

401

Unauthenticated

403

Unauthorized

404

The specified resource was not found

500

Internal server error

delete/cf/admin/segments/{identifier}
Request samples
Response samples
application/json
{
  • "code": 404,
  • "details": { },
  • "message": "Error retrieving projects, organization 'default_org' does not exist"
}

Returns Target Group details for the given identifier

Returns Target Group details for the given ID

Securityx-api-key
Request
path Parameters
identifier
required
string

Unique identifier for the object in the API.

query Parameters
accountIdentifier
required
string

Account Identifier

Examples:
accountIdentifier=default
orgIdentifier
required
string

Organization Identifier

Examples:
orgIdentifier=default_org
projectIdentifier
required
string

The Project identifier

environmentIdentifier
required
string

Environment Identifier

rules
string

When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.

Responses
200

OK

401

Unauthenticated

403

Unauthorized

404

The specified resource was not found

500

Internal server error

get/cf/admin/segments/{identifier}
Request samples
Response samples
application/json
{
  • "createdAt": 0,
  • "environment": "Production",
  • "excluded": [
    ],
  • "identifier": "string",
  • "included": [
    ],
  • "modifiedAt": 0,
  • "name": "Beta Testers",
  • "rules": [
    ],
  • "servingRules": [
    ],
  • "tags": [
    ],
  • "version": 1
}

Updates a Target Group

Updates a Target Group for the given identifier

Securityx-api-key
Request
path Parameters
identifier
required
string

Unique identifier for the object in the API.

query Parameters
accountIdentifier
required
string

Account Identifier

Examples:
accountIdentifier=default
orgIdentifier
required
string

Organization Identifier

Examples:
orgIdentifier=default_org
projectIdentifier
required
string

The Project identifier

environmentIdentifier
required
string

Environment Identifier

Request Body schema: application/json
comment
string

A comment explaining the reason for this patch operation

executionTime
integer

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

object (CfGitDetails)

The commit message to use as part of a gitsync operation

required
Array of objects (PatchInstruction)

A list of Patch Instructions

Responses
200

OK

400

Bad request

401

Unauthenticated

403

Unauthorized

404

The specified resource was not found

409

The specified resource already exists

500

Internal server error

patch/cf/admin/segments/{identifier}
Request samples
application/json
{
  • "instructions": [
    ]
}
Response samples
application/json
{
  • "createdAt": 0,
  • "environment": "Production",
  • "excluded": [
    ],
  • "identifier": "string",
  • "included": [
    ],
  • "modifiedAt": 0,
  • "name": "Beta Testers",
  • "rules": [
    ],
  • "servingRules": [
    ],
  • "tags": [
    ],
  • "version": 1
}

Returns Feature Flags that are available to be added to the given Target Group

Returns the list of Feature Flags that the Target Group can be added to. This list will exclude any Feature Flag that the Target Group is already part of.

Securityx-api-key
Request
path Parameters
identifier
required
string

Unique identifier for the object in the API.

query Parameters
accountIdentifier
required
string

Account Identifier

Examples:
accountIdentifier=default
orgIdentifier
required
string

Organization Identifier

Examples:
orgIdentifier=default_org
projectIdentifier
required
string

The Project identifier

environmentIdentifier
required
string

Environment Identifier

pageNumber
integer

PageNumber

pageSize
integer

PageSize

sortOrder
string

SortOrder

Enum: "ASCENDING" "DESCENDING"
sortByField
string

SortByField

Value: "name"
flagNameIdentifier
string

Identifier of the feature flag

Responses
200

OK

401

Unauthenticated

403

Unauthorized

404

The specified resource was not found

500

Internal server error

get/cf/admin/segments/{identifier}/available_flags
Request samples
Response samples
application/json
{
  • "itemCount": 1,
  • "pageCount": 100,
  • "pageIndex": 0,
  • "pageSize": 1,
  • "version": 5,
  • "featureFlags": [
    ]
}

Returns Feature Flags in a Target Group

Returns the details of a Feature Flag in a Target Group for the given identifier

Securityx-api-key
Request
path Parameters
identifier
required
string

Unique identifier for the object in the API.

query Parameters
accountIdentifier
required
string

Account Identifier

Examples:
accountIdentifier=default
orgIdentifier
required
string

Organization Identifier

Examples:
orgIdentifier=default_org
projectIdentifier
required
string

The Project identifier

environmentIdentifier
required
string

Environment Identifier

Responses
200

OK

401

Unauthenticated

403

Unauthorized

404

The specified resource was not found

500

Internal server error

get/cf/admin/segments/{identifier}/flags
Request samples
Response samples
application/json
[
  • {
    }
]