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

Autorizaciones

Authorization
string
header
requerido

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

Parámetros de ruta

id
string
requerido

El ID del segmento que se va a actualizar.

Cuerpo

Actualización parcial de un segmento. Solo se actualizan los campos proporcionados. Al enviar reglas, se reemplaza todo el arreglo de reglas.

description
string | null

Una descripción del segmento

Required string length: 3 - 1024
Pattern: ^(?!.*\x00)\S(.*\S)?$
name
string

Un nombre descriptivo para el segmento

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

Reemplaza todo el arreglo de reglas.

Minimum array length: 1

Respuesta

Segmento actualizado correctamente.

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