api/v2/person
Person represents user accounts in the elDoc system. This REST API Reference describes available methods for the Person objects.
API overview
Method | API endpoint |
---|---|
Get user account data | GET api/v2/person/{id} |
Update user account | POST api/v2/person |
Get user account data
URL & Method & Description
GET api/v2/person/{id}
Retrieves person data.
Request:
Request (sample)
GET https://eldoc.domain.com/api/v2/person/{id}
Param | Type | Description | Sample values (comma separated) |
---|---|---|---|
{id} | Path param | System id (hex-character string with "usr-" prefix) of the Person | usr-3adcf315-918c-4818-bf4c-5863d60c5e1b, usr-3adcf315-918c-4818-bf4c-5863d60c5e1c |
Response:
Response headers
Content-Type: application/json
Response body (sample)
{ "_meta":{ "_created": "2020-03-06T12:38:39Z", "_lastmodified": "2020-03-09T08:28:28Z", "_rev": 6, }, "_id_sys": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b", "email": "manager06@eldoc.domain.com", "name_last": "John", "name_first": "Doe", "deputy": { "id": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1c", "enabled": "true" } }
Update user account
URL & Method & Description
POST api/v2/person
Updates person entity in system with provided values
Access rights requirement
Method requires [elAdminSysRW] role
Request:
Request (sample)
POST https://eldoc.domain.com/api/v2/person
Request body (sample)
{ "_id_sys": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b", "pwd": "password_string", "name_first": "John", "name_last": "Doe", "name_mid": "Q.", "phone_office": "555-55-55", "phone_mobile": "+55055-555-55-55", "unit": "Organisational unit", "deputy": { "id": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1c", "enabled": "true" } }
Response:
Response headers
Content-Type: application/json
Response body (sample)
{ "_meta":{ "_created": "2020-03-06T12:38:39Z", "_lastmodified": "2020-03-09T08:28:28Z", "_rev": 6, }, "_id_sys": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b", "email": "manager06@eldoc.com.ua", "name_first": "John", "name_last": "Doe", "name_mid": "Q.", "phone_office": "555-55-55", "phone_mobile": "+55055-555-55-55", "unit": "Organisational unit", "deputy": { "id": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1c", "enabled": "true" } }
Last modified: April 28, 2023