Page History
...
This contract provides detailed information on how to interact with the API, what endpoints are available, etc. All features/capabilities of the DSpace UI are available in this API.
Finding which REST API Endpoint to use
When first trying the use the DSpace REST API, it can be difficult to determine where to begin. This brief guide provides a few hints on where to start.
First, it's important to be aware that every single action in the User Interface can be done in the REST API. So, if you can achieve something in the User Interface, then it's also possible to do via the REST API.
A few key endpoints to be aware of:
- Authentication: https://github.com/DSpace/RestContract/blob/main/authentication.md
- CSRF Tokens (required for all non-GET requests): https://github.com/DSpace/RestContract/blob/main/csrf-tokens.md
- Submission via REST API: https://github.com/DSpace/RestContract/blob/main/submission.md
- Search via REST API (across all object types): https://github.com/DSpace/RestContract/blob/main/search-endpoint.md
- Some endpoints also provide a "/search" subpath: https://github.com/DSpace/RestContract/blob/main/search-rels.md
How to find which endpoint(s) to use for any feature or action:
- Open the DSpace User Interface in your browser window. You can even use our Demo Site (https://demo.dspace.org/) if you don't have the User Interface installed or running locally.
- In your Browser, open the "Developer Tools"
- In Chrome, go to "More Tools → Developer Tools"
- In Firefox, go to "Web Developer → Web Developer Tools".
- In Microsoft Edge, go to "More Tools → Developer Tools".
- Once in "Developer Tools", open the "Network" tab. This tab will provide information about every single call that the User Interface makes to the REST API.
- Now, perform an action or use a feature in the User Interface in your browser window.
- Analyze what calls were just sent to the REST API in your "Network" tab. Those are the exact REST API endpoints that were used to perform that action.
- NOTE: Some actions may use multiple endpoints.
- Finally, lookup the documentation for those endpoint(s) in the REST Contract / Documentation (see link above)
REST Configuration
The following REST API configurations are provided in [dspace]/config/rest.cfg
and may be overridden in your local.cfg
...