http-api

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

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

Prototype

Hello EUDAT user!

The first release candidate was created.

Before getting our hands on the first HTTP-API server prototype, here’s a list of key points to consider:

The HTTP API prototype endpoints are accessible through the following two URI prefixes:

(for example to authenticate you need to POST credentials at: https://b2stage-test.cineca.it/auth/b2safeproxy)

Status

The status page for the current prototype is: https://b2stage-test.cineca.it/api/status

This is the endpoint to call if you want to automatically verify if the server is responding to request.

List of available endpoints

How do we understand which endpoint we need to call and which require authentication?

The EUDAT B2STAGE HTTP API provide description of up-to-date specifications following the latest version (3.0) of the openapi standard from Swagger.

The description in JSON format is available at: https://b2stage-test.cineca.it/api/specs

Clients

authentication process

Details on how to create a valid token upon the current release of the HTTP API is available inside the user guide.

curl

See also the main user page to understand which endpoints exists and how to use them from command line/terminal with the curl application.

official swagger-ui website

Since the HTTP API server follows the openapi standard, you can query its endpoints also using the official swagger-ui web server, by just passing the JSON file in input:

link to the swagger petstore

python client

You can find a dedicated python module file to query the EUDAT B2STAGE HTTP-API.

The script is already configured to work with a local deploy of the HTTP-API containers on your computer or to a remote host. Before using it open the file and change the basic parameters.

local

If you are running a working copy of the B2STAGE HTTP-API you can test the client by simply calling from a UNIX terminal:

data/scripts/templates/client.py

remote

If you have credentials to a remote instance of the HTTP-API you just need to provide them inside the script and then execute with:

data/scripts/templates/client.py --remote