Get NF Device Groups

get

/rest/{versionId}/inventory/nf-mgmt/nfs/{nfId}/groups

Use this (GET) method to display existing device groups in a Network Function (NF).

Request

Path Parameters
Back to Top

Response

200 Response

Retrieved NFs Group based on NfId 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 object (resource URI, device, and so on) 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 get NF Device Groups.

curl -X GET \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/nf-mgmt/nfs/<nfId>/groups"

The following example shows how to use Python to get NF Device Groups.

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

Note:

Use the Get List of NFs in Device Management API to find the nfId parameter.

Example of the Response Body

The following example shows the contents of the response body.

{
  "deviceGroups": [
    {
      "fullName": "Home/sbc28",
      "id": "26",
      "name": "sbc28",
      "parameters": [
        {
          "description": "User name to use for device communication",
          "name": "username",
          "readOnly": false,
          "value": "admin",
          "valueType": "String"
        },
        {
          "description": "Password of the user",
          "name": "password",
          "readOnly": false,
          "value": "xxxx",
          "valueType": "String"
        },
        {
          "description": "The SNMP agent mode configured for the device",
          "name": "snmp.mode",
          "readOnly": true,
          "validValues": [
            "v1v2"
          ],
          "value": "v1v2",
          "valueType": "SingleSelection"
        },
        {
          "description": "SNMP Community to use for device communication when snmp.mode value is v1v2",
          "name": "snmp.community.name",
          "readOnly": false,
          "value": "abhisikj",
          "valueType": "String"
        },
        {
          "description": "SNMP Port to use for device communication",
          "maxValue": 9223372036854775807,
          "minValue": 0,
          "name": "snmp.port",
          "readOnly": false,
          "value": "161",
          "valueType": "NumberString"
        }
      ],
      "parentGroupFullName": "Home",
      "parentGroupId": "1",
      "type": "DEVICE"
    }
  ]
}    
Back to Top