Hướng dẫn AgentFlow

list_units

GET/units
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

limit?integer

Page size, 1 to 200; 50 when absent.

Formatint32
Range1 <= value <= 200
cursor?string

Opaque cursor walking forward, taken from next_cursor.

before?string

Opaque cursor walking backward, taken from prev_cursor. Sending it with cursor is refused.

sort?string

The order of the page; name when absent.

Value in

  • "name"
  • "code"
  • "created_at"
dir?string

asc or desc; when absent, name and code sort ascending and created_at newest first.

Value in

  • "asc"
  • "desc"
q?string

A case-insensitive substring of the unit's name or code.

include_archived?boolean

Include archived units.

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/units"
{  "items": [    {      "ancestor_names": [        "string"      ],      "archived": true,      "archived_at": "2019-08-24T14:15:22Z",      "code": "string",      "created_at": "2019-08-24T14:15:22Z",      "depth": 0,      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "prev_cursor": "string"}