Working with MX Deposit data
MX Deposit is a cloud-based database for collecting, managing, and sharing drillhole and point-sample data within comprehensive drilling and mining workflows. This guide explains how MX Deposit data is organised and how to put the API to work, for example to read your drillhole data or to export it.
The API reference describes every endpoint in detail. It also covers the data hierarchy of projects, activities and drillholes/point samples, and how to authenticate.
Find the data you need
Work down the hierarchy, taking the ids from each response.
| Step | You have | Read | You get |
|---|---|---|---|
| 1 | Your credentials | Projects | The ids of your projects and their activities. |
| 2 | A project and an activity | Activities | The definition of the activity, with its table views. |
| 3 | A project and an activity | Collars | The collars of the activity. |
| 4 | A collar and a table view | Row references | The rows of the table view for the collar. |
Keep rows up to date
To avoid reading every row again, send the optional after parameter, an epoch timestamp in milliseconds, when you read
the rows of a table view. Only the rows created or updated after that time are returned.
Export your data
Collar exports run as jobs, so the request returns before the file exists:
- Start the export. The response describes the export job.
- Check the status of the export until its
stateisdone. - Download the file from the
urlin the status response.
For example, to export the collars of an activity. The examples use an API key, see authenticate for the other methods.
The operation_uid is in parameters.body of the job in the response. Use it to check the status:
The state is started, Exporting followed by the progress, or done. When it is done, the response contains the
url of the exported file.
Collar exports can select collars by project and activities, by collar ids, or by an export template.
Lab certificate result information is exported with a single request. It returns when the file is ready, with the url
of the exported file. Send an export_uid of your choice if you want to check its progress meanwhile, and use it in
place of the operation_uid to check the status. See Export in the API reference.
Good to know
- The activity and collar endpoints accept an
API-Versionheader. It changes the shape of some responses, for example how the assigned user and the file summaries are returned. - Requests that are not valid are answered with status 400 and a JSON body with an
errormessage.