Skip to content

Tour

GET/api/v1/tours
GET
/api/v1/tours

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

q?string

Full-text search over this list's searchable fields.

Length1 <= length <= 200
sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: name, version, created_at. Default: -created_at.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

include_versions?boolean

Include draft and deprecated tours (admin only)

Response Body

application/json

curl -X GET "https://example.com/api/v1/tours"
{  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  },  "tours": [    {      "audience": {        "roles": [          "string"        ],        "segments": [          "string"        ]      },      "branching": [        {          "next_step": "string",          "when": "string"        }      ],      "created_at": "2019-08-24T14:15:22Z",      "created_by": "string",      "name": "string",      "reset_policy": {        "on_version_change": "no_op",        "preserve_flags": [          "string"        ]      },      "status": "draft",      "steps": [        {          "completion_flag": "string",          "id": "string",          "index": 0,          "mandatory": true,          "prerequisites": [            "string"          ],          "reward_hook": null,          "semantic_target": {            "description": "string",            "kind": "ui_element",            "name": "string",            "test_hint": "string"          },          "title": "string"        }      ],      "title": "string",      "tour_id": "string",      "updated_at": "2019-08-24T14:15:22Z",      "variant": null,      "version": 0    }  ]}
POST/api/v1/tours
POST
/api/v1/tours

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/tours" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "steps": [      {        "completion_flag": "string",        "id": "string",        "index": 0,        "semantic_target": {          "kind": "ui_element",          "name": "string"        },        "title": "string"      }    ],    "title": "string"  }'
{  "created_at": "2019-08-24T14:15:22Z",  "name": "string",  "tour_id": "string",  "version": 0}
GET/api/v1/tours/{tour_id}
GET
/api/v1/tours/{tour_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/tours/string"
{  "audience": {    "roles": [      "string"    ],    "segments": [      "string"    ]  },  "branching": [    {      "next_step": "string",      "when": "string"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "name": "string",  "reset_policy": {    "on_version_change": "no_op",    "preserve_flags": [      "string"    ]  },  "status": "draft",  "steps": [    {      "completion_flag": "string",      "id": "string",      "index": 0,      "mandatory": true,      "prerequisites": [        "string"      ],      "reward_hook": null,      "semantic_target": {        "description": "string",        "kind": "ui_element",        "name": "string",        "test_hint": "string"      },      "title": "string"    }  ],  "title": "string",  "tour_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "variant": null,  "version": 0}
DELETE/api/v1/tours/{tour_id}
DELETE
/api/v1/tours/{tour_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/tours/string"
{  "message": "string",  "tour_id": "string"}
PUT/api/v1/tours/{tour_id}
PUT
/api/v1/tours/{tour_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/tours/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "status": "draft",  "tour_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
GET/api/v1/tours/{tour_id}/analytics
GET
/api/v1/tours/{tour_id}/analytics

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Query Parameters

version?integer

Definition version to scope analytics to (defaults to active version)

Formatint32
Range0 <= value
window?string

Analytics window (defaults to all-time rollup)

Response Body

application/json

curl -X GET "https://example.com/api/v1/tours/string/analytics"
{  "branches": [    {      "next_step": "string",      "taken": 0    }  ],  "completed": 0,  "started": 0,  "steps": [    {      "completed": 0,      "drop_off": 0,      "seen": 0,      "step_id": "string"    }  ],  "tour_id": "string",  "variants": {    "property1": {      "completed": 0,      "completion_rate": 0.1,      "started": 0    },    "property2": {      "completed": 0,      "completion_rate": 0.1,      "started": 0    }  },  "version": 0,  "window": "string"}
POST/api/v1/tours/{tour_id}/events
POST
/api/v1/tours/{tour_id}/events

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/tours/string/events" \  -H "Content-Type: application/json" \  -d '{    "event_type": "started"  }'
{  "completed_steps": [    "string"  ],  "current_step_id": "string",  "definition_version": 0,  "mandatory_complete": true,  "tour_id": "string"}
POST/api/v1/tours/{tour_id}/flags
POST
/api/v1/tours/{tour_id}/flags

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/tours/string/flags" \  -H "Content-Type: application/json" \  -d '{}'
{  "seen_flags": [    "string"  ],  "tour_id": "string"}
POST/api/v1/tours/{tour_id}/reset
POST
/api/v1/tours/{tour_id}/reset

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/tours/string/reset" \  -H "Content-Type: application/json" \  -d '{}'
{  "message": "string",  "reset_users": 0,  "scope": "user",  "tour_id": "string"}
GET/api/v1/tours/{tour_id}/status
GET
/api/v1/tours/{tour_id}/status

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

tour_id*string

Query Parameters

user?string

User whose progress is requested (admin only; defaults to the caller)

Response Body

application/json

curl -X GET "https://example.com/api/v1/tours/string/status"
{  "available_steps": [    "string"  ],  "completed_steps": [    "string"  ],  "current_step_id": "string",  "definition_version": 0,  "last_event_at": "2019-08-24T14:15:22Z",  "mandatory_complete": true,  "seen_flags": [    "string"  ],  "started_at": "2019-08-24T14:15:22Z",  "state": "not_started",  "tour_id": "string",  "user_id": "string",  "variant": "string"}