Retrieve Site details by Site name

get

/rest/{versionId}/inventory/device-mgmt/sites/{siteName}

Use this (GET) method to retrieve the details of site by sites name 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

Retrieve site 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

500 Response

An internal server error has occurred while processing the request.
Back to Top

Examples

Examples of Accessing the API

See Authenticate page to acquire a token.

The following example shows how to use curl to retrieve Site details by Site name.

curl -X GET \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/sites/<siteName>"

The following example shows how to use Python to retrieve Site details by Site name.

import requests
headers = { "Authorization": "Bearer <auth-token>" }
url  = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/sites/<siteName>"
resp = requests.get(url, headers=headers)

Note:

Use the Retrieves all Sites API to find the siteId parameter.

Example of the Response Body

The following example shows the contents of the response body.

{
  "isMgmtEnabled": false,
  "noOfMCE": "1",
  "noOfNetworkFunctions": "1",
  "siteDescription": "Test site",
  "siteId": "1",
  "siteName": "TestSite",
  "siteRegistrationId": "V8RWU6WQ1"
}      
Back to Top