The reg-api-client is a client implementation aimed to support the Data Provider in interfacing with the Registration API, with an S3 staging area backend for assets.
There are three ways you can run install this client:
- locally, via python, installing s5cmd and curl dependencies
- as a Docker container, available at
- as a CWL/OGC Application Package, into a supported platform
Ensure you have installed s5cmd, curl and python3 (version 3.9 or grether)
Download the script from this repository and make it executable
curl -L -o reg-api-client https://github.com/EOEPCA/reg-api/raw/refs/heads/main/client/reg-api-client
chmod +x reg-api-clientYou can now execute the software locally via
./reg-api-client --helpEnsure you have docker installed.
Run the software via
docker run eoepca/reg-api-client:latest --helpThe OGC Application Package is a fully fledged CWL you can use to deploy and run your application into different platforms and infrastructure. Most notably, you can use:
- CWLTool to run CWL locally
- Toil to run CWL on an HPC cluster
- OGC API Process Part 2 or the OpenEO Community Standard UDF APIs to deploy and run on an Exploitation Platform
Locally, after installing CWLTool, you can run the CWL file provided in this repository via the following command
cwltool reg-api-client.cwl --collection PRR_TEST --password test --username test --product http://path/to/stac/to/ingestYou can install Toil and run the CWL file provided in this repository as any other CWL file. NOTE: Ensure you have docker available in your processing cluster.
If the reg-api-client service is not already installed in your platform, deploy the OGC application package CWL file contained in this repository into a supported platform via OGC API Process Part 2 or the OpenEO Community Standard UDF
Please follow your platform instructions to understand how to perform the deployment, if required, and later run the process using the platform UI or API (OGC API Process Part 1 or OpenEO)
Note that your platform UI and API will you only allow you to set the main execution parameters. You can configure all the other parameters, like for example specifying the endpoints of the Registration API Gateway, directly in the CWL file before deployment.
In general, the tool takes as input the following main parameters,
- One or more product in the form of STAC Items, STAC Catalogues, STAC Collections or STAC Assets to be ingested via the Registration API Gateway
- A collection ID, where the product is going to be ingested
- Credentials for the Registration API gateway
In case a STAC Item is provided in input, its assets will be downloaded and uploaded in the Registration API stagein bucket, then the STAC Item will be posted to the Registration API. If a STAC Catalogue or STAC Collection is provided, it is navigated recursively looking for STAC Items, all the STAC Items found will be ingested in the same Collection ID at the same level. If a STAC Asset is provided, a STAC Item is created with basic metadata and registered.
The input product, whatever STAC Items, STAC Catalogues, STAC Collections or STAC Assets can be provided with a local link, HTTP(s) or S3.
More details about the tool usage is provided in the help, available via the --help switch.