Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

How to find which endpoint(s) to use for any feature or action:

  1. 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.
  2. In your Browser, open the "Developer Tools"
    1. In Chrome, go to "More Tools → Developer Tools"
    2. In Firefox, go to "Web Developer → Web Developer Tools".
    3. In Microsoft Edge, go to "More Tools → Developer Tools". 
  3. 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.
  4. Now, perform an action or use a feature in the User Interface in your browser window.
  5. 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.
    1. NOTE: Some actions may use multiple endpoints.
  6. 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

...