PUT
/
api
/
admin
/
segments
/
cURL
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
}

Body

application/json
workspaceId
string
required
name
string
required
id
string
definition
object
subscriptionGroupId
string
updatedAt
number
lastRecomputed
number
resourceType
Available options:
Declarative
status
Available options:
NotStarted
createOnly
boolean

Response

Default Response

id
string
required
workspaceId
string
required
name
string
required
definition
object
required
updatedAt
number
required
createdAt
number
required
definitionUpdatedAt
number
required
subscriptionGroupId
string
lastRecomputed
number
resourceType
Available options:
Declarative
status
Available options:
NotStarted