Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove information moved to github, add link to the REST7Contract repository


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

see https://github.com/DSpace-Labs/Rest7Contract

Other useful resources about the necessary endpoints and functionalities of the REST API are:

 

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
subtletrue
colourYellow
titlework in progress

This endpoint is the entry point for all the actions on both Community and Collection.

 

/api/core/item 
Status
subtletrue
colourYellow
titlework in progress

Expand
titleCreate item - POST /api/core/item

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
titleCreate items - POST /api/core/item/bulk

 

Expand
titleGet item - GET /api/core/item/<idOruuid>

 

/api/core/bundle 
Status
subtletrue
colourYellow
titlework in progress

/api/core/bitstream 
Status
subtletrue
colourYellow
titlework in progress

/api/core/identify 
Status
subtletrue
colourYellow
titlework in progress

/api/discovery?/browse 
Status
subtletrue
colourYellow
titlework in progress

...

Old notes not yet moved to the above github repository

Browse milestone - Feature requests

...