Skip to content

List staff

Request

🔐 Required role: API_ADMIN

📖 Data dictionary: Staff

Staff directory and human resource management with organizational structure

Pagination (v1 — limit/offset, see Pagination): pageSize is a limit (records to return). page is an offset (records to skip), not a page index. Hasura maps these as limit: $pageSize and offset: $page. When page is at or beyond total.aggregate.count, the result array is empty.

This endpoint returns the staff directory, ordered by last name, first name, then id descending. It accepts only pageSize and page; any other body property is rejected with 400 Unexpected variable <name>.

To filter or sort (by active status, department, name, role, …), use POST /gql/v1/staff/search with a where clause and orderBy.

Business Applications:

  • Employee directory and contact management
  • HR reporting and organizational analysis
  • Department staff allocation and planning
  • Employee onboarding and management workflows
  • Integration with external HR and payroll systems

Directory Features:

  • Complete contact information management
  • Department, service line, role, permission, and supervisor relationship tracking
  • Staff reference system for external integration
  • Employee status and lifecycle management
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Bodyapplication/json
pageSizeinteger, [ 1 .. 1000 ]

Limit — number of records to return (not a page count). Hasura maps this to limit.

Default:50
Example:50
pageinteger, >= 0

Offset — number of records to skip. This is not a page index. To fetch the next N rows after the first N, send pageSize: N and page: N. An offset at or beyond total.aggregate.count returns an empty result array.

Default:0
Example:0
curl -i -X POST \
  https://api.sandbox.aiwyn.app/gql/v1/staff \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "pageSize": 50,
    "page": 0
  }'

Responses

Successfully retrieved staff records

Bodyapplication/json
staffArray of objects(StaffDirectoryRecord)required
totalobjectrequired
Response
{ "staff": [ { … } ], "total": { "aggregate": { … } } }