Retrieves all Sites
get
/rest/{versionId}/inventory/device-mgmt/sites
Use this (GET) method to retrieve the list of all sites. A site is used to group Network Functions (NFs) and devices based on their physical location.
Request
Path Parameters
Back to Top
Response
200 Response
All site retrieved successfully.
400 Response
The user input is invalid.
401 Response
The user is unauthorized.
403 Response
The user doesn't have the required permission
404 Response
The resource URI of your input request cannot be found
500 Response
An internal server error has occurred while processing the request.
Examples
Examples of Accessing the API
See Authenticate page to acquire a token.
The following example shows how to use curl to retrieves all Sites.
curl -X GET \
-H @auth_header.txt \
"https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/sites"The following example shows how to use Python to retrieves all Sites.
import requests
headers = { "Authorization": "Bearer <auth-token>" }
url = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/sites"
resp = requests.get(url, headers=headers)Example of the Response Body
The following example shows the contents of the response body.
{
"sites": [
{
"isMgmtEnabled": false,
"noOfMCE": "0",
"noOfNetworkFunctions": "0",
"siteId": "2",
"siteName": "TestRest Second",
"siteRegistrationId": "4XKDPHGP2"
},
{
"isMgmtEnabled": false,
"noOfMCE": "0",
"noOfNetworkFunctions": "0",
"siteDescription": "Test site on restapisites",
"siteId": "1",
"siteName": "TestSite",
"siteRegistrationId": "V8RWU6WQ1"
}
]
}