Upload Data Model Files
This section explains how to upload your data_model YAML files and import Domain configurations, such as metadata types, characteristics, or component models into your DRIVR environment.
Download the Data Import Schema to verify that your file follows the correct format before uploading. This ensures that DRIVR can process and apply your changes successfully.
The following example demonstrates how to upload a file to the DRIVR Data Import API. In the response, you’ll receive a diff of all changes applied to your Domain, or an error message if the operation fails.
curl -X POST \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
"https://{your-domain-slug}.api.drivr.cloud/import_data" \
-F "data=@$TEST_DATA_PATH/$YAML_FILE_NAME;filename=$YAML_FILE_NAME" \
-F "vacuum=false" \
-F "execute=true"
https://{your-domain-slug}.api.drivr.cloud/import_data
vaccuum: If true, existing data in the domain is deleted before import if the data cannot be referenced in the import file.execute: If true, runs the import applying changes to the domain.
The User or MachineUser executing the import must have the appropriate permissions to create, update, or delete the entities defined in the YAML file.
You can authenticate using either a User API-Token or an OpenID Token.