Retrieve assigned Sites detail for a Managing Site.
get
/rest/{versionId}/inventory/device-mgmt/sites/{managingSiteId}/assign
Use this (GET) method to get assigned sites details for a managing site. 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
Retrieved assigned sites details 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
409 Response
No managed sites found for the given site Id
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 retrieve assigned Sites detail for a Managing Site..
curl -X GET \
-H @auth_header.txt \
"https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/sites/<managingSiteId>/assign"The following example shows how to use Python to retrieve assigned Sites detail for a Managing Site..
import requests
headers = { "Authorization": "Bearer <auth-token>" }
url = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/sites/<managingSiteId>/assign"
resp = requests.get(url, headers=headers)Note:
Use the Retrieves all Sites API to find the managingSiteId parameter.Example of the Response Body
The following example shows the contents of the response body.
{
"assignedSites": [
{
"isMgmtEnabled": false,
"noOfMCE": "1",
"noOfNetworkFunctions": "2",
"siteDescription": "newDesc",
"siteId": "1",
"siteName": "local",
"siteRegistrationId": "YF7MH51V1"
},
{
"isMgmtEnabled": false,
"noOfMCE": "0",
"noOfNetworkFunctions": "0",
"siteId": "22",
"siteName": "siteTest",
"siteRegistrationId": "JH789JRJ22"
},
{
"isMgmtEnabled": false,
"noOfMCE": "0",
"noOfNetworkFunctions": "0",
"siteId": "21",
"siteName": "test",
"siteRegistrationId": "63KGGOLX21"
}
],
"managingSite": {
"isMgmtEnabled": false,
"noOfMCE": "1",
"noOfNetworkFunctions": "2",
"siteDescription": "newDesc",
"siteId": "1",
"siteName": "local",
"siteRegistrationId": "YF7MH51V1"
}
}