curl --request PUT \
--url http://localhost:3001/api/admin/segments/ \
--header 'Content-Type: application/json' \
--data '{
"id": "<string>",
"definition": {
"entryNode": {
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
},
"nodes": [
{
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
}
]
},
"subscriptionGroupId": "<string>",
"updatedAt": 123,
"lastRecomputed": 123,
"resourceType": "Declarative",
"status": "NotStarted",
"workspaceId": "<string>",
"name": "<string>",
"createOnly": true
}'
{
"id": "<string>",
"workspaceId": "<string>",
"name": "<string>",
"definition": {
"entryNode": {
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
},
"nodes": [
{
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
}
]
},
"subscriptionGroupId": "<string>",
"updatedAt": 123,
"lastRecomputed": 123,
"resourceType": "Declarative",
"status": "NotStarted",
"createdAt": 123,
"definitionUpdatedAt": 123
}
Create or update a user segment.
curl --request PUT \
--url http://localhost:3001/api/admin/segments/ \
--header 'Content-Type: application/json' \
--data '{
"id": "<string>",
"definition": {
"entryNode": {
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
},
"nodes": [
{
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
}
]
},
"subscriptionGroupId": "<string>",
"updatedAt": 123,
"lastRecomputed": 123,
"resourceType": "Declarative",
"status": "NotStarted",
"workspaceId": "<string>",
"name": "<string>",
"createOnly": true
}'
{
"id": "<string>",
"workspaceId": "<string>",
"name": "<string>",
"definition": {
"entryNode": {
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
},
"nodes": [
{
"type": "Trait",
"id": "<string>",
"path": "<string>",
"operator": {
"type": "Within",
"windowSeconds": 123
}
}
]
},
"subscriptionGroupId": "<string>",
"updatedAt": 123,
"lastRecomputed": 123,
"resourceType": "Declarative",
"status": "NotStarted",
"createdAt": 123,
"definitionUpdatedAt": 123
}
Default Response
The response is of type object
.