Skip to main content
Version: 1.16

Create Product

Introduction

This section describes how to submit a new product to the rs-ingest service using the REST interfaces.

The diagram below explains the global processing of a new product submission request by REGARDS system.
For a REGARDS client using REST interface, the main steps are:

  1. Authenticate to REGARDS in order to retrieve a valid token. See the authenticate guide.
  2. Send your product archive request containing product information to RS-INGEST microservice
  3. Retrieve information about your request status from RS-INGEST microservice.

sequence

REST API

How to

The Regards REST API concept describe how REST interfaces must be handled to submit requests.

Endpoint

EndpointVerb
/sipsPOST

Request format

To submit a SIP Collection request, refers to openAPI description without filling the ref section. The ref section is used to submit a SIP by referencing a file instead of providing SIP information in the request body.

Request body parameter is a json formated object.

{
"type": "FeatureCollection",
"metadata": {},
"features": []
}
ParameterDescription
typeEntity type, only possible value at this level is FeatureCollection
metadataContains metadata used by the service to process the SIP
featuresList of SIP to submit. You can find more information about SIP format in the REGARDS OAIS appendice.

metadata section contains :

categories
Array of strings unique
ingestChain
string

Ingest chain label to be used to process SIPs.

model
string [ 0 .. 128 ] characters

Name of the data model from rs-dam service to validate SIP. If null no validation is done.

replaceErrors
boolean

Replace error requests with same providerId.

session
string

Name of the sip submission session.

sessionOwner
string

Name of the sip submission session owner.

Array of objects (StorageDto)

Storage locations where to store files from contentInformation.

submissionDate
string <date-time>

Request submission date.

versioningMode
string
Default: "INC_VERSION"
Enum: "IGNORE" "INC_VERSION" "MANUAL" "REPLACE"

Versioning mode.

Exemple with files storage

In the following example, only one SIP RawProduct_001 is submitted.

This product contains only one file located on file system at /products/2024/data_file.raw that will be stored one Local Regards data storage. That means that the Regards system and more precisely rs-storage microservice must be able to access this file to copy it to the destination storage. Storage locations are configured in storage microservice.

{
"type": "FeatureCollection",
"metadata": {
"categories": [
"January-2024"
],
"ingestChain": "DefaultIngestChain",
"model": "DataModel01",
"session": "Submissions of 2024-08-01",
"sessionOwner": "Jean",
"storages": [
{
"pluginBusinessId": "Local",
"targetTypes": []
}
],
"submissionDate": "2024-08-01T00:15:22Z",
"versioningMode": "INC_VERSION"
},
"features": [
{
"type": "Feature",
"id": "RawProduct_001",
"bbox": [
-122.7,
45.51,
-122.64,
45.53
],
"crs": "WGS84",
"geometry": {
"coordinates": [
125.6,
10.1
],
"type": "Point"
},
"ipType": "DATA",
"properties": {
"contentInformations": [
{
"dataObject": {
"algorithm": "MD5",
"checksum": "145ff4e2fb057359fe66bd398aef3f9b",
"filename": "data_file.raw",
"locations": [
{
"url": "file:/products/2024/data_file.raw"
}
],
"regardsDataType": "RAWDATA"
},
"representationInformation": {
"syntax": {
"description": "Scientific raw data",
"mimeType": "application/octet-stream",
"name": "data_file.raw"
}
}
}
],
"descriptiveInformation": {
"mesure": "value"
},
"pdi": {}
}
}
]
}

Example with files reference

In the following example, only one SIP RawProduct_001 is submitted.

This product contains only one file located on a S3 server at https:/my.s3.server/bucket_01/data_file.raw. As the storage location of the file is provided (properties.contentInformations.dataObject.locations.storage = S3Server), Regards system will not try to store the file but only reference its given location. Nevertheless, with this system you must provide :

  • Storage location name : Should be an existing storage location defined on rs-storage microservice. If not, the file will be considered as Offline and will not be accessible for download.
  • File size in bytes : Regards will not access the file by itself so the information must be provided.
{
"type": "FeatureCollection",
"metadata": {
"categories": [
"January-2024"
],
"ingestChain": "DefaultIngestChain",
"model": "DataModel01",
"session": "Submissions of 2024-08-01",
"sessionOwner": "Jean",
"storages": [],
"submissionDate": "2024-08-01T00:15:22Z",
"versioningMode": "INC_VERSION"
},
"features": [
{
"type": "Feature",
"id": "RawProduct_001",
"bbox": [
-122.7,
45.51,
-122.64,
45.53
],
"crs": "WGS84",
"geometry": {
"coordinates": [
125.6,
10.1
],
"type": "Point"
},
"ipType": "DATA",
"properties": {
"contentInformations": [
{
"dataObject": {
"algorithm": "MD5",
"checksum": "145ff4e2fb057359fe66bd398aef3f9b",
"filename": "data_file.raw",
"fileSize": 1235689,
"locations": [
{
"storage": "S3Server",
"url": "https:/my.s3.server/bucket_01/data_file.raw"
}
],
"regardsDataType": "RAWDATA"
},
"representationInformation": {
"syntax": {
"description": "Scientific raw data",
"mimeType": "application/octet-stream",
"name": "data_file.raw"
}
}
}
],
"descriptiveInformation": {
"mesure": "value"
},
"pdi": {}
}
}
]
}

Response

Response body is a json formated object with :

object

Map of key/value where key is the SIP providerId and value is deny reason message.

object

Map of key/value where key is the SIP generated URN and value is the request correlation id.

messages
Array of strings

Global status message.

session
string

Session of the submission requests

sessionOwner
string

Owner of the submission requests session