An Item's Resource is an URL (e.g. URL pointing to a file) and can exists only attached to an item.
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
ITEM_ID | path |
media type | data type | description |
---|---|---|
application/json;charset=UTF-8 | string |
GET /items/{ITEM_ID}/resources
Content-Type: */*
Accept: application/json;charset=UTF-8
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
...
An Resource is mainly described by the following attributes (* indicate mandatory attributes):
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
ITEM_ID | path |
media type | data type |
---|---|
application/json;charset=UTF-8 | string |
media type | data type | description |
---|---|---|
application/json;charset=UTF-8 | object |
POST /items/{ITEM_ID}/resources
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Authorization: ...
...
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
...
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
ITEM_ID | path | |
RESOURCE_ID | path |
media type | data type | description |
---|---|---|
*/* | object |
DELETE /items/{ITEM_ID}/resources/{RESOURCE_ID}
Content-Type: */*
Accept: */*
Authorization: ...
...
HTTP/1.1 204 No Content
Content-Type: */*
...
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
ITEM_ID | path | |
RESOURCE_ID | path |
media type | data type | description |
---|---|---|
application/json;charset=UTF-8 | string |
GET /items/{ITEM_ID}/resources/{RESOURCE_ID}
Content-Type: */*
Accept: application/json;charset=UTF-8
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
...
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
ITEM_ID | path | |
RESOURCE_ID | path |
media type | data type |
---|---|
application/json;charset=UTF-8 | string |
media type | data type | description |
---|---|---|
application/json;charset=UTF-8 | string |
PATCH /items/{ITEM_ID}/resources/{RESOURCE_ID}
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
...
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
ITEM_ID | path | |
RESOURCE_ID | path |
media type | data type |
---|---|
application/json;charset=UTF-8 | string |
media type | data type | description |
---|---|---|
application/json;charset=UTF-8 | string |
PUT /items/{ITEM_ID}/resources/{RESOURCE_ID}
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Authorization: ...
...
HTTP/1.1 204 No Content
Content-Type: application/json;charset=UTF-8
...