Get Segment

Reference for the GET /console/v1/segments/{id} endpoint of the Statsig API.

gethttps://statsigapi.net/console/v1/segments/{id}

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Path parameters

idstringrequired

id

Response

application/json
200· Get Segment Success
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
isEnabledbooleanrequired

Is the segment enabled.

typestringrequired
Allowed values:id_listrule_basedanalysis_listuser_store_id_list
countnumber

For id_list segments: the length of the ID list

Constraints:format: double
rulesobject[]

Rule Object

namestringrequired

The name of this rule.

passPercentagenumberrequired

Of the users that meet the conditions of this rule, what percent should return true.

Constraints:min: 0max: 100
conditionsobject[]required

An array of Condition objects.

targetValueoneOf
Constraints:nullablestring[]number[]stringnumber
operatorstring
fieldstring
Constraints:nullable
customIDstring
Constraints:nullable
typestringrequired
Allowed values:app_versionbrowser_namebrowser_versioncountrycustom_fieldemailenvironment_tierfails_gatefails_segmentip_addresslocaleos_nameos_versionpasses_gatepasses_segmentpublictimeunit_iduser_iduser_agenturljavascriptdevice_modeltarget_appexperiment_group
environmentsstring[]

The environments this rule is enabled for.

Constraints:nullable
idstring

The Statsig ID of this rule.

baseIDstring

The base ID of this rule, i.e. without any added metadata. Will remain the exact same throughout

returnValueobject

The return value of the rule.

tagsstring[]

Optional tags for categorization.

idstringrequired

ID

namestring

Optional name for the configuration.

idTypestringrequired

Type of ID

descriptionstringrequired

Detailed description of the configuration’s purpose.

lastModifierIDstringrequired

ID of the last modifier.

Constraints:nullable
lastModifiedTimenumberrequired

Time of the last modification.

Constraints:format: doublenullable
lastModifierEmailstringrequired

Email of the last modifier.

Constraints:nullable
lastModifierNamestringrequired

Name of the last modifier.

Constraints:nullable
creatorIDstringrequired

ID of the user who created the entity.

Constraints:nullable
createdTimenumberrequired

Timestamp when the entity was created.

Constraints:format: double
creatorNamestringrequired

Name of the creator.

Constraints:nullable
creatorEmailstringrequired

Email of the creator.

Constraints:nullable
targetAppsstring[]

List of target applications associated with this configuration.

holdoutIDsstring[]

Holdouts applied to this configuration.

teamstring

Optional name for the responsible team.

Constraints:nullable
teamIDstring

Optional ID of the responsible team.

Constraints:nullable
versionnumber

Version number

Constraints:format: double
401· This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx
statusintegerrequired
Allowed values:401
messagestringrequired
404· Segment not found.
statusintegerrequired
Allowed values:404
messagestringrequired

Was this helpful?