iAdvizeDocs

Stop an experiment

Stops the agent's running experiment: every new conversation is served the champion again, the conversations already assigned keep their version, and the figures stay readable with `GET /experiments/{experimentId}`. The champion stays live. `agent_experiment_not_running` when the experiment already ended. Records an audit entry (`agent.experiment_stopped`) attributed to the API key.

POST
/api/v1/sites/{siteId}/agents/{id}/experiments/{experimentId}/stop

Authorization

ApiKeyAuth
AuthorizationBearer <token>

A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).

In: header

Path Parameters

siteId*string

The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.

id*string

The agent id (prefixed agt_).

experimentId*string

The experiment id (prefixed agxp_). An experiment of another agent, or another organization, is a 404.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

No field: a body that names anything is refused with 400.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1/sites/string/agents/string/experiments/string/stop" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "string",    "agentId": "string",    "status": "running",    "state": "below_floor",    "endedReason": "string",    "startedAt": "2019-08-24T14:15:22Z",    "endedAt": "2019-08-24T14:15:22Z",    "floorPerVersion": 0,    "maxConversationsPerVersion": 0,    "detectionLimitPer1000": 0,    "metric": "conversion_rate",    "alpha": 0,    "championVersionId": "string",    "candidateVersionId": "string",    "champion": {      "versionId": "string",      "assignedConversations": 0,      "matureConversations": 0,      "mainDriver": {        "id": "conversion_rate",        "role": "main",        "convertedConversations": 0,        "matureConvertedConversations": 0,        "rate": 0,        "matureRate": 0      },      "secondaryDrivers": [        {          "id": "string",          "role": "secondary",          "unit": "conversations",          "value": 0,          "currency": "string"        }      ],      "mixedCurrencies": true,      "band": {        "lower": 0,        "upper": 0      },      "progress": 0    },    "candidate": {      "versionId": "string",      "assignedConversations": 0,      "matureConversations": 0,      "mainDriver": {        "id": "conversion_rate",        "role": "main",        "convertedConversations": 0,        "matureConvertedConversations": 0,        "rate": 0,        "matureRate": 0      },      "secondaryDrivers": [        {          "id": "string",          "role": "secondary",          "unit": "conversations",          "value": 0,          "currency": "string"        }      ],      "mixedCurrencies": true,      "band": {        "lower": 0,        "upper": 0      },      "progress": 0    },    "verdict": {      "winner": "champion",      "gapPer1000": 0,      "confirmableGapPer1000": 0    }  }}