Hướng dẫn AgentFlow

list_work

GET/work

Live work they hold or could claim, and work they finished in the last thirty days, under one cursor. A work record is listed only from an entity that follows Work surface and whose records the caller may read. A line a workflow step holds carries the step. Through an installed app, a Workflow task is listed only where the ceiling covers the workflow that opened it, titled by its step, and its subject is told as far as the app may read the subject's entity. Through an installed app, a record is listed only for an entity the ceiling lets the app read and list, and only while the app may read everything its row is made of: the status (work_state), the priority field and each clock's state, outcome and due time. A required entity therefore lists no work unless the package lists all of them.

AuthorizationBearer <token>

A service principal's credential, or a person's access token, AgentFlow's own or an installed app's. A service principal's effective permissions are its role permissions intersected with the credential's scopes.

In: header

Query Parameters

cursor?string

Opaque cursor walking forward, taken from next_cursor.

before?string

Opaque cursor walking backward, taken from prev_cursor.

limit?integer

Page size, 1 to 200.

Formatint32
Range1 <= value <= 200
view?string

all when absent.

Value in

  • "all"
  • "mine"
  • "claimable"
entity_id?string

Only this entity's work records.

Formatuuid
live?boolean

true live work only, false finished work only.

sort?string

The sort field; due_at when absent.

Value in

  • "due_at"
  • "started_at"
  • "updated_at"
  • "priority"
dir?string

asc or desc; due_at defaults to asc, the others to desc.

Value in

  • "asc"
  • "desc"
q?string

Free text over a work record's display label. A label that shows a secured field is not searched.

priority?string

Comma-separated priorities: low, normal, high, urgent. A work record's priority is read off its entity's bound field, normal without one.

age_band?string

How long ago the work opened: 0-1d, 1-3d, 3-7d, 7-14d or 14d+ (the + must be URL-encoded, 14d%2B).

overdue?boolean

true live work past its due time; false live work whose due time is still ahead. A work record is overdue when its earliest running clock's due time has passed; a record with no running clock matches neither.

signs?boolean

Only work whose step asks for a signature (true) or does not (false). Work no step holds does not ask. With live=true, the work a person is waiting to sign.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/work"
{  "items": [    {      "assigned_group_ids": [        "4cee1a64-b703-4aef-a938-98b59ba36ecf"      ],      "assigned_unit_ids": [        "366d0120-aabd-4ba4-abdb-7f576a297ea7"      ],      "assigned_user_ids": [        "173e51c9-2537-489c-9d8b-ff125a6bd70d"      ],      "claimed_by_user_id": "844949b6-eaeb-4229-906a-b1aa02fddcca",      "clock": null,      "due_at": "2019-08-24T14:15:22Z",      "entity_id": "8161163a-f227-466f-bc01-090a01e80165",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "live": true,      "priority": "string",      "started_at": "2019-08-24T14:15:22Z",      "status": "string",      "step": {        "kind": "human",        "signs": true,        "step": {          "key": "string",          "label": "string"        },        "subject": null,        "workflow": {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "name": "string"        }      },      "title": "string"    }  ],  "next_cursor": "string",  "prev_cursor": "string"}