Hướng dẫn AgentFlow

list_users

GET/users
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; email when absent.

Value in

  • "email"
  • "last_seen_at"
  • "created_at"
dir?string

asc or desc; when absent, email sorts ascending and the two timestamps newest first.

Value in

  • "asc"
  • "desc"
q?string

A case-insensitive substring of the email or the display name.

is_active?boolean

Only active (true) or only deactivated (false) users.

group_id?string

Comma-separated group ids — keep only users in ANY of them.

Match^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(,[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})*$
not_group_id?string

Comma-separated group ids — drop users in ANY of them.

Match^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(,[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})*$
role_id?string

Comma-separated role ids — keep only users holding ANY of them. Requires deployment.admin.

Match^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(,[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})*$
unit_id?string

Comma-separated unit ids — keep only users placed in ANY of them or any unit beneath them. Requires deployment.admin.

Match^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(,[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})*$

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/users"
{  "items": [    {      "ai_mode_available": true,      "created_at": "2019-08-24T14:15:22Z",      "display_name": "string",      "email": "string",      "gender": null,      "group_names": [        "string"      ],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "is_active": true,      "is_admin": true,      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",      "permissions": [        "string"      ],      "roles": [        "string"      ],      "simulation_enabled": true,      "status": "active",      "unit_names": [        "string"      ]    }  ],  "next_cursor": "string",  "prev_cursor": "string"}