curl --request PUT \
--url http://localhost:3001/api/admin/segments/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": "<string>",
"name": "<string>",
"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",
"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
}
}
]
},
"updatedAt": 123,
"createdAt": 123,
"definitionUpdatedAt": 123,
"subscriptionGroupId": "<string>",
"lastRecomputed": 123,
"resourceType": "Declarative",
"status": "NotStarted"
}Create or update a user segment.
curl --request PUT \
--url http://localhost:3001/api/admin/segments/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": "<string>",
"name": "<string>",
"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",
"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
}
}
]
},
"updatedAt": 123,
"createdAt": 123,
"definitionUpdatedAt": 123,
"subscriptionGroupId": "<string>",
"lastRecomputed": 123,
"resourceType": "Declarative",
"status": "NotStarted"
}Default Response
Show child attributes
Declarative NotStarted