Reports
Endpoints for reporting against block models
List Report Specifications for a block model
Block Model API
Gets all Report Specifications for the block model bm_id.
The list is ordered alphabetically in ascending order.
This endpoint is paginated, therefore by default this lists, at most, the first 50 items. To get other items, use
the offset and limit query parameters to select the desired part of the list.
An offset beyond the total number of Report Specifications for the block model will result in an empty results list.
The limit must be an integer from 1 to 100.
The response includes total, which is the total number of items within the list.
All workspace roles can use this endpoint.
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"count": 0,
"limit": 0,
"offset": 0,
"referenced_units": [
{
"conversion_factor": 0,
"description": "string",
"symbol": "string",
"unit_id": "string",
"unit_type": "LENGTH"
}
],
"results": [
{
"autorun": true,
"bbox": {
"i_minmax": {
"max": 0,
"min": 0
},
"j_minmax": {
"max": 0,
"min": 0
},
"k_minmax": {
"max": 0,
"min": 0
}
},
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"values": [
"string"
]
}
],
"columns": [
{
"aggregation": "SUM",
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"output_unit_id": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cutoff_values": [
0
],
"density_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"density_unit_id": "string",
"density_value": 0,
"description": "string",
"last_result_created_at": "2024-07-29T15:51:28.071Z",
"last_result_version_id": 0,
"mass_unit_id": "string",
"name": "string",
"negative_values_policy": "USE",
"null_values_policy": "ZERO",
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revision": 0
}
],
"total": 0
}
Create a Report Specification
Block Model API
Create a new Report Specification for the block model.
The Report Specification defines the columns and categories that will be used to generate reports for the block model.
The cut-off columns are used to determine whether a block is included in the report. A list of values can be provided in cut_off_values,
each of which will be calculated as a sub-report.
To calculate column totals, density information is derived from either the block model data in the column indicated by
density_col_id, or if density_col_id is unset or contains null values, the density_value is used.
Parameters
{
"autorun": true,
"bbox": {
"i_minmax": {
"max": 0,
"min": 0
},
"j_minmax": {
"max": 0,
"min": 0
},
"k_minmax": {
"max": 0,
"min": 0
}
},
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"values": [
"string"
]
}
],
"columns": [
{
"aggregation": "SUM",
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"output_unit_id": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cutoff_values": [
0
],
"density_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"density_unit_id": "string",
"density_value": 0,
"description": "string",
"mass_unit_id": "string",
"name": "string",
"negative_values_policy": "USE",
"null_values_policy": "ZERO"
}
Returns
201
Successful Response
Endpoint
Request
curl -X POST 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"autorun": true,
"bbox": {
"i_minmax": {
"max": 0,
"min": 0
},
"j_minmax": {
"max": 0,
"min": 0
},
"k_minmax": {
"max": 0,
"min": 0
}
},
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"values": [
"string"
]
}
],
"columns": [
{
"aggregation": "SUM",
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"output_unit_id": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cutoff_values": [
0
],
"density_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"density_unit_id": "string",
"density_value": 0,
"description": "string",
"job_url": "https://example.com",
"mass_unit_id": "string",
"name": "string",
"negative_values_policy": "USE",
"null_values_policy": "ZERO",
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revision": 0
}
Get a Report Specification
Block Model API
Get an individual Report Specification
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications/{rs_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"autorun": true,
"bbox": {
"i_minmax": {
"max": 0,
"min": 0
},
"j_minmax": {
"max": 0,
"min": 0
},
"k_minmax": {
"max": 0,
"min": 0
}
},
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"values": [
"string"
]
}
],
"columns": [
{
"aggregation": "SUM",
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"output_unit_id": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cutoff_values": [
0
],
"density_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"density_unit_id": "string",
"density_value": 0,
"description": "string",
"last_result_created_at": "2024-07-29T15:51:28.071Z",
"last_result_version_id": 0,
"mass_unit_id": "string",
"name": "string",
"negative_values_policy": "USE",
"null_values_policy": "ZERO",
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revision": 0
}
Update a Report Specification
Block Model API
Update a Report Specification for the block model.
Changes to any properties other than name, description, and autorun will incrememnt the revision number on the Report
Specification, as results based on older revisions may no longer be comparable.
Parameters
{
"autorun": true,
"bbox": {
"i_minmax": {
"max": 0,
"min": 0
},
"j_minmax": {
"max": 0,
"min": 0
},
"k_minmax": {
"max": 0,
"min": 0
}
},
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"values": [
"string"
]
}
],
"columns": [
{
"aggregation": "SUM",
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"output_unit_id": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cutoff_values": [
0
],
"density_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"density_unit_id": "string",
"density_value": 0,
"description": "string",
"mass_unit_id": "string",
"name": "string",
"negative_values_policy": "USE",
"null_values_policy": "ZERO"
}
Returns
200
Successful Response
Endpoint
Request
curl -X PATCH 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications/{rs_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"autorun": true,
"bbox": {
"i_minmax": {
"max": 0,
"min": 0
},
"j_minmax": {
"max": 0,
"min": 0
},
"k_minmax": {
"max": 0,
"min": 0
}
},
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"values": [
"string"
]
}
],
"columns": [
{
"aggregation": "SUM",
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"output_unit_id": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cutoff_values": [
0
],
"density_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"density_unit_id": "string",
"density_value": 0,
"description": "string",
"job_url": "https://example.com",
"mass_unit_id": "string",
"name": "string",
"negative_values_policy": "USE",
"null_values_policy": "ZERO",
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revision": 0
}
Get a Report Result
Block Model API
Get a Report Result
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications/{rs_id}/results/{report_result_uuid}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"referenced_columns": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"data_type": "string",
"title": "string",
"unit_id": "string",
"unit_id_from_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"report_result_created_at": "2024-07-29T15:51:28.071Z",
"report_result_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"report_specification_description": "string",
"report_specification_name": "string",
"report_specification_revision": 0,
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result_sets": [
{
"cutoff_value": 0,
"rows": [
{
"categories": [
"string",
0,
0,
true,
null
],
"values": [
0,
0
]
}
]
}
],
"value_columns": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"unit_id": "string"
}
],
"version_comment": "string",
"version_created_at": "2024-07-29T15:51:28.071Z",
"version_created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"version_id": 0,
"version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"warnings": [
{
"message": "string",
"occurrences": 0,
"warning_type": "INVALID_DENSITY_VALUE"
}
]
}
List Report Results for a Report Specification
Block Model API
Gets all Report Results for a Report Specification identified by rs_id.
The list is ordered from the most recently created to the least recently created Report Result.
This endpoint is paginated, therefore by default this lists, at most, the first 50 items. To get other items, use
the offset and limit query parameters to select the desired part of the list.
An offset beyond the total number of Report Results for the Report Specification will result in an empty results list.
The limit must be an integer from 1 to 100.
The response includes total, which is the total number of items within the list.
All workspace roles can use this endpoint.
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications/{rs_id}/results' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"count": 0,
"limit": 0,
"offset": 0,
"results": [
{
"report_result_created_at": "2024-07-29T15:51:28.071Z",
"report_result_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_created_at": "2024-07-29T15:51:28.071Z",
"version_created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"version_id": 0,
"version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"total": 0
}
Run a Reporting Job
Block Model API
Run a new Reporting Job.
The Reporting Job will generate a Report Result for the provided block model version using the latest revision of the Report Specification.
Parameters
{
"version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Returns
200
OK
Endpoint
Request
curl -X POST 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications/{rs_id}/jobs' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"job_url": "https://example.com",
"job_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": 0,
"version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Get a comparison between two Report Results
Block Model API
Get a comparison of two Report Results for a Report Specification
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications/{rs_id}/comparisons' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"categories": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string"
}
],
"cutoff_col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"from_result": {
"referenced_columns": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"data_type": "string",
"title": "string",
"unit_id": "string",
"unit_id_from_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"report_result_created_at": "2024-07-29T15:51:28.071Z",
"report_result_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_comment": "string",
"version_created_at": "2024-07-29T15:51:28.071Z",
"version_created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"version_id": 0,
"version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"report_specification_description": "string",
"report_specification_name": "string",
"report_specification_revision": 0,
"report_specification_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result_sets": [
{
"cutoff_value": 0,
"rows": [
{
"categories": [
"string",
0,
0,
true,
null
],
"values": [
{
"difference": 0,
"from_value": 0,
"percent": 0,
"to_value": 0
}
]
}
]
}
],
"to_result": {
"referenced_columns": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"data_type": "string",
"title": "string",
"unit_id": "string",
"unit_id_from_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"report_result_created_at": "2024-07-29T15:51:28.071Z",
"report_result_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_comment": "string",
"version_created_at": "2024-07-29T15:51:28.071Z",
"version_created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"version_id": 0,
"version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"value_columns": [
{
"col_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"label": "string",
"unit_id": "string"
}
],
"warnings": {
"comparison": [
{
"message": "string",
"occurrences": 0,
"warning_type": "INVALID_DENSITY_VALUE"
}
],
"from_result": [
{
"message": "string",
"occurrences": 0,
"warning_type": "INVALID_DENSITY_VALUE"
}
],
"to_result": [
{
"message": "string",
"occurrences": 0,
"warning_type": "INVALID_DENSITY_VALUE"
}
]
}
}
Run a Report Comparison Job
Block Model API
Request a Report Comparison between two versions.
This will either create a new comparison job, or return Report Result IDs for existing report results if both are already available.
Parameters
{
"from_version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"to_version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Returns
200
OK
Endpoint
Request
curl -X POST 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/report-specifications/{rs_id}/comparisons' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"from_result_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"job_url": "https://example.com",
"to_result_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}