Physical Location¶
/api/1.1/phys_locations¶
GET /api/1.1/phys_locations
Authentication Required: Yes
Role(s) Required: None
Response Properties
Parameter Type Description addressstring citystring commentsstring string idstring lastUpdatedstring namestring phonestring pocstring regionstring regionIdstring shortNamestring statestring zipstring Response Example
{ "response": [ { "region": "Mile High", "region": "4", "poc": "Jane Doe", "lastUpdated": "2014-10-02 08:22:43", "name": "Albuquerque", "comments": "Albuquerque", "phone": "(123) 555-1111", "state": "NM", "email": "jane.doe@email.com", "city": "Albuquerque", "zip": "87107", "id": "2", "address": "123 East 3rd St", "shortName": "Albuquerque" }, { "region": "Mile High", "region": "4", "poc": "Jane Doe", "lastUpdated": "2014-10-02 08:22:43", "name": "Albuquerque", "comments": "Albuquerque", "phone": "(123) 555-1111", "state": "NM", "email": "jane.doe@email.com", "city": "Albuquerque", "zip": "87107", "id": "2", "address": "123 East 3rd St", "shortName": "Albuquerque" } ] }
GET /api/1.1/phys_locations/trimmed.json
Authentication Required: Yes
Role(s) Required: None
Response Properties
Parameter Type Description namestring Response Example
{ "response": [ { "name": "Albuquerque" }, { "name": "Ashburn" } ] }
GET /api/1.1/phys_locations/:id
Authentication Required: Yes
Role(s) Required: None
Request Route Parameters
Name Required Description idyes Physical location ID. Response Properties
Parameter Type Description addressstring citystring commentsstring string idstring lastUpdatedstring namestring phonestring pocstring regionstring regionIdstring shortNamestring statestring zipstring Response Example
{ "response": [ { "region": "Mile High", "region": "4", "poc": "Jane Doe", "lastUpdated": "2014-10-02 08:22:43", "name": "Albuquerque", "comments": "Albuquerque", "phone": "(123) 555-1111", "state": "NM", "email": "jane.doe@email.com", "city": "Albuquerque", "zip": "87107", "id": "2", "address": "123 East 3rd St", "shortName": "Albuquerque" } ] }
- PUT /api/1.1/phys_locations/:id
Update a physical location
Authentication Required: Yes
Role(s) Required: admin or oper
Request Route Parameters
Name Type Description idint Physical location id. Request Properties
Parameter Required Description addressyes Physical location address. cityyes Physical location city. commentsno Physical location comments. emailno Physical location email. nameyes Physical location name. phoneno Physical location phone. pocno Physical location point of contact. regionIdno Physical location region ID. shortNameyes Physical location short name. stateyes Physical location state. zipyes Physical location zip. Request Example
{ "regionId": "1", "poc": "Jane Doesssss", "name": "Albuquerque", "comments": "Albuquerque", "phone": "(123) 555-1111", "state": "NM", "email": "jane.doe@email.com", "city": "Albuquerque", "zip": "87107", "address": "123 East 9rd St", "shortName": "Albuquerque" }
Response Properties
Parameter Type Description addressstring citystring commentsstring string idstring lastUpdatedstring namestring phonestring pocstring regionstring regionIdstring shortNamestring statestring zipstring Response Example
{ "alerts": [ { "level": "success", "text": "Physical location update was successful." } ], "response": [ { "region": "Mile High", "region": "4", "poc": "Jane Doe", "lastUpdated": "2014-10-02 08:22:43", "name": "Albuquerque", "comments": "Albuquerque", "phone": "(123) 555-1111", "state": "NM", "email": "jane.doe@email.com", "city": "Albuquerque", "zip": "87107", "id": "2", "address": "123 East 3rd St", "shortName": "Albuquerque" } ] }
- POST /api/1.1/regions/:region_name/phys_locations
Create physical location.
Authentication Required: Yes
Role(s) Required: admin or oper
region_name: the name of the region to create physical location into.
Request Route Parameters
Name Required Description region_nameyes The name of the physical location Request Properties
Parameter Required Description nameyes The name of the location shortNameyes The short name of the location addressyes cityyes stateyes zipyes phoneno pocno Point of contact emailno commentsno Request Example
{ "name" : "my physical location1", "shortName" : "myphylocation1", "address" : "", "city" : "Shanghai", "state": "SH", "zip": "200000", "comments": "this is physical location1" }
Response Properties
Parameter Type Description idstring The id of the physical location created. namestring The name of the location shortNamestring The short name of the location regionNamestring The region name the physical location belongs to. regionIdstring addressstring citystring statestring zipstring phonestring pocstring Point of contact string commentsstring Response Example
{ "response": { 'shortName': 'myphylocati', 'regionName': 'myregion1', 'name': 'my physical location1', 'poc': '', 'phone': '', 'comments': 'this is physical location1', 'state': 'SH', 'email': '', 'zip': '20000', 'region_id': '20', 'city': 'Shanghai', 'address': '', 'id': '200' } }