A.4 Deletion of resources
32.1583GPPDesign rules for REpresentational State Transfer (REST) Solution Sets (SS)Management and orchestrationRelease 17TS
A.4.1 Deletion of a resource with HTTP DELETE
The following example deletes an instance of "ManagedElement". The resource to be deleted is identified with the target URI. The request body is absent.
|
DELETE /SubNetwork=SN1/ManagedElement=ME2 HTTP/1.1 Host: example.org |
The MnS Producer might respond as follows.
|
HTTP/1.1 204 No Content Date: Tue, 06 Aug 2019 16:50:26 GMT |
A.4.2 Deletion of multiple resources with HTTP DELETE
The deletion of multiple resources with a single HTTP DELETE request is not supported. The following request is hence invalid.
|
DELETE /SubNetwork=SN1?scopeType= BASE_NTH_LEVEL&scopeLevel=2 HTTP/1.1 Host: example.org |
A.4.3 Deletion of multiple resources with 3GPP JSON Merge Patch
One or more descendant resources of the target URI can be deleted with a single 3GPP JSON Merge Patch request. The following example deletes the "ManagedElement" resource with "ME1" including both its "XyzFunction" resources.
The target URI has been chosen to identify the first common ancestor of the resources to be deleted. The patch document starts with the target resource. All resources of the subtree to be deleted are marked for deletion.
|
PATCH /SubNetwork=SN1 HTTP/1.1 Host: example.org Content-Type: application/3gpp-merge-patch+json { "id": "SN1", "ManagedElement": [ { "id": "ME1", "attributes": "null", "XyzFunction": [ { "id": "XYZF1", "attributes": "null" }, { "id": "XYZF2", "attributes": "null" } ] } ] } |
A.4.4 Deletion of multiple resources with 3GPP JSON Patch
Multiple resources are deleted with an ordered sequence of "remove" operations. The following example removes a complete subtree for a "ManagedElement".
The target URI has been chosen to identify the parent resource of the "ManagedElement" resource to be deleted. The "path" specifies the offset to the resources to be deleted. The "path" has no fragment component.
Child resources are deleted before parent resources, starting with leaf resources.
|
PATCH /SubNetwork=SN1 HTTP/1.1 Host: example.org Content-Type: application/3gpp-json-patch+json [ { "op": "remove", "path": "/ManagedElement=ME1/XyzFunction=XYZF1" }, { "op": "remove", "path": "/ManagedElement=ME1/XyzFunction=XYZF2" }, { "op": "remove", "path": "/ManagedElement=ME1" } ] |