POST
/
api
/
v1
/
namespaces
/
{namespaceKey}
/
segments
/
{segmentKey}
/
constraints
curl --request POST \
  --url https://try.flipt.io/api/v1/namespaces/default/segments/{segmentKey}/constraints \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{
  "operator": "<operator>",
  "property": "<property>",
  "type": "<type>"
}'
{
  "id": "<string>",
  "namespaceKey": "<string>",
  "segmentKey": "<string>",
  "type": "UNKNOWN_COMPARISON_TYPE",
  "property": "<string>",
  "operator": "<string>",
  "value": "<string>",
  "description": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
headerrequired

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

Path Parameters

namespaceKey
string
required
segmentKey
string
required

Body

application/json
type
enum<string>
required

The default is UNKNOWN_COMPARISON_TYPE

Available options:
UNKNOWN_COMPARISON_TYPE,
STRING_COMPARISON_TYPE,
NUMBER_COMPARISON_TYPE,
BOOLEAN_COMPARISON_TYPE,
DATETIME_COMPARISON_TYPE
property
string
required
operator
string
required
value
string
description
string

Response

200 - application/json
id
string
required
namespaceKey
string
required
segmentKey
string
required
type
enum<string>
required

The default is UNKNOWN_COMPARISON_TYPE

Available options:
UNKNOWN_COMPARISON_TYPE,
STRING_COMPARISON_TYPE,
NUMBER_COMPARISON_TYPE,
BOOLEAN_COMPARISON_TYPE,
DATETIME_COMPARISON_TYPE
property
string
required
operator
string
required
value
string
required
description
string
required
createdAt
string
required
updatedAt
string
required