curl --url http://localhost:8080/api/v2/environments/production/namespaces/default/resources/flipt.core.Segment/my-segment \
--header 'Accept: application/json'
{
"resource": {
"namespaceKey": "default",
"key": "my-segment",
"payload": {
"@type": "flipt.core.Segment",
"key": "my-segment",
"name": "My segment",
"matchType": "ALL_MATCH_TYPE"
}
},
"revision": "<revision>"
}
Segments
Get Segment
Get a segment by key.
GET
/
api
/
v2
/
environments
/
{environmentKey}
/
namespaces
/
{namespaceKey}
/
resources
/
{typeUrl}
/
{key}
curl --url http://localhost:8080/api/v2/environments/production/namespaces/default/resources/flipt.core.Segment/my-segment \
--header 'Accept: application/json'
{
"resource": {
"namespaceKey": "default",
"key": "my-segment",
"payload": {
"@type": "flipt.core.Segment",
"key": "my-segment",
"name": "My segment",
"matchType": "ALL_MATCH_TYPE"
}
},
"revision": "<revision>"
}
curl --url http://localhost:8080/api/v2/environments/production/namespaces/default/resources/flipt.core.Segment/my-segment \
--header 'Accept: application/json'
{
"resource": {
"namespaceKey": "default",
"key": "my-segment",
"payload": {
"@type": "flipt.core.Segment",
"key": "my-segment",
"name": "My segment",
"matchType": "ALL_MATCH_TYPE"
}
},
"revision": "<revision>"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The environment identifier, e.g. 'production'.
The namespace key for which to list resources, e.g. 'default'.
The resource type - flipt.core.Flag or flipt.core.Segment.
The resource key.
Was this page helpful?