inbox
GET /inbox
Handoffs to the caller not yet consumed, oldest first.
Q22. Reading does not consume. An entry whose item has since been deleted is still listed, with `item` null.
Needs the gallery capability.
| Go | List(ctx context.Context, params *InboxListParams) (*InboxPage, error) |
|---|---|
| Python | def list(self, *, limit: Optional[Any] = None, cursor: Optional[Any] = None) -> Any |
| JavaScript | list(params = {}) |
| Parameter | In | Type | About |
|---|---|---|---|
| limit | query | integer | |
| cursor | query | string | The `next_cursor` of the previous page, unchanged. |
| Status | Body | Means |
|---|---|---|
| 200 | InboxPage | A page of pending entries. |
| 400 | Error | The request is malformed. Codes: `bad_request`, `bad_filter`, `bad_cursor`, `invalid_document`. |
| 401 | Error | No studio token, or a revoked or unknown one. Code `unauthenticated`. |
| 403 | Error | The token lacks a capability (`capability_required`, with `details.capability`), the job is not a task the studio may change (`not_a_task`), or the request came from another origin (`bad_origin`). |
POST /inbox/{id}:consume
Mark an entry handled. Idempotent.
Q22. A consumed entry leaves the list. Consuming it again is 204. Another studio's entry is 404.
Needs the gallery capability.
| Go | Consume(ctx context.Context, id string) error |
|---|---|
| Python | def consume(self, id: str) -> Any |
| JavaScript | consume(id) |
| Parameter | In | Type | About |
|---|---|---|---|
| id | path · required | ULID |
| Status | Body | Means |
|---|---|---|
| 204 | Consumed. | |
| 401 | Error | No studio token, or a revoked or unknown one. Code `unauthenticated`. |
| 403 | Error | The token lacks a capability (`capability_required`, with `details.capability`), the job is not a task the studio may change (`not_a_task`), or the request came from another origin (`bad_origin`). |
| 404 | Error | Absent, deleted, or not the caller's to see. Code `not_found`. |