Get employee or visitor health data
Send a GET request for Employee Health and Safety Status data to use in your third-party system. Get data to determine an employee or visitor's current health status.
Antes de Iniciar
Procedimento
Send a GET request to the Table API on your instance.
For more information, see Table API.
This example cURL request queries the Health and Safety User table and returns records associated with Abel Tuter's email address.
curl "http://<your-instance>.servicenow.com/api/now/table/sn_imt_core_health_and_safety_user?sysparm_query=user.email%3Dabel.tuter%40example.com&sysparm_limit=1" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'
Resultado
{
"result": [
{
"sys_mod_count": "0",
"sys_updated_on": "2020-07-14 19:58:00",
"sys_tags": "",
"type": "employee",
"sys_id": "33f184491bce9010e3730e16ec4bcb71",
"sys_updated_by": "system.administrator",
"manually_created": "true",
"sys_created_on": "2020-07-14 19:58:00",
"sys_domain": {
"link": "https://<my-instance>.servicenow.com/api/now/table/sys_user_group/global",
"value": "global"
},
"requirements_status": "cleared",
"visitor": "",
"user": {
"link": "https://<my-instance>.servicenow.com/api/now/table/sys_user/62826bf03710200044e0bfc8bcbe5df1",
"value": "62826bf03710200044e0bfc8bcbe5df1"
},
"sys_created_by": "system.administrator"
}
]
}
All fields are internal, except for the following:
| Property | Description |
|---|---|
| requirements_status | Whether the visitor or employee has completed all
requirements to return to the workplace. For more information,
see Create health and safety user records and Create a health and safety requirement.
Data type: String |
| visitor | If present, this record represents a visitor instead of an
employee. Nota: Only used when returning visitor health data. Data type: Object |
| visitor.link | Link to the visitor record on the instance. Nota: Only used when returning visitor health data. Data type: String |
| visitor.value | Sys_id of the visitor record. Nota: Only used when returning visitor health data. Data type: String |
| user | If present, this record represents an employee instead of a visitor. Nota: Only used when returning employee health data. Data type: Object |
| user.link | Link to the user record on the instance. Nota: Only used when returning employee health data. Data type: String |
| user.value | Sys_id of the user record. Nota: Only used when returning employee health data. Data type: String |