Downloads API

An user can download the content of a learning object or collection.

Download an object

GET /v1/:type/:id/download

Parameters

Name Description
download[type] Represents the type of object [‘learning_objects’,'collections']
download[id] The id of object

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: vad1Dc9G-jC7t6B9Uj5RBg
Client: 2lMLXs81SjHLDZf9VAtGkA
Uid: howell_harris@robertstromp.net
Host: example.org
Cookie: 

Route

GET /v1/learning_objects/634/download?download[type]=learning_objects&download[id]=634

Query Parameters

download: {"type"=>"learning_objects", "id"=>"634"}

cURL

curl -g "https://api.portalmec.c3sl.ufpr.br/v1/learning_objects/634/download?download[type]=learning_objects&download[id]=634" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: vad1Dc9G-jC7t6B9Uj5RBg" \
	-H "Client: 2lMLXs81SjHLDZf9VAtGkA" \
	-H "Uid: howell_harris@robertstromp.net"

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Location: https://mecdb1.c3sl.ufpr.br:8443/rest/bitstreams/17834/retrieve
Content-Type: text/html; charset=utf-8
Set-Cookie: _session_id=Q3U0WkZEQmxYQURTTFJVZmJyaG56aTZtZFBpb2dMeW5rZWhTU3l3ald2VmJsZUFGendvYlY2ckNxVU9KaXRoekE1R1ZJeFR5dlZiYy94OXVjdjVaMjIrMHkvU3BuZTVPSGJZQWlDWjRXUm15QlQwSlFmU3B2M3dnNXZHY0xySXpwaUFlRjh2SHFmbm80eVZ1aVYxbFVKdUVHVitZN2FCSVVud21TbWtISlUvdFpvelVJUitvRmp1S1FCZ2grZWV4LS1ySld2eHJwSWVMc3M0UjFFM1M4MTJRPT0%3D--a2b816aab9616f738d46aa7e9d2ccae1a031e925; path=/; HttpOnly
Vary: Origin
Cache-Control: no-cache
X-Request-Id: fff467d3-f80a-4919-b896-c6c28e69f0ee
X-Runtime: 0.166445
Content-Length: 129

Status

302 Found

Body

<html><body>You are being <a href="https://mecdb1.c3sl.ufpr.br:8443/rest/bitstreams/17834/retrieve">redirected</a>.</body></html>