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
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | (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-Type | string | The Asset Type entity is the media type of the resource.Possible | |
x-authenticated-user-token | string | (Required) Represents the authorized User ID to execute the API | |
X-Channel-ID | string | (Required) Represents a physical location (e.g: state) uniquely to which the user belongs | |
Accept | string |
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"]}}