Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Preview import results without persisting data

Executes a dry-run to preview exactly what will happen when the import is executed, without making any changes to the database.

What this does: The dry-run performs a complete simulation of the import process:

  • Validates all field mappings and data types
  • Processes every row in the CSV file
  • Attempts to find existing records using lookup fields
  • Determines which entities will be created, updated, or skipped
  • Identifies validation errors and data quality issues
  • Returns detailed results for each entity type
  • Does NOT persist any data - completely safe to run multiple times

Why use dry-run?

  • Verify mappings: Ensure CSV columns are correctly mapped to entity fields
  • Check data quality: Identify rows with missing required fields, invalid values, or format issues
  • Estimate impact: See how many records will be created vs updated before execution
  • Debug issues: Get detailed error messages explaining why certain rows will be skipped
  • Validate lookup fields: Confirm that custom lookup fields correctly identify existing records

What is returned:

  • Summary Statistics: Total rows, counts of entities that will be created/updated/skipped, error count
  • Detailed Results: For each mapping type (Employee, Project, etc.), lists of:
    • toCreate: New entities that will be created
    • toUpdate: Existing entities that will be updated (with old and new values)
    • ignored: Rows that will be skipped (with reasons)
  • Error Details: List of all rows with errors, including row index, data, and error message

Best Practice: Always run a dry-run after configuring mappings and before executing the import. This helps you:

  1. Catch mapping errors early
  2. Fix data quality issues in your CSV
  3. Understand the import impact
  4. Avoid accidentally creating duplicates or updating wrong records
POST/imports-management/{importId}/dry-run
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
importIdstringrequired
Unique identifier of the import
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Responses
200Dry-run completed successfully
dryRunbooleanrequired
Always true for dry-run operations. Indicates this is a preview simulation, not an actual execution.
errorsany[]required
List of all rows that will be skipped due to errors, including row index, the data from that row, and the specific error message explaining why it will be skipped. Use this to identify and fix data quality issues before execution.
mappingsany[]required
Detailed results for each entity type mapping. Each result includes lists of entities that will be created (toCreate), updated (toUpdate with old/new values), and skipped (ignored with reasons). Use this to understand exactly what will happen for each entity type.
summaryobjectrequired
Summary statistics aggregating results across all mappings. Provides quick overview of total rows, create/update/skip counts, and error count.
Show properties
errorsnumberrequired
Number of rows that have validation errors. These are included in willSkip but counted separately to highlight data quality issues. Check the errors array for detailed error messages.
totalRowsnumberrequired
Total number of rows that were processed during the dry-run or execution
willCreatenumberrequired
Number of new entities that will be created (for dry-run) or were created (for execution). These are rows where no matching existing record was found using the lookup fields.
willSkipnumberrequired
Number of rows that will be skipped (for dry-run) or were skipped (for execution). These rows had validation errors, missing required fields, or other issues that prevented processing.
willUpdatenumberrequired
Number of existing entities that will be updated (for dry-run) or were updated (for execution). These are rows where a matching existing record was found using the lookup fields.
400Import has no mappings or invalid state
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Import not found
Request
curl -X POST "https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364/dry-run" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "dryRun": true,
  "errors": [
    null
  ],
  "mappings": [
    null
  ],
  "summary": {
    "errors": 5,
    "totalRows": 150,
    "willCreate": 100,
    "willSkip": 10,
    "willUpdate": 40
  }
}