Skip to main content

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.

StepYou haveReadYou get
1Your credentialsProjectsThe ids of your projects and their activities.
2A project and an activityActivitiesThe definition of the activity, with its table views.
3A project and an activityCollarsThe collars of the activity.
4A collar and a table viewRow referencesThe 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:

  1. Start the export. The response describes the export job.
  2. Check the status of the export until its state is done.
  3. Download the file from the url in the status response.

For example, to export the collars of an activity. The examples use an API key, see authenticate for the other methods.

curl -X POST 'https://app.mxdeposit.net/api/v3/collars/export/' \
-H 'Authorization: <api_key>' \
-H 'Client-ID: <client_id>' \
-H 'Content-Type: application/json' \
-d '{"project": "<project_id>", "activities": ["<activity_id>"]}'

The operation_uid is in parameters.body of the job in the response. Use it to check the status:

curl 'https://app.mxdeposit.net/export-status/<operation_uid>' \
-H 'Authorization: <api_key>' \
-H 'Client-ID: <client_id>'

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-Version header. 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 error message.

Was this page helpful?