Adds a site
post
/rest/{versionId}/inventory/device-mgmt/sites
Use this (POST) method to add a site to Device Manager. A site is used to group Network Functions (NFs) and devices based on their physical location.
Request
Path Parameters
Back to Top
Response
201 Response
Site created 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 name 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 adds a site.
curl -X POST \
-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 adds a site.
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.post(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.
{
"siteName" : "Test"
"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"
}