REST API

There are currently two existing open-source server implementations of the Bitcache REST API: one, bitcached, is written in Ruby and is included in the Bitcache reference implementation; the other is written in PHP and available as an add-on module for the Drupal content management framework.

Note that the question of authentication is entirely orthogonal to this API; authentication would typically be implemented using standard HTTP methods, but a cookie-based session, or indeed a publicly-available repository, is equally compatible with the REST API.

Method Purpose
OPTIONS / Discover set of valid HTTP methods for the bitstream index.
OPTIONS /<id> Discover set of valid HTTP methods for a bitstream resource.
INDEX / Retrieve full index of available bitstreams.
INDEX /<str> Retrieve partial index of bitstreams based on <str>.
GET / Equivalent to INDEX /.
GET /<id> Download bitstream identified by <id>.
HEAD / Like GET / but omit the response body.
HEAD /<id> Like GET /<id> but omit the response body.
POST / Upload bitstream.
PUT /<id> Upload bitstream, with <id> verification.
DELETE /<id> Delete bitstream identified by <id>.

INDEX

INDEX /

Retrieve full index of available bitstreams.

Not defined in RFC 2616

Header Value
Request
Accept MIME content type
Response
Content-Type ...

INDEX /<str>

Retrieve partial index of bitstreams based on <str>.

Not defined in RFC 2616

Header Value
Request
No request headers.
Response
Accept "OPTIONS, GET, HEAD, PUT, DELETE"

Software support

Application Status
Drupal server Supported.

OPTIONS

OPTIONS /

Discover set of valid HTTP methods for the bitstream index.

Defined in RFC 2616 §9.2

Header Value
Request
No request headers.
Response
Accept "OPTIONS, GET, POST"

OPTIONS /<id>

Discover set of valid HTTP methods for a bitstream resource identified by <id>.

Defined in RFC 2616 §9.2

Header Value
Request
No request headers.
Response
Accept "OPTIONS, GET, HEAD, PUT, DELETE"

Software support

Application Status
Drupal server Supported.

HEAD

HEAD /

Like INDEX /, but omit the response body.

Defined in RFC 2616 §9.4

HEAD /<id>

Like GET /<id> but omit the response body.

Defined in RFC 2616 §9.4

Header Value
Request
Response
Accept-Ranges "bytes"
ETag
Content-SHA1
Content-Type
Content-Length

Software support

Application Status
Drupal server Supported.

GET

GET /

Equivalent to INDEX /.

Defined in RFC 2616 §9.3

GET /<id>

Download bitstream identified by <id>.

Defined in RFC 2616 §9.3

Header Value
Request
Response
Accept-Ranges "bytes"
ETag
Content-SHA1
Content-Type
Content-Length

Software support

Application Status
Drupal server Supported.

POST

POST /

Upload bitstream.

Defined in RFC 2616 §9.5

Header Value
Request
Response

Software support

Application Status
Drupal server Supported.

PUT

PUT /<id>

Upload bitstream, with <id> verification.

Defined in RFC 2616 §9.6

Header Value
Request
Response

Software support

Application Status
Drupal server Supported.

DELETE

DELETE /<id>

Delete bitstream identified by <id>.

Defined in RFC 2616 §9.6

Header Value
Request
Response

Software support

Application Status
Drupal server Supported.