curl --url http://localhost:8080/api/v2/environments/production/namespaces/default/resources/flipt.core.Segment \
--header 'Accept: application/json'
{
"resources": [
{
"namespaceKey": "default",
"key": "my-segment",
"payload": {
"@type": "flipt.core.Segment",
"key": "my-segment",
"name": "My segment",
"matchType": "ALL_MATCH_TYPE"
}
}
],
"revision": "<revision>"
}
Segments
List Segments
List all segments in a namespace.
GET
/
api
/
v2
/
environments
/
{environmentKey}
/
namespaces
/
{namespaceKey}
/
resources
/
{typeUrl}
curl --url http://localhost:8080/api/v2/environments/production/namespaces/default/resources/flipt.core.Segment \
--header 'Accept: application/json'
{
"resources": [
{
"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 \
--header 'Accept: application/json'
{
"resources": [
{
"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.
Was this page helpful?