v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Segments

Get a segment

Retrieves a segment based on its ID.

get/api/admin/segments/{id}

Path parameters

idinteger required

a segment id

Response

adminSegmentSchema

idinteger required

The ID of this segment

namestring required

The name of this segment

descriptionstring nullable

The description for this segment

usedInFeaturesinteger nullable

The number of feature flags that use this segment. The number also includes the any flags with pending change requests that would add this segment.

usedInProjectsinteger nullable

The number of projects that use this segment. The number includes any projects with pending change requests that would add this segment.

projectstring nullable

The project the segment belongs to. Only present if the segment is a project-specific segment.

createdBystring nullable

The creator's email or username

createdAtstring date-time required

When the segment was created

Example response

{
  "id": 2,
  "name": "ios-users",
  "description": "IOS users segment",
  "constraints": [
    {
      "contextName": "appName",
      "operator": "IN",
      "values": [
        "my-app",
        "my-other-app"
      ],
      "value": "my-app"
    }
  ],
  "usedInFeatures": 3,
  "usedInProjects": 2,
  "project": "red-vista",
  "createdBy": "someone@example.com",
  "createdAt": "2023-04-12T11:13:31.960Z"
}