All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
curl -s -H "Accept: application/xml" http://localhost:8080/rest/communities | xmllint --format -
Example usage from command line in JSON format with pretty printing:
...
Method | Endpoint | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GET | / | REST API static documentation page | ||||||||||||||
POST | /login | Login to the REST API using a DSpace EPerson (user). It returns a token Example Request:
Example Response:
Example of using JSESSIONID cookie for subsequent (authenticated) requests:
Example Response: 1febef81-5eb6-4e76-a0ea-a5be245563a5 Invalid email/password combinations will receive an Please note, special characters may need to be HTTP URL encoded. For example, an email address like | ||||||||||||||
POST | /logout | Logout from the REST API, by providing a | POST | /logout | Logout from the REST API, by providing a header rest-dspace-token. After being posted this token cookie will no longer work. 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:
Example Response: REST api is running.
Example Response:
| ||||||||||||||
GET | /status | Receive information about the currently authenticated user token. Example Request (XML by default):
Example Request (JSON):
| GET | /status | Receive information about the currently authenticated user token. Example Request: curl -X GET -H
Example JSON Response: Example Response:
|
Communities in DSpace are used for organization and hierarchy, and are containers that hold sub-Communities and Collections. (ex: Department of Engineering)
...