Updating a geoscience object
Introduction
This guide will walk you through the process of updating a geoscience object in Evo.
You can update a geoscience object either by its path
or by its UUID.
Endpoints
POST /geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/{path}
POST /geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/{object_id}
These endpoints allow you to update a geoscience object. The values submitted will be validated against the specified schema properties.
Update by path
The request parameters must include the path to the geoscience object. The URL must be encoded if it contains unsafe characters.
Example request URL:
POST /geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/pointset_demo.json
Update by UUID
The request parameters must include the UUID of the geoscience object.
Example request URL:
POST /geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/355fa5a6-f37d-11ed-93c1-00155d19a71b
Request body
The request body must be a JSON object containing the properties of the geoscience object to be updated.
Example request body that is updating a pointset
object:
{
"schema": "/objects/pointset/1.0.0/pointset.schema.json",
"uuid": "9fd1cb16-ac0b-40a6-b9ee-89a5d702bce0",
"name": "Updated example pointset.",
"description": "This is an updated 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"
}
}
Response
The response will be a JSON object containing the properties of the updated geoscience object along with a newly assigned object ID.
Example:
{
"object_path": "pointset_lm_demo.json",
"object_id": "9fd1cb16-ac0b-40a6-b9ee-89a5d702bce0",
"object": {
"schema": "/objects/pointset/1.0.0/pointset.schema.json",
"uuid": "9fd1cb16-ac0b-40a6-b9ee-89a5d702bce0",
"name": "Updated example pointset.",
"description": "This is an updated 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"
}
},
"version_id": "1720050462228330272",
"created_at": "2024-07-03T23:47:42Z",
"created_by": {
"id": "19e415c0-d8b8-4d19-bbde-f86e3c74d9cd",
"name": "Example User",
"email": "example.user@example.com"
},
"etag": "6fc4aec0b16857f0fe456163de9b6ecfd6906700",
"geojson_bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
171.65072,
-44.54938
],
[
173.7175,
-44.54938
],
[
173.7175,
-42.98657
]
]
]
},
"links": {
"download": "https://<host>/<download_url_details>",
"data": [
{
"id": "81048210-978e-4b8e-9e37-60b1bdf22a62",
"name": "35b8b8ba5479a34e905a1b9e212e1cb4a52ec484b969359f2c28f5a00311dbca",
"download_url": "https://<host>/<remaining_download_url_details>"
}
]
}
}
This response example reflects the properties of the updated geoscience object.
Summary
- Prepare the properties of the geoscience object you want to update.
- Make a POST request with the properties in the request body.
- The response will include the properties of the updated geoscience object along with a newly assigned object ID. This can be used for future requests to update the object.