Geostatistics tasks
This is a collection of geostatistics functions you can run on the cloud. They read geoscience objects. They write geoscience objects and files.
How do you run a geostatistics compute task?
It takes three steps to run a task.
- Start the task.
- Wait for it to finish.
- Get the result.
You can use the Task API for each step.
How do you start a task?
You can start a task by sending a POST
request to the Task API.
POST https://{hub}.api.seequent.com/compute/orgs/{org_id}/geostat/{task}
That URL has three placeholders you need to fill in.
- Replace
{hub}
with the hub code for the hub you are using. - Replace
{org_id}
with the UUID for your organization. - Replace
{task}
with the name of the task you want to use.
Send a request body that has a parameter
field with your task parameters. The parameters are different for each task.
{
"parameters": {
...
}
}
How do you know when the task is done?
When you start the task, the Task API will respond with HTTP code 303 and a header called Location
. The value inside the Location
header is a status endpoint you can use to check the status of your job. You can send GET
requests to that endpoint over and over until it says your job is done.
How do you get the results?
When your task is done, the status endpoint response has a result link in the links
section. Make a GET
request to the result link, and it tells you what geoscience objects and files were created or modified by the task.
{
"message": "Your task is done!",
"object_modified": {
...
}
}
Geoscience objects
Usually, geostatistics compute tasks read some data from one or more geoscience objects. They usually write some data to a geoscience object, too. Since they work with geoscience objects so much, there are special parameter formats that you can use to tell the task what objects you want to use.
Geoscience object references
A geoscience object reference is a URL for a geoscience object. You can either use URLs with the object's path or its ID.
// A path-based URL
"https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/{path}"
// An ID-based URL
"https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/{object_id}"
Geoscience object attribute references
A geoscience object attribute reference lets you point to a specific attribute inside a geoscience object. It uses a language called JMESPath to tell the task where to look for the attribute inside the object.
// This points to an attribute called "my-attribute" inside a pointset object.
"locations.attributes[?name=='my-attribute']"
Geoscience object targets
A geoscience object target lets you tell the task how to save results to a geoscience object. It has four fields.
reference
(string)- The geoscience object reference that points to the object where you want to save results.
overwrite
(boolean, optional)- If this is
true
, the task will overwrite the object atreference
if it already exists. If this isfalse
, the task will fail if the object already exists. Defaults tofalse
.
- If this is
description
(string, optional)- A description for the object. If the object already exists and you include this field, the task will update the object's description. If you don't include this field, the task will leave the object's description unchanged. If it's a brand new object, the task will create it with this description.
tags
(object, optional)- Tags to add to the object. If the object already exists and you include this field, the task will add these tags to the object's existing tags. If you don't include this field, the task will leave the object's tags unchanged. If it's a brand new object, the task will create it with these tags.
{
"reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/{path}",
"overwrite": true,
"description": "A description",
"tags": {
"Tag": "value"
}
}
Geoscience object attribute targets
A geoscience object attribute target lets you tell the task how to create or update an attribute inside a geoscience object. There are two versions: one for creating a new attribute, and one for updating an attribute that already exists.
- To create a new attribute, use the "create" operation and give the new attribute a name.
{
"operation": "create",
"name": "my-new-attribute"
}
- To update an existing attribute, use the "update" operation and give a geoscience object attribute reference that points to the attribute you want to update.
{
"operation": "update",
"reference": "locations.attributes[?name=='my-attribute-that-already-exists']"
}
Legacy geoscience object references
Older geostatistics compute tasks use a slightly different format for geoscience object references. It looks like this.
{
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/{path}"
}
These references can point to specific parts of an object, too.
{
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/{path}"
"object_element": [
"type": "element",
"path": "/attributes/@name=my-attribute"
]
}
That reference points specifically to an attribute called "my-attribute" inside the object.