Add Collection Hierarchy

PATCH {{baseUrl}}/collection/v1/hierarchy/add

This API is associated with creating Collection on the Sunbird Platform. - The endpoint for Create Collection is collection/v1/hierarchy/add - It points to knowledge-mw-service - /v1/collection/hierarchy/add - It is mandatory to provide values for parameters marked with * - Mandatory fields cannot be null or empty.

Request Body

{"request"=>{"rootId"=>"do_1134445959309803521184}", "unitId"=>"do_1134445959318241281187", "children"=>["do_1134455063866736641416"]}}

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring(Required) To make use of the API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.
Content-TypestringThe Asset Type entity is the media type of the resource.Possible
x-authenticated-user-tokenstring(Required) Represents the authorized User ID to execute the API
X-Channel-IDstring(Required) Represents a physical location (e.g: state) uniquely to which the user belongs
Acceptstring

RESPONSES

status: OK

{"id":"api.collection.hierarchy.add","ver":"3.0","ts":"2022-01-04T11:54:05ZZ","params":{"resmsgid":"bb899cb6-e81a-4a7d-9e87-710aa1fba0ce","status":"successful"},"responseCode":"OK","result":{"rootId":"do_1134445959309803521184","do_1134445959318241281187":["do_1134455063866736641416"]}}