http-api

RESTful HTTP-API for the B2STAGE service inside the EUDAT project

View the Project on GitHub EUDAT-B2STAGE/http-api

B2STAGE HTTP-API User Documentation

This guide describes the B2STAGE HTTP-API operations, related request, response structures and error codes.

The current release of the B2STAGE HTTP-API allows users to perform the following operations on B2SAFE:

The complete description of the operation you can perform is available in:

Authentication flow

The HTTP-API supports two kinds of authentication:

To send any kind of requests to the B2STAGE HTTP-API an authentication token is needed:

  1. the user requests an authentication token following the steps described in the B2ACCESS or in the local B2SAFE credentials documentation pages. If the request succeeds, the server returns an authentication token;

  2. once obtained a valid authentication token, the user can send HTTP requests to the B2STAGE http server including the token in the “Authorization: Bearer” header (see Send API request).

Send API request example

An example of API request is the following:

$ curl \
  -H "Authorization: Bearer <auth_token>" \
  <http_server:port>/api/status

Note: According to the EUDAT Data Architecture B2SAFE is part of the registered data domain, where digital objects are stored and managed in such a way that data carrying associated descriptive metadata is discoverable and can be referred to or retrieved using persistent identifiers.