Asset Upload

POST {{baseUrl}}/asset/v1/upload/{{assetId}}

This API is associated with uploading asset on the Sunbird Platform . - The/upload/{Asset Id} endpoint executes Upload Asset request based on parameters provided as metadata in the request body. - The endpoint for Upload Asset is /asset/v1/upload - It points to knowledge-mw-service - /v1/asset/upload - {...}refers to a section of upload endpoint URL path that needs to be replaced by appropriate Id. - You need to provide a valid asset Id value in {Asset Id} field of API URL. - It is mandatory to provide values for parameters marked with *. - Mandatory fields cannot be null or empty.

Request Body

[{"name"=>"file", "value"=>nil, "datatype"=>"null"}]

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 Content 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.asset.upload","ver":"4.0","ts":"2021-12-28T12:18:32ZZ","params":{"resmsgid":"1ee721a1-deb7-4e9c-8e7e-777a376f7844","status":"successful"},"responseCode":"OK","result":{"identifier":"do_1134405639859486721110","artifactUrl":"https://dockstorage.blob.core.windows.net/sunbird-content-dock/content/assets/do_1134405639859486721110/image1.jpeg","content_url":"https://dockstorage.blob.core.windows.net/sunbird-content-dock/content/assets/do_1134405639859486721110/image1.jpeg","node_id":"do_1134405639859486721110","versionKey":"1640693912866"}}