api/v1/orgUnit
OrgUnit represents organizational unit in the elDoc system. This REST API Reference describes available methods for the OrgUnit objects.
API overview
Method | API endpoint |
|---|---|
| Get organizational unit data | GET api/v1/orgUnit/{id} |
| Create or update organizational unit | POST api/v1/orgUnit |
Get organizational unit data
URL & Method & Description
GET api/v1/orgUnit/{id}
Retrieves organisational unit data.
Request:
Request (sample)
GET https://eldoc.domain.com/api/v1/orgUnit/{id}
Param | Type | Description | Sample values (comma separated) |
|---|---|---|---|
{id} | Path param | System id (4 hex-character string with "unit prefix") or external id of the OrgUnit | unit1E22, unit1E5A |
Response:
Response headers
Content-Type: application/json
Response body (sample)
Response body (sample)
{
"_id_sys": "unit1F22",
"name": "Sales department",
"elhead": "usr-bf7ad850-8708-493d-96a5-7c064f9b8528",
"elmembers": [
"usr-bf7ad850-8708-493d-96a5-7c064f9b8526",
"usr-bf7ad850-8708-493d-96a5-7c064f9b8527"
]
}
Сreate or update organizational unit
URL & Method & Description
POST api/v1/orgUnit
Creates or updates organisational unit in system.
Access rights requirement
Method requires [elAdminSysRW] role
Request:
Request (sample)
POST https://eldoc.domain.com/api/v1/orgUnit
Request body (sample)
{
"_id_sys": "unit1F22",
"name": "Sales department",
"elhead": "usr-bf7ad850-8708-493d-96a5-7c064f9b8528",
"elmembers": [
"usr-bf7ad850-8708-493d-96a5-7c064f9b8526",
"usr-bf7ad850-8708-493d-96a5-7c064f9b8527"
]
}
Response:
Response headers
Content-Type: application/json
Response body (sample)
{
"_id_sys": "unit1F22",
"name": "Sales department",
"elhead": "usr-bf7ad850-8708-493d-96a5-7c064f9b8528",
"elmembers": [
"usr-bf7ad850-8708-493d-96a5-7c064f9b8526",
"usr-bf7ad850-8708-493d-96a5-7c064f9b8527"
]
}
Last modified: April 28, 2023