Upload URL

POST {{baseUrl}}/content/v2/upload/url/:Content_Id

This API is associated with uploading content on the Sunbird Platform . - The/upload/url/{content Id} endpoint executes Upload Content URL request based on parameters provided as metadata in the request body. - The endpoint for Upload Content URL is /content/v2/upload/url - It points to knowledge-mw-service - /v2/content/upload/url - {...}refers to a section of upload endpoint URL path that needs to be replaced by appropriate Id. - You need to provide a valid content Id value in {Content Id} field of API URL. - On Success api returns pre-signed-url link with come configured ttl against which file can be uploaded. - It is mandatory to provide values for parameters marked with *. - Mandatory fields cannot be null or empty.

Request Body

{"request"=>{"content"=>{"fileName"=>"test.pdf"}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring(Required) The Content Type entity is the media type of the resource.Possible media types can be:-
  • Application/json | | X-Authenticated-Userid | string | | (Required) The Registered User ID to execute the API. | | Authorization | string | | (Required) All content APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API. | | Accept | string | | |

RESPONSES

status: OK

{"id":"api.content.upload.url","ver":"3.0","ts":"2020-12-11T23:52:44ZZ","params":{"resmsgid":"81e308fa-3e36-45ff-b295-e28e8f757dc7","msgid":null,"err":null,"status":"successful","errmsg":null},"responseCode":"OK","result":{"identifier":"do_11317053041892556811094","url_expiry":"54000","pre_signed_url":"https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/assets/do_11317053041892556811094/10-page-pdf.pdf?sv=2017-04-17\u0026se=2020-12-12T14%3A52%3A44Z\u0026sr=b\u0026sp=w\u0026sig=Tlt6uWI/6lMeupkEbsTAmGajmo1qzw8HeUHrVwOm6yk%3D"}}