Updates the device group in a Network Function (NF)

put

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

Use this (PUT) method to edit the device group in a Network Function (NF), such as the user name, password used with the device, or SNMP parameters.

Request

Path Parameters
Back to Top

Response

200 Response

Updated NF 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 change in request parameter values.

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 update the device group in a Network Function (NF).

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

The following example shows how to use Python to update the device group in a Network Function (NF).

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/nf-mgmt/nfs/<nfId>/groups/<groupId>"
resp = requests.put(url, headers=headers, data=data)

Note:

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

Example of the Request Body

The following shows an example of the contents of the request file sent as the request body.

{
  "parameters": [
    {
      "name": "web.port",
      "value": "162"
    }
  ]
}    

Example of the Response Body

The following example shows the contents of the response body.

{
  "fullName": "Home/esbcHAPair_21_22",
  "id": "49",
  "name": "esbcHAPair_21_22",
  "parameters": [
    {
      "description": "User name to use for device communication",
      "name": "username",
      "readOnly": false,
      "value": "admin",
      "valueType": "String"
    },
    {
      "description": "Web protocol to use for device launch",
      "name": "web.protocol",
      "readOnly": false,
      "validValues": [
        "HTTP"
      ],
      "value": "HTTP",
      "valueType": "SingleSelection"
    },
    {
      "description": "Password of the user",
      "name": "password",
      "readOnly": false,
      "value": "xxxx",
      "valueType": "String"
    },
    {
      "description": "Web port to use for device launch",
      "maxValue": 9223372036854775807,
      "minValue": 0,
      "name": "web.port",
      "readOnly": false,
      "value": "162",
      "valueType": "NumberString"
    },
    {
      "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