Skip to main content
GET
/
projects
/
{projectId}
/
envs
/
{envId}
/
flags
/
{flagId}
/
targeting-rules
List targeting rules
curl --request GET \
  --url http://localhost:3000/projects/{projectId}/envs/{envId}/flags/{flagId}/targeting-rules \
  --header 'Authorization: Bearer <token>'
{
  "statusCode": 123,
  "message": "OK",
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "flag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "kind": "segment",
      "conditions": [
        {
          "attribute": "<string>",
          "operator": "eq",
          "value": "<string>",
          "logical_op": "AND"
        }
      ],
      "order_index": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "variation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "rollout_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "deleted_at": "2023-11-07T05:31:56Z",
      "segment_name": "<string>",
      "segment_description": "<string>",
      "segment_rules": [
        {
          "attribute": "<string>",
          "operator": "eq",
          "value": "<string>",
          "logical_op": "AND"
        }
      ],
      "segment_logical_op": "<string>",
      "segment_key": "<string>",
      "segment": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "rules": [
          {
            "type": "rule",
            "attribute": "<string>",
            "operator": "eq",
            "value": "<string>"
          }
        ],
        "logical_op": "AND",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "description": "<string>",
        "force": false,
        "key": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string<uuid>
required
envId
string<uuid>
required
flagId
string<uuid>
required

Response

Default Response

statusCode
number
message
string
default:OK
data
object[]