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.

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

General rules

URI Structure

http://host:port/api/<api-name>/resource-name

Currently there a only one API name available, which will be discussed further below:

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

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 

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

 

/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)

 

 

/api/core/bundle 

/api/core/bitstream 

/api/core/identify 

/api/discovery?/browse 

/api/discovery?/search 

Browse milestone - Feature requests

The repository has a homepage. The community / collection / item structure can be browsed. There are community and collection home pages and item pages. Bitstreams can be downloaded. The repository can be indexed by google scholar.


Bitstream

Bundle

Item

Collection/Community

What are the “browse” endpoints?

General questions

Handle

Is there a use for a separate metadata endpoint in rest?

 

JSON API or HAL

How does pagination work?

 


Limiting the number of fields in the response

How do we handle relationships for objects that have a lot of them?

How does inclusion of related resources work?

Every DSpace Object needs to show its location in the trail

Use UUIDs?