curl --request POST \
--url http://localhost:8080/api/v2/environments/production/namespaces/default/resources \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"key": "<key>",
"payload": {
"@type": "flipt.core.Segment",
"key": "<key>",
"name": "<name>"
}
}'
{
"resource": {
"namespaceKey": "default",
"key": "<key>",
"payload": {
"@type": "flipt.core.Segment",
"key": "<key>",
"name": "<name>"
}
},
"revision": "<revision>"
}
Segments
Create Segment
Create a new segment in a namespace.
POST
/
api
/
v2
/
environments
/
{environmentKey}
/
namespaces
/
{namespaceKey}
/
resources
curl --request POST \
--url http://localhost:8080/api/v2/environments/production/namespaces/default/resources \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"key": "<key>",
"payload": {
"@type": "flipt.core.Segment",
"key": "<key>",
"name": "<name>"
}
}'
{
"resource": {
"namespaceKey": "default",
"key": "<key>",
"payload": {
"@type": "flipt.core.Segment",
"key": "<key>",
"name": "<name>"
}
},
"revision": "<revision>"
}
curl --request POST \
--url http://localhost:8080/api/v2/environments/production/namespaces/default/resources \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"key": "<key>",
"payload": {
"@type": "flipt.core.Segment",
"key": "<key>",
"name": "<name>"
}
}'
{
"resource": {
"namespaceKey": "default",
"key": "<key>",
"payload": {
"@type": "flipt.core.Segment",
"key": "<key>",
"name": "<name>"
}
},
"revision": "<revision>"
}
Authorizations
Path Parameters
Body
application/json
The request message for creating or updating a resource.
Was this page helpful?