Skip to main content

Export

Export collar data and lab certificate result information, and check the status of the export.


Export​

MX Deposit API

Version: 0.1.0

Starts an export of collar data and returns the export job. Use the operation_uid of the job to check the status of the export and to download the zip file that contains the exported data files.

The collars to export are selected with the project and an activity, as in the example. They can also be selected with a list of collar ids:

{
"project": "595e867b0dad246f56d9aa76",
"collarIds": [
"5c79528b56c2447590a2e34a",
"5c79528b56c2447590a2e347"
]
}

or with an export template:

{
"project": "595e867b0dad246f56d9aa76",
"template_code": "Filtered Export"
}

Only one way of selecting the collars is used, the first that applies: collarIds, an export template, filters, then project with activity. filters and activities also apply with an export template.

Add filters to export only the collars that match conditions on header fields. For examples, see Filter the collars to export in the guide.

Servers
https://app.mxdeposit.net

Parameters

Your credentials. Use the API key (legacy), or Bearer followed by a Bentley IMS access token.

Client ID, required only when authenticating with an API key.

ID of the project.

ID of the activity. Only used when the collars are selected with the project alone. Ignored when collarIds, template_id, template_code or filters is sent.

IDs of the activities. Required when filters is sent. With an export template, only the activities in this list are exported. Ignored when collarIds is sent, and when only the project is sent.

Filters on the header fields of the collars. Any header field of the activities can be used. Only the collars that match all the filters are exported. A filter that is not valid is ignored. Send the project and activities with the filters. The field of a filter is the _id of a header field, found at header.sections[].fields[].field._id in the response of the activity endpoint. For an example of each filter type, see Filter examples in the guide.

Type of the header field.

Identifier, a 24-character hexadecimal string.

How the values are compared with the field.

The values to compare with. between takes two values. one_of on a list takes the ids of the list rows, found in list.rows of the field in the activity response. Dates are formatted as MM/DD/YYYY. The relative date operators, has_values, empty, checked, not_checked, has_files and no_files take no values.

Time zone offset in minutes. Required by the relative date operators of filters, such as this_year.

IDs of the collars to export.

Code of the export template.

Identifier, a 24-character hexadecimal string.

The file types to export. Defaults to csv.

Unique id of the export. Generated when it is not sent.

Used in the name of the job. Defaults to export.

include_validation_errorsboolean

{
"project": "595e867b0dad246f56d9aa76",
"activity": "595e851c6f23596e75685387"
}

Returns

200

OK

Identifier, a 24-character hexadecimal string.

Name of the job.

Type of the job, Export for an export.

privacy"Private"

Where the job runs.

The request that the job runs.

methodstring
urlstring

The export request, with the fields that identify the job.

is_jobboolean
operation_uidstring
destinationstring[]

Status of the job when it is created.

progress_percentageinteger
errorstring
logstring[]
subscribersarray

Identifier, a 24-character hexadecimal string.

Only for jobs that run in batch.

Creation time, as an object holding the number of milliseconds since the Unix epoch.

$dateint64

Last update time, as an object holding the number of milliseconds since the Unix epoch.

$dateint64

Endpoint

POST
/api/v3/collars/export/

Request

curl -X POST 'https://app.mxdeposit.net/api/v3/collars/export/' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"project": "595e867b0dad246f56d9aa76",
"activity": "595e851c6f23596e75685387"
}'

Response

{
"jobs": [
{
"_id": "string",
"name": "string",
"type": "string",
"privacy": "Private",
"destination": "batch",
"parameters": {
"method": "string",
"url": "string",
"body": {
"is_job": true,
"operation_uid": "string",
"destination": [
"string"
],
"additionalProp1": "string",
"additionalProp2": "number",
"additionalProp3": "boolean"
}
},
"status": "Submitted",
"progress_percentage": 0,
"error": "string",
"log": [
"string"
],
"subscribers": [
null
],
"owner": "string",
"batch_info": {
"additionalProp1": "string",
"additionalProp2": "number",
"additionalProp3": "boolean"
},
"_created_at": {
"$date": 0
},
"_updated_at": {
"$date": 0
}
}
]
}

Check the status and download the exported file​

MX Deposit API

Version: 0.1.0

Returns the status of an export. Once the export is done, the response contains the URL to download the exported file. Use the operation_uid returned by the collar export endpoint, or the export_uid that was sent as part of the body of the lab certificate result export endpoint. The _id of the export is also accepted.

Servers
https://app.mxdeposit.net

Parameters

Your credentials. Use the API key (legacy), or Bearer followed by a Bentley IMS access token.

Client ID, required only when authenticating with an API key.

Operation uid of the job (or the export_uid of the lab certificate result export).

Returns

200

Contains the status of the export. state can be started, Exporting, or done. Contains an error instead when the uid is not valid.

Identifier, a 24-character hexadecimal string.

The operation_uid of the export.

Returned instead of the status when the uid is not valid.

State of the job. started, Exporting followed by the progress, or done.

Time of the last state change, formatted as MM/DD/YYYY, HH:MM:SS.

URL to download the exported file. Only present when the state is done.

Endpoint

GET
/export-status/{operation_uid}

Request

curl -X GET 'https://app.mxdeposit.net/export-status/{operation_uid}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'

Response

{
"_id": "string",
"error": "string",
"state": "string",
"time": "string",
"url": "string"
}

Export Lab Certificate Result Information​

MX Deposit API

Version: 0.1.0

Exports Lab Certificate Result Information data to a CSV file in a zip file. The request returns when the export is complete, with the URL to download the file. While it runs, its status can be checked with the export status endpoint, using the export_uid.

Servers
https://app.mxdeposit.net

Parameters

Your credentials. Use the API key (legacy), or Bearer followed by a Bentley IMS access token.

Client ID, required only when authenticating with an API key.

ID of the project.

ID of the activity.

Optional. Only the results where is_last has this value are exported.

Optional. Unique id of the export, used to check its status.

Optional, inclusive. Formatted as MM/DD/YYYY or MM/DD/YYYY HH:MM:SS. A value in another format is ignored.

Optional, exclusive. Formatted as MM/DD/YYYY or MM/DD/YYYY HH:MM:SS. A value in another format is ignored.

Optional. Encoding of the CSV file. Defaults to utf-8.

{
"project": "595e867b0dad246f56d9aa76",
"activity": "595e851c6f23596e75685387",
"is_last": true,
"export_uid": "65bab6f010adf2beaacbfe76",
"imported_date_time_from": "01/11/2018 18:13:44",
"imported_date_time_to": "02/16/2023 12:00:00"
}

Returns

200

OK

URL to download the exported file.

Endpoint

POST
/api/v1/LabCertResultsView/export

Request

curl -X POST 'https://app.mxdeposit.net/api/v1/LabCertResultsView/export' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"project": "595e867b0dad246f56d9aa76",
"activity": "595e851c6f23596e75685387",
"is_last": true,
"export_uid": "65bab6f010adf2beaacbfe76",
"imported_date_time_from": "01/11/2018 18:13:44",
"imported_date_time_to": "02/16/2023 12:00:00"
}'

Response

{
"url": "https://mxdeposit-export.amazonaws.com/3dc33bc4-8469-45e4-a2"
}

Was this page helpful?