Skip to main content

Uploading geoscience data

Introduction

If a Geoscience Object has one or more data references, the data must be uploaded to the workspace before the object is uploaded. This guide will walk you through the process of uploading data to Evo.

Endpoint

This endpoint allows you to provide the names for the data you intend to upload and receive upload URLs for those data references that have not already been uploaded. This data name must be a valid SHA256 hash or UUID. Calculating the SHA256 hash is recommended as it avoids re-uploading duplicate data.

Each upload URL is pre-signed with an authorization token and is valid for a limited time(30 minutes). If a URL has expired before the data upload is complete, simply repeat this request to obtain a new URL. Clients can use the new URL to continue uploading where they left off. Multiple data names can be provided, with an upload URL generated for each data digest individually (up to a maximum of 10).

Request body

The request body must be a JSON array containing objects. Each object should have a name property, which should be the SHA256 digest or UUID of the data file to be uploaded.

Example:

[
{
"name": "22f97e9a-22c1-11ef-b851-00155d18c5d4"
},
{
"name": "1d264de18d43ebeacc3592f072020e36236d14a727197e7e8d3508d785583319"
}
]

Definitions of payload fields:

name (Required)

The name field specifies the SHA256 digest or UUID of the data file to be uploaded

Response

The response will be a JSON array containing objects. Each object will have a name property (the same as in the request), and an upload_url property, which is the URL to which the data file should be uploaded.

Example:

[
{
"name": "22f97e9a-22c1-11ef-b851-00155d18c5d4",
"upload_url": "<upload host>/<org_uuid>/<file_hash>"
},
{
"name": "1d264de18d43ebeacc3592f072020e36236d14a727197e7e8d3508d785583319",
"upload_url": "<upload host>/<org_uuid>/<file_hash>"
}
]

Response fields

name

The name field specifies the SHA256 digest or UUID of the data file.

upload_url

The upload_url field specifies the URL to which the data file should be uploaded.

Steps to upload data

  1. Calculate the SHA256 digest or get the UUID of the data file(s) you want to upload.
  2. Make a PUT request to the /data endpoint with the SHA256 digest or UUID in the request body.
  3. In the response, you will receive an upload URL for each data file.
  4. Upload each data file to the corresponding upload URL. If a URL has expired before the data upload is complete, repeat the PUT request to obtain a new URL and continue uploading where you left off.

With the data uploaded, you can now proceed to upload the pointset object metadata.

Example pointset metadata:

{
"schema": "/objects/pointset/1.0.1/pointset.schema.json",
"uuid": null,
"name": "Example pointset.",
"description": "This is an example of a pointset Geoscience object.",
"locations": {
"coordinates": {
"width": 3,
"data_type": "float64",
"length": 50,
"data": "35b8b8ba5479a34e905a1b9e212e1cb4a52ec484b969359f2c28f5a00311dbca"
}
},
"bounding_box": {
"min_y": -5550857.067070156,
"max_y": -5309927.430829638,
"min_x": 19108070.856018253,
"max_x": 19338143.530560993,
"min_z": 0,
"max_z": 0
},
"coordinate_reference_system": {
"epsg_code": 3857
},
"tags": {
"location": "location"
}
}

© Seequent, The Bentley Subsurface Company