All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
Method | Endpoint | Description | ||||||
---|---|---|---|---|---|---|---|---|
GET | / | REST API static documentation page listing available endpoints and their function. Example: | ||||||
POST | /login | Login to the REST API using a DSpace EPerson (user). It returns a Example Request:
Example Response:
Example of using JSESSIONID cookie for subsequent (authenticated) requests:
Invalid email/password combinations will receive an Please note, special characters need to be HTTP URL encoded. | ||||||
GET | /shibboleth-login | Login to the REST API using Shibboleth authentication. In order to work, this requires additional Apache configuration. To authenticate, execute the following steps: 1. Call the REST Shibboleth login point with a Cookie jar:
2. This should take you again to the IdP login page. You can submit this form using curl using the same cookie jar. However this is IdP dependant so we cannot provide an example here. 3. Once you submit the form using curl, you should be taken back to the /rest/shibboleth-login URL which will return you the JSESSIONID. 4. Using that JSESSIONID, check if you have authenticated successfully:
| ||||||
POST | /logout | Logout from the REST API, by providing a Example Request:
After posting a logout request, cookie is invalidated and the "/status" path should show you as unauthenticated (even when passing that same cookie). For example:
Invalid token will result in HTTP 400 Invalid Request | ||||||
GET | /test | Returns string "REST api is running", for testing that the API is up. Example Request:
https://demo.dspace.org/rest/test Example Response:
| ||||||
GET | /status | Receive information about the currently authenticated user token, or the API itself (e.g. version information). Example Request (XML by default):
https://demo.dspace.org/rest/status Example Request (JSON):
Example JSON Response:
|
...
HTTP method | REST endpoint | Description |
---|---|---|
GET | /communities | Return an array of all the communities in the repository. The results are paginated. Example: |
GET | /communities/top-communities | Return an array of all top-level communities. The results are paginated. Example: |
GET | /communities/{community id} | Return the specified community. Example: https://demo.dspace.org/rest/communities/e97b847b-2fd5-4751-8d91-fcf0d8895b81 |
GET | /communities/{community id}/collections | Return an array of collections of the specified community. The results are paginated. |
GET | /communities/{community id}/communities | Return an array of sub-communities of the specified community. The results are paginated |
POST | /communities | Create a new community at top level. You must post a community object data type. |
POST | /communities/{community id}/collections | Create a new collections in the specified community. You must post collection object data type. |
POST | /communities/{community id}/communities | Create a new sub-community in the specified community. You must post a community object data type. |
PUT | /communities/{community id} | Update the specified community. You must put community object data type. |
DELETE | /communities/{community id} | Delete the specified community. |
DELETE | /communities/{community id}/collections/{collection id} | Delete the specified collection in the specified community. |
DELETE | /communities/{community id}/communities/{sub-community id} | Delete the specified sub-community in the specified community. |
...
HTTP method | REST endpoint | Description |
---|---|---|
GET | /collections | Return an array of all the collections in the repository. The results are paginated. |
GET | /collections/{collection id} | Return the specified collection. |
GET | /collections/{collection id}/items | Return an array all items of the specified collection. The results are paginated. |
POST | /collections/{collection id}/items | Create an item in the specified collection. You must post an item object data type. |
POST | /collections/find-collection | Find collection by passed name. Returns the first exact match or nothing. You must post a single string, not a JSON object. |
PUT | /collections/{collection id} | Update the specified collection. You must put a collection object data type. |
DELETE | /collections/{collection id} | Delete the specified collection. |
DELETE | /collections/{collection id}/items/{item id} | Delete the specified item in the specified collection. |
...
HTTP method | REST endpoint | Description |
---|---|---|
GET | /items | Return an array of all the items in the repository. The results are paginated. Example: |
GET | /items/{item id} | Return the specified item. |
GET | /items/{item id}/metadata | Return metadata of the specified item. |
GET | /items/{item id}/bitstreams | Return an array of all the bitstreams of the specified item. The results are paginated. |
POST | /items/find-by-metadata-field | Find items by metadata entry. You must post a metadataentry object data type. |
POST | /items/{item id}/metadata | Add metadata to the specified item. You must post an array of metadataentry object data type. |
POST/GET | /items/{item id}/bitstreams?name={file name} | Add bitstream to the specified item. You must post the file data and include the name parameter with the value as {file name} in the URL posted to.
description: A description of the bitstream. groupId: Id of group to set item resource policy to. year: Year to set embargo date to month: Month to set embargo date to day: Day of month to set embargo date to Example: /items/{item id}/bitstreams?name=The%20Children%27s%20Crusade%3A%20A%20Duty-Dance%20with%20Death.pdf&description=All%20this%20happened%2C%20more%20or%20less.&groupID=1969&year=2045&month=2&day=13 |
PUT | /items/{item id}/metadata | Update metadata in the specified item. You must put a metadataentry object data type. Each metadata entry that will replace all prior matching metadata entries, i.e. if you submit n 'dc.subject' entries all pre-existing 'dc.subject' entries in the item will be deleted and replaced with the n entries |
DELETE | /items/{item id} | Delete the specified item. |
DELETE | /items/{item id}/metadata | Clear the metadata of the specified item. |
DELETE | /items/{item id}/bitstreams/{bitstream id} | Delete the specified bitstream of the specified bitstream. |
...
HTTP method | REST endpoint | Description |
---|---|---|
GET | /bitstreams | Return an array of all the bitstreams in the repository. The results are paginated. Example: |
GET | /bitstreams/{bitstream id} | Return the specified bitstream. |
GET | /bitstreams/{bitstream id}/policy | Return bitstream policies. |
GET | /bitstreams/{bitstream id}/retrieve | Return data of bitstream. |
POST | /bitstreams/{bitstream id}/policy | Add policy to item. You must post a resourcepolicy object data type. |
PUT | /bitstreams/{bitstream id}/data | Update the data/file of the specified bitstream. You must put the data. |
PUT | /bitstreams/{bitstream id} | Update metadata of the specified bitstream. You must put a Bitstream, does not alter the file/data. |
DELETE | /bitstreams/{bitstream id} | Delete the specified bitstream. |
DELETE | /bitstreams/{bitstream id}/policy/{policy_id} | Delete the specified resource policy of the specified bitstream. |
...