Skip to content

Tape REST API

The Tape REST API implementation in EOS offers a HTTP REST interface allowing clients to manage disk residency of tape stored files and to observe the progress of files being written to tape.

For more information on EOS documentation, check the Tape REST API page on EOS.


Specifications

The full specification document of the Tape REST API is kept on check by the FTS team. It can be found on this link.

Configuration

Enable XRootD HTTP support on the MGM

Enable XRootD HTTP support by following the HTTP(XrdHttp) and XRootD TPC with delegated credentials.

xrd.cf.mgm configuration

On the /etc/xrd.cf.mgm configuration file, the following parameters must be set:

mgmofs.tapeenabled true
taperestapi.sitename cern-cta-xxxx

In order to override the default URI returned by the .well-known (or add a redirecting URI for any version of the REST API), the following parameters must be set:

taperestapi.endpoints.<version>.uri <uri>

For example, to override v1 and manually add v1.1 we could set:

taperestapi.endpoints.v1.uri https://tape-api.example.org:1234/api/v1
taperestapi.endpoints.v1.1.uri https://tape-api.example.org:1234/api/v1.1

The taperestapi.sitename parameter corresponds to the targeted metadata identifier that will be used by the user to pass metadata to CTA for each file staged.

REST API activation/deactivation

Activation:

eos space config default taperestapi.status=on
success: Tape REST API enabled

Deactivation:

eos space config default taperestapi.status=off
success: Tape REST API disabled

Warning: the tape REST API can only be enabled/disabled on the default space. An error message will be displayed in the case one tries to enable it on a different space:

eos space config OtherSpace taperestapi.status=on
error: the tape REST API STAGE resource can only be enabled or disabled on the default space

REST API STAGE resource activation/deactivation

By default, the STAGE resource of the tape REST API is not activated. If one deactivates the tape REST API and activates it again, the STAGE resource will be deactivated by default.

Activation:

eos space config default taperestapi.stage=on
success: Tape REST API STAGE resource enabled

Deactivation:

eos space config default taperestapi.stage=off
success: success: Tape REST API STAGE resource disabled