Skip to content
Console
On this page

List config segments

Lists config segments in an environment.

Lists config segments in an environment.

  • Path GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_segments
  • Scope config:read
  • Effect read — nothing is written.
  • Collection config_segments
  • Query page_size, page_token
  • Pagination the answer carries config_segments and, when there is more, next_page_token

Request

FieldTypeWhat it is
parentstringThe environment to list in. Required.
page_sizeint32At most this many; default 50, clamped to 1000.
page_tokenstringnext_page_token of the previous page.

Response

FieldTypeWhat it is
config_segmentsConfigSegment[]The page.
next_page_tokenstringThe token of the next page; empty on the last page.

ConfigSegment

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/config_segments/{config_segment}; the id is what IN_SEGMENT names.
uidstringseg_<cell><ulid>. Output only.
metaResourceMetaResource metadata.
specConfigSegmentSpecDesired state. Required.
statusConfigSegmentStatusObserved state. Output only.

ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

ConfigSegmentSpec

FieldTypeWhat it is
includedstring[]Subjects always in the segment, by user_id or anonymous_id.
excludedstring[]Subjects never in the segment, whatever else holds.
conditionsTargetingCondition[]Conditions over the evaluation context; all must hold.
descriptionstringWho the segment is.

ConfigSegmentStatus

FieldTypeWhat it is
observed_generationint64The generation this status was computed from. Output only.
conditionsCondition[]Ready. Output only.

TargetingCondition

FieldTypeWhat it is
attributestringuser_id, anonymous_id, or a path into the context's attributes, dot-separated (plan, device.os). Required, except with IN_SEGMENT and NOT_IN_SEGMENT.
operatorConditionOperatorThe comparison. Required. One of equals, not_equals, greater_than, greater_or_equal, less_than, less_or_equal, contains, not_contains, starts_with, ends_with, in, not_in, matches, semver_greater_than, semver_greater_or_equal, semver_less_than, semver_less_or_equal, in_segment, not_in_segment.
valuevalueThe value compared with; a list for IN and NOT_IN, a string for the string, regular expression and semantic version operators. Required.

Condition

FieldTypeWhat it is
typestringThe condition type, for example Ready.
statusConditionStatusWhether the condition holds. One of true, false, unknown.
observed_generationint64The generation this observation was made against.
reasonstringA machine-readable UpperCamelCase reason.
messagestringA customer-safe human-readable message.
severitySeverityHow severe a FALSE condition is. One of info, warning, error.
transition_timetimestampWhen status last changed.

Errors

Every error arrives in the body Errors describes.

Examples

curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_segments" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"