Update Site details by Site Id
put
/rest/{versionId}/inventory/device-mgmt/sites
Use this (PUT) method to update the details of site by sites id
Request
Path Parameters
Back to Top
Response
200 Response
Updated site 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
The site with site desc already exists
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 update Site details by Site Id.
curl -X PUT \
-d @request.json \
-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 update Site details by Site Id.
import requests
import json
headers = {
"Accept": "application/json",
"Authorization": "Bearer <auth-token>"
}
with open("request.json") as f: data = json.load(f)
url = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/sites"
resp = requests.put(url, headers=headers, data=data)Example of the Request Body
The following shows an example of the contents of the request file sent as the request body.
{
"siteId" : "1",
"siteDescription": "Test Site"
}
Example of the Response Body
The following example shows the contents of the response body.
{
"siteId": 1,
"siteName": "Test",
"siteDescription": "Test Site",
"noOfMCE": "0",
"noOfNetworkFunctions": "0",
"isMgmtEnabled": false,
"siteRegistrationId": "Q9H2URTN1"
}