Skip to main content

Getting a block model version

Get the version version_id of block model bm_id in the workspace workspace_id using the Request version metadata for a specific block model version endpoint.

Request

MethodRequest URL
GET/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/versions/{version_id}

Query parameters

Query parameterDescription
include_changesOptional. The boolean parameter include_changes is used to specify whether the object returned should be a Version or VersionWithChanges. Default value of false.

Response

On request success, the API will respond with status code 200 OK, along with either a Version or VersionWithChanges object, depending on the value provided for include_changes in the request.

Example: Get VersionWithChanges

The block model bm_id has three versions (version_id_1, version_id_2, version_id_3). version_id_1 was created when the block model was initially created, version_uuid_2 added the two columns (col_1, col_2), and version_uuid_2 renamed col_2 to au_gpt.

The block model bm_id is a regular model and has size options indicated in the example below.

bm_id size_options
{
"model_type": "regular",
"block_size": {
"x": 4.5,
"y": 5,
"z": 5
},
"n_blocks": {
"nx": 12,
"ny": 15,
"nz": 10
}
}

To get version_uuid_2 with the changes made, you may use the following request.

MethodRequest URL
GET/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/versions/{version_id_2}?include_changes=true

The request succeeds and the API responds with status code 200 OK along with the VersionWithChanges object. The changes field will contain the following.

{
"blocks_uploaded": null,
"columns": {
"deleted": [],
"new": [],
"renamed": [
{
"new_title": "au_gpt",
"old_title": "col_2"
}
],
"updated": []
},
"total_blocks": 1800,
"update_type": null
}

Since version_id_2 only renamed the column col_2, there are no entries in the lists in the subfields of columns other than renamed. blocks_uploaded is null as no file was required for the update.
total_blocks contains the product of nx, ny, nz from the size options of bm_id. The value for update_type is null as the update did not update any blocks.


© Seequent, The Bentley Subsurface Company