Targets

APIs to create and manage Feature Flag Targets

Returns all Targets

Returns all the Targets for the given Account ID

Securityx-api-key
Request
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: "ASC" "DESC"
sortByField
string

SortByField

Enum: "createdAt" "name" "identifier"
targetName
string

Name of the target

targetIdentifier
string

Identifier of the target

Responses
200

OK

401

Unauthenticated

403

Unauthorized

404

The specified resource was not found

500

Internal server error

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

Creates a Target

Create Targets for the given identifier

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
account
required
string

The account ID that the target belongs to

anonymous
boolean

Indicates if this target is anonymous

attributes
object

a JSON representation of the attributes for this target

createdAt
integer <int64>

The date and time in milliseconds when this Target was created

environment
required
string

The identifier for the environment that the target belongs to

identifier
required
string

The unique identifier for this target

name
required
string

The name of this Target

org
required
string

The identifier for the organization that the target belongs to

project
required
string

The identifier for the project that this target belongs to

Array of objects (Segment)

A list of Target Groups (Segments) that this Target belongs to

Responses
201

Created

400

Bad request

401

Unauthenticated

403

Unauthorized

409

The specified resource already exists

500

Internal server error

post/cf/admin/targets
Request samples
application/json
{
  • "account": "abcXDdffdaffd",
  • "anonymous": true,
  • "attributes": {
    },
  • "createdAt": 0,
  • "environment": "string",
  • "identifier": "john-doe",
  • "name": "John Doe",
  • "org": "string",
  • "project": "string",
  • "segments": [
    ]
}
Response samples
application/json
{
  • "code": 404,
  • "details": { },
  • "message": "Error retrieving projects, organization 'default_org' does not exist"
}

Add Target details

Add targets by uploading a CSV file

Securityx-api-key
Request
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: multipart/form-data
fileName
string <binary>
Responses
200

Created

400

Bad request

401

Unauthenticated

403

Unauthorized

409

The specified resource already exists

500

Internal server error

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

Deletes a Target

Deletes a Target 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
204

No content

401

Unauthenticated

403

Unauthorized

404

The specified resource was not found

500

Internal server error

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

Returns details of a Target

Returns details of a Target 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/targets/{identifier}
Request samples
Response samples
application/json
{
  • "account": "abcXDdffdaffd",
  • "anonymous": true,
  • "attributes": {
    },
  • "createdAt": 0,
  • "environment": "string",
  • "identifier": "john-doe",
  • "name": "John Doe",
  • "org": "string",
  • "project": "string",
  • "segments": [
    ]
}

Updates a Target

Updates a Target 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/targets/{identifier}
Request samples
application/json
{
  • "gitDetails": {
    },
  • "instructions": [
    ]
}
Response samples
application/json
{
  • "account": "abcXDdffdaffd",
  • "anonymous": true,
  • "attributes": {
    },
  • "createdAt": 0,
  • "environment": "string",
  • "identifier": "john-doe",
  • "name": "John Doe",
  • "org": "string",
  • "project": "string",
  • "segments": [
    ]
}

Modifies a Target

Modifies a Target for the given account 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
required
account
required
string

The account ID that the target belongs to

anonymous
boolean

Indicates if this target is anonymous

attributes
object

a JSON representation of the attributes for this target

createdAt
integer <int64>

The date and time in milliseconds when this Target was created

environment
required
string

The identifier for the environment that the target belongs to

identifier
required
string

The unique identifier for this target

name
required
string

The name of this Target

org
required
string

The identifier for the organization that the target belongs to

project
required
string

The identifier for the project that this target belongs to

Array of objects (Segment)

A list of Target Groups (Segments) that this Target belongs to

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

put/cf/admin/targets/{identifier}
Request samples
application/json
{
  • "account": "abcXDdffdaffd",
  • "anonymous": true,
  • "attributes": {
    },
  • "createdAt": 0,
  • "environment": "string",
  • "identifier": "john-doe",
  • "name": "John Doe",
  • "org": "string",
  • "project": "string",
  • "segments": [
    ]
}
Response samples
application/json
{
  • "account": "abcXDdffdaffd",
  • "anonymous": true,
  • "attributes": {
    },
  • "createdAt": 0,
  • "environment": "string",
  • "identifier": "john-doe",
  • "name": "John Doe",
  • "org": "string",
  • "project": "string",
  • "segments": [
    ]
}

Returns Target Groups for the given Target

Returns the Target Groups that the specified Target belongs to.

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/targets/{identifier}/segments
Request samples
Response samples
application/json
{
  • "excludedSegments": [
    ],
  • "identifier": "string",
  • "includedSegments": [
    ],
  • "ruleSegments": [
    ]
}