Page History
Info |
---|
This page is in a very early state of development. Right now it is more a brainstorming on the structure that we want have in our REST documentation.was an initial attempt to start a conversation over the new REST API contract. We have now agree to have this conversation over a dedicated GitHub repository using pull requests and issues |
Other useful resources about the necessary endpoints and functionalities of the REST API are:
- Terrence W Brady's brainstorming on GitHub https://github.com/terrywbrady/restBrainstorm/blob/master/README.md
- John Francis Mukulu's brainstorming on Google Docs https://goo.gl/tPND8g
Table of Contents |
---|
General rules
URI Structure
Code Block |
---|
http://host:port/api/<api-name>/resource-name |
Currently there a only one API name available, which will be discussed further below:
- core - for minimal core functionalities on the data model guarantee by DSpace
It is expected to add more api names to group together specific functionalities (auth, "external plugin", ...)
The above endpoint typically refers to collection resources. Access to a specific item inside the collection is done
Code Block |
---|
http://host:port/api/<api-name>/resource-name/{id}
or
http://host:port/api/<api-name>/resource-name/{uuid} |
Methods
Item resources
generally support HEAD, GET , PUT , PATCH and DELETE
GET
Returns a single entity.
HEAD
Returns whether the item resource is available
PUT
Replaces the state of the target resource with the supplied request body.
PATCH
Similar to PUT but partially updating the resources state.
DELETE
Deletes the resource exposed.
Collection resources
generally support GET, POST
GET
Returns all entities in the collection we include the pagination links if necessary and additional page metadata.
Parameters
page - the page number to access (0 indexed, defaults to 0).
size - the page size requested (defaults to 20).
sort - a collection of sort directives in the format ($sortcriteria,)[+|-] ?.
Custom status codes
405 Method Not Allowed - for resources like bitstream, bundle, etc.
POST
Creates a new entity from the given request body.
Custom status codes
405 Method Not Allowed - if we define "read-only" collection as maybe i18n, configuration, etc.
Defined end points
/api/core/collection
Status | ||||||
---|---|---|---|---|---|---|
|
This endpoint is the entry point for all the actions on both Community and Collection.
/api/core/item
Status | ||||||
---|---|---|---|---|---|---|
|
Expand | ||
---|---|---|
| ||
Include details about the request (sample and schema) Include details about the response (sample and schema of the standard behaviour, return code and examples for fault / uncommon scenarios) |
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
/api/core/bundle
Status | ||||||
---|---|---|---|---|---|---|
|
/api/core/bitstream
Status | ||||||
---|---|---|---|---|---|---|
|
/api/core/identify
Status | ||||||
---|---|---|---|---|---|---|
|
/api/discovery?/browse
Status | ||||||
---|---|---|---|---|---|---|
|
...
Old notes not yet moved to the above github repository
Browse milestone - Feature requests
...