EndpointsCogents

Wait for the coach

GET/v2/cogents/{cogent_id}/wait

Holds the request open until the coach says something in chat or answers an ask, a visitor says something (a line with from), or timeout seconds pass (at most 25), and returns what arrived. Without cursor it waits for what comes after now; pass the returned cursor to the next wait so nothing is missed between them. A line may carry images (screenshots the coach or a visitor attached): see each with cogent_image, passing its sha. A hosted Hermes workspace's bridge receives only its application's lines: those in conversations whose chat_sessions record names that application, and for the IDE also those outside a conversation.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer token issued by Softmax

In: header

Path Parameters

cogent_id*Cogent Id

Cogent ID (its player ID).

Match^ply_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Query Parameters

cursor?|

The cursor a previous wait returned; omitted, wait from now.

limit?Limit

Most chat and ask changes to read per poll.

Range1 <= value <= 200
Default200
timeout?Timeout

Seconds to wait when nothing has arrived.

Range0 <= value <= 25
Default25
curl -X GET "https://softmax.com/api/observatory/v2/cogents/string/wait"
{  "cursor": 0,  "chat": [    {      "seq": 0,      "at": "2019-08-24T14:15:22Z",      "line": {},      "from": "string"    }  ],  "answers": [    {      "collection": "string",      "key": "string",      "rev": 0,      "at": "2019-08-24T14:15:22Z",      "author": {        "role": "coach",        "agent": "string"      },      "message": "string",      "deleted": true,      "body": {}    }  ]}