Skip to content

Upload the collection

Command line interface (CLI)

In the theia-dumper CLI, the --storage_bucket argument concatenates the actual bucket and the path prefix.

For instance if Jacques wants to upload a collection in sm1-gdc/some-path, he will have to call:

theia-dumper collection.json --storage_bucket sm1-gdc/some-path

In case he has an item, or an item collection, he can use the same command:

theia-dumper item.json --storage_bucket sm1-gdc/some-path
theia-dumper item-collection.json --storage_bucket sm1-gdc/some-path

For more details, see this page.

Python

Another way is to use the python API:

from theia_dumper.stac import TransactionsHandler

handler = TransactionsHandler(
    stac_endpoint="https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr",
    storage_endpoint="https://s3-data.meso.umontpellier.fr",
    storage_bucket="sm1-gdc/some-path",
    assets_overwrite=True
)
handler.load_and_publish("/tmp/collection.json")