Search the directory
Módulo Workforce
GET/directory-entries/searchdirectoryEntries.search
The org directory, on-site members first, filtered by name or headline and optionally to those on site now. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requiere la capacidad inbox.notifications.read.
- Alcances de OAuth: inbox.
- Estados de error: 400, 401, 422, 429. Los errores son detalles de problema RFC 9457.
Parámetros de ruta y de consulta
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| q | string | No | Name or headline contains this.Restricciones: length 0 to 200 |
| on_site | "true" | "false" | No | Only members on site now. |
Respuesta 200: DirectoryEntryPage
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| data | array of DirectoryEntry | Sí | Items on this page, in the documented default order. |
| next_cursor | string | null | Sí | Opaque cursor for the next page; null on the last page. |
{
"data": [
{
"membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"full_name": "Frank Adeyemi",
"preferred_name": "Frankie",
"headline": "Head rigger",
"photo_path": "profiles/p1.jpg",
"role_names": [
"Field"
],
"on_site_now": true,
"on_site_project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"on_site_since": "2026-10-08T14:30:00Z",
"work_phone": "+1 305 555 0199",
"recognition_count": 3
}
],
"next_cursor": null
}Ejemplos de código
curl -X GET "$XOS_BASE_URL/directory-entries/search" \
-H "Authorization: Bearer $XOS_API_KEY"const { data } = await xos.directoryEntries.search();response = xos.directory_entries.search()xos directory-entries search