Asset Upload Url
POST {{localUrl}}/asset/upload/url/{{assetId}}
This API is associated with uploading asset on the Sunbird Platform .
- The/upload/url/{Asset Id} endpoint executes Upload Asset URL
request based on parameters provided as metadata in the request body.
- The endpoint for Upload Asset URL is /asset/v1/upload/url
- It points to knowledge-mw-service - /v1/asset/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 asset Id value in {Asset 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"=>{"asset"=>{"fileName"=>"flower6.jpeg"}}}
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 Content 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.asset.upload.url","ver":"3.0","ts":"2021-12-30T07:57:47ZZ","params":{"resmsgid":"df673ca8-7d2c-46c9-b9e5-77e5602f9454","status":"successful"},"responseCode":"OK","result":{"identifier":"do_1134418461689282561147","url_expiry":"54000","pre_signed_url":"https://dockstorage.blob.core.windows.net/sunbird-content-dock/content/assets/do_1134418461689282561147/flower6.jpeg?sv=2017-04-17\u0026se=2021-12-30T22%3A57%3A47Z\u0026sr=b\u0026sp=w\u0026sig=2pow25YLNLIM0hrMwVx4uy3aDu3BTNNbNdLI8X9Yt4M%3D"}}