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>", "activity": "<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.

Collars can be selected by project and activity, by collar ids, or by an export template. Only one way is used, the first that applies: collarIds, an export template, filters, then project with activity.

Filter the collars to export​

Add filters to export only the collars that match conditions on any header field of the activity, for example holes of a given type. Every filter has a type, the field it applies to, an operator and, for most operators, values. A collar must match all the filters to be exported.

  • The field is the _id of a header field. Find it at header.sections[].fields[].field._id in the response of the activity.
  • For a list field, the values are the ids of rows of the list, found in list.rows of the same field.
  • Dates are formatted as MM/DD/YYYY. The relative date operators, such as this_year, also need timezoneoffset.

For example, to export the collars of an activity whose hole type is one of the given list rows and whose dip is between -90 and -45:

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>"],
"filters": [
{"type": "list", "field": "<hole_type_field_id>", "operator": "one_of", "values": ["<list_row_id>"]},
{"type": "numeric", "field": "<dip_field_id>", "operator": "between", "values": [-90, -45]}
]
}'

See Export in the API reference for the filter types and the operators of each type.

Filter examples​

Each example is one item of the filters list. The ids are examples, use the ids of your own header fields.

Holes of given hole types. A list filter takes the ids of the list rows:

{
"type": "list",
"field": "55ea54548283de3f546d0e33",
"operator": "one_of",
"values": ["55a6afd5811a142eddf75284"]
}

Dip between -90 and -45, a numeric filter:

{
"type": "numeric",
"field": "58b97be9ad800944a35ba624",
"operator": "between",
"values": [-90, -45]
}

Collars where a checkbox is checked. A checkbox filter takes no values:

{ "type": "checkbox", "field": "5acbb4d5ad8009223d52726d", "operator": "checked" }

Hole names that start with A1_, a text filter. The one_of operator takes a comma separated list in the first value:

{
"type": "text",
"field": "5b2c1d9ead8009223d5272a1",
"operator": "starts_with",
"values": ["A1_"]
}

Dates in 2026, a date filter with dates formatted as MM/DD/YYYY:

{
"type": "date",
"field": "5b2c1d9ead8009223d5272b2",
"operator": "between",
"values": ["01/01/2026", "12/31/2026"]
}

Dates in the current year. The relative date operators, such as this_year, need timezoneoffset in the request:

{ "type": "date", "field": "5b2c1d9ead8009223d5272b2", "operator": "this_year" }

Send several filters in the filters list to export only the collars that match all of them:

{
"project": "595e867b0dad246f56d9aa76",
"activities": ["595e851c6f23596e75685387"],
"timezoneoffset": 0,
"filters": [
{ "type": "date", "field": "5b2c1d9ead8009223d5272b2", "operator": "this_year" },
{
"type": "list",
"field": "55ea54548283de3f546d0e33",
"operator": "one_of",
"values": ["55a6afd5811a142eddf75284"]
}
]
}

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?