Passer au contenu principal
PATCH
https://{tenantDomain}/api/v2
/
experimentation
/
segments
/
{id}
Update a segment.
curl --request PATCH \
  --url https://{tenantDomain}/api/v2/experimentation/segments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "rules": [
    {
      "match": {
        "client_id": [
          "<string>"
        ],
        "connection": [
          "<string>"
        ],
        "connection_type": [
          "<string>"
        ],
        "organization_id": [
          "<string>"
        ],
        "domain": [
          "<string>"
        ],
        "device_type": [
          "<string>"
        ],
        "browser": [
          "<string>"
        ],
        "platform": [
          "<string>"
        ],
        "user_agent": [
          "<string>"
        ],
        "country": [
          "<string>"
        ],
        "region": [
          "<string>"
        ]
      },
      "not_match": {
        "client_id": [
          "<string>"
        ],
        "connection": [
          "<string>"
        ],
        "connection_type": [
          "<string>"
        ],
        "organization_id": [
          "<string>"
        ],
        "domain": [
          "<string>"
        ],
        "device_type": [
          "<string>"
        ],
        "browser": [
          "<string>"
        ],
        "platform": [
          "<string>"
        ],
        "user_agent": [
          "<string>"
        ],
        "country": [
          "<string>"
        ],
        "region": [
          "<string>"
        ]
      }
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "type": "self",
  "rules": [
    {
      "match": {
        "client_id": [
          "<string>"
        ],
        "connection": [
          "<string>"
        ],
        "connection_type": [
          "<string>"
        ],
        "organization_id": [
          "<string>"
        ],
        "domain": [
          "<string>"
        ],
        "device_type": [
          "<string>"
        ],
        "browser": [
          "<string>"
        ],
        "platform": [
          "<string>"
        ],
        "user_agent": [
          "<string>"
        ],
        "country": [
          "<string>"
        ],
        "region": [
          "<string>"
        ]
      },
      "not_match": {
        "client_id": [
          "<string>"
        ],
        "connection": [
          "<string>"
        ],
        "connection_type": [
          "<string>"
        ],
        "organization_id": [
          "<string>"
        ],
        "domain": [
          "<string>"
        ],
        "device_type": [
          "<string>"
        ],
        "browser": [
          "<string>"
        ],
        "platform": [
          "<string>"
        ],
        "user_agent": [
          "<string>"
        ],
        "country": [
          "<string>"
        ],
        "region": [
          "<string>"
        ]
      }
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://auth-test.auth0-mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

The ID of the segment to update.

Corps

Partial update of a segment. Only provided fields are updated. Sending rules replaces the entire rules array.

name
string

A human-readable name for the segment

Required string length: 3 - 255
Pattern: ^(?!.*\x00)\S(.*\S)?$
description
string | null

A description of the segment

Required string length: 3 - 1024
Pattern: ^(?!.*\x00)\S(.*\S)?$
rules
object[]

Replaces the entire rules array.

Minimum array length: 1

Réponse

Segment successfully updated.

id
string
requis
Pattern: ^seg_[A-HJ-NP-Za-km-z1-9]+$
name
string
requis
type
enum<string>
requis
Options disponibles:
self,
auth0
rules
object[]
requis
created_at
string<date-time>
requis
updated_at
string<date-time>
requis
description
string