CSV TOC Upload
POST {{baseUrl}}/collection/v1/import/{{collectionId}}
'This API is used to upload TOC with csv format on the Sunbird Platform.
The endpoint for TOC CSV upload is /collection/v1/import
You can find sample TOC CSV here:
or use following data with first line as header of csv and the rest is example of TOC data.
Level 1 Folder*,Level 2 Folder,Level 3 Folder,Level 4 Folder,Description
5. Human Body,,,,
5. Human Body,5.1 Parts of Body,,,,
or use following data with first line as header of csv and the rest is example of TOC data.
Collection Name*,Folder Identifier*,Level 1 Folder*,Level 2 Folder,Level 3 Folder,Level 4 Folder,Description,Mapped Topics,Purpose of Content to be linked,Keywords,QR Code Required?,QR Code,Linked Content 1,Linked Content 2,Linked Content 3,Linked Content 4,Linked Content 5,Linked Content 6,Linked Content 7,Linked Content 8,Linked Content 9,Linked Content 10,Linked Content 11,Linked Content 12,Linked Content 13,Linked Content 14,Linked Content 15,Linked Content 16,Linked Content 17,Linked Content 18,Linked Content 19,Linked Content 20,Linked Content 21,Linked Content 22,Linked Content 23,Linked Content 24,Linked Content 26,Linked Content 27,Linked Content 8,Linked Content 29,Linked Content 30
Science-10,id1,5. Human Body,,,,This chapter describes about human body,Human Body,
head, eyes, nose, mouth,Yes,MC8L1V,do_31260042816321126413012,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Science-10,id2,5. Human Body,5.1 Parts of Body,,,
This section describes about various part of the body such as head, hands, legs etc.,Parts of Body,,No,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Science-10,id3,5. Human Body,5.1 Parts of Body,5.1.1 Key parts in the head,,,Parts of Head,,Yes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Science-10,id4,5. Human Body,5.1 Parts of Body,5.1.2 Other parts,,,,,No,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Science-10,id5,5. Human Body,5.2 Organ Systems,,,,Organ Systems,,No,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Science-10,id6,5. Human Body,5.2 Organ Systems,5.2.1 Respiratory System,,,Respiratory System,,No,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.'
Request Body
[{"name"=>"fileUrl", "value"=>"{{collectionFileUrl}}", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | (Required) The Content Type entity is the media type of the resource. Possible media types are:- |
- Application/json
- Multipart/form-data
- Application/x-www-form-urlencoded |
|
X-Authenticated-User-Token
| string | | (Required) Specify authorization key (format: Bearer api-key) received from administrator when performing given API request. | |Authorization
| string | | (Required) Access token of registered user performing given API request. | |Accept
| string | | |
RESPONSES
status: OK
{"id":"api.collection.import","ver":"v1","ts":"2021-06-08 15:35:56:361+0000","params":{"resmsgid":null,"msgid":"b3eb6ee7-108d-48b7-9f9f-0d96c55ac289","err":null,"status":"success","errmsg":null},"responseCode":"OK","result":{"response":"SUCCESS"}}