Saltar al contenido principal
POST
https://{tenantDomain}/api/v2
/
experimentation
/
segments
Crea un segmento para Experiment Center.
curl --request POST \
  --url https://{tenantDomain}/api/v2/experimentation/segments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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>"
        ]
      }
    }
  ],
  "description": "<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.

Cuerpo

Crear un segmento para la segmentación de experimentos

name
string
requerido

Un nombre descriptivo para el segmento

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

Una lista ordenada de reglas. Un segmento coincide si coincide alguna regla.

Minimum array length: 1
description
string

Una descripción del segmento

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

Respuesta

Segmento creado 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