Contents
People
Any query along the /people tree of the API will return a collection or single entity in the following format:
{
"error": false,
"errorcode": 200,
"people": [
{
"PersonID": 1,
"UserID": "dcim",
"LastName": "Admin",
"FirstName": "DCIM",
"Phone1": "",
"Phone2": "",
"Phone3": "",
"Email": "scott@opendcim.org",
"AdminOwnDevices": 1,
"ReadAccess": 1,
"WriteAccess": 1,
"DeleteAccess": 1,
"ContactAdmin": 1,
"RackRequest": 1,
"RackAdmin": 1,
"SiteAdmin": 1,
"Disabled": 0
}
]
}
Query
- /people
- Method GET
- Parameters none
- Specific Permission Required Contact Administrator
This URI will return a collection of all people defined within openDCIM. There is a corresponding Entity URL for retrieving a single entity.
- /people/bydepartment/:departmentid
- Method GET
- Parameters departmentid
- Specific Permission Required Contact Administrator
This URI will return a collection of all people (if any) that are members of the given department. Note that people can be members of multiple departments.
Create
- /people/:userid
- Method PUT
- Parameters userid (required, passed as :userid in URL, must be unique)
- lastname, firstname, phone1, phone2, phone3, email, adminowndevices,
- readaccess, writeaccess, deleteaccess, contactadmin, rackrequest,
- rackadmin, siteadmin
- Specific Permission Required Contact Administrator
This URI will create a new entry in the People database table if the supplied UserID is unique. It will return the contents of the newly created record.
Update
- /people/:peopleid
- Method POST
- Parameters peopleid (required)
- userid, lastname, firstname, phone1, phone2, phone3, email, adminowndevices,
- readaccess, writeaccess, deleteaccess, contactadmin, rackrequest,
- rackadmin, siteadmin
- Specific Permission Required Contact Administrator
This URI will update a single entity within the People database unless there is a key collision.
- /people/:peopleid/transferdevicesto/:newpeopleid
- Method POST
- Parameters peopleid, newpeopleid
- Specific Permission Required Contact Administrator
This URI will update all devices currently owned by the specified :peopleid so that the new owner is :newpeopleid.