Skip to main content

Listing all block model versions

List all versions of the block model bm_id using the List version metadata for all versions of a block model endpoint.

Request

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

Query parameters

Query parameterDescription
filterOptional. Currently only supports the value latest, which will cause the returned list of items to only contain the latest version of the block model bm_id.
offsetOptional. Integer index of the first item to return. Default value is 0.
limitOptional. Maximum number of items to return in the list. Must be greater than 0 and less than or equal to 100. Default value is 50.

Response

On success, the API will respond with status code 200 OK and a response body containing the PaginatedResponseWithUnits[Version] object.

Response body

The PaginatedResponseWithUnits[Version] object contains the list of versions, as well as metadata pertaining to pagination.

PaginatedResponseWithUnits[Version]
{
"results": list[Version],
"count": int,
"total": int,
"limit": int,
"offset": int
}
Schema fieldDescription
resultsList of versions. Empty if no results can be returned.
countThe number of block models returned in results.
totalTotal number of versions in the full list without pagination.
limitMaximum number of items requested.
offsetIndex of the first item in results with respect to the full list without pagination.

Example: Getting the latest block model version

To get the latest version of the block model bm_id which has 15 versions, the following request may be used.

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

The request succeeds and the API responds with the HTTP status code 200 OK, along with a response body containing the following.

Response body
{
"results": list[Version],
"count": 1,
"total": 15,
"limit": 50,
"offset": 0
}

For an example of listing with pagination in BlockSync, see Listing block models example.


© Seequent, The Bentley Subsurface Company