Move an NF to Another Device Group Parent
put
/rest/{versionId}/inventory/nf-mgmt/nfs/{nfId}
Use this (PUT) method to move a Network Function (NF) to another group. You cannot move the NF if it is locked unless you are the owner of the lock or an administrator overrides the lock. An error message appears in both situations.
Request
Path Parameters
Back to Top
Response
204 Response
Moved NF successfully.
400 Response
The user input is invalid (when user try to move locked device or when user try to move MCE)
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.
Examples
Examples of Accessing the API
See Authenticate page to acquire a token.
The following example shows how to use curl to move an NF to Another Device Group Parent.
curl -X PUT \
-d @request.json \
-H @auth_header.txt \
"https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/nf-mgmt/nfs/<nfId>"The following example shows how to use Python to move an NF to Another Device Group Parent.
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>"
resp = requests.put(url, headers=headers, data=data)Note:
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.
{
"parentGroupFullName": "testDevGrp"
}
Example of the Response Body
This endpoint does not return a response body.