---
title: "POST /jobs/imports/{id}/cancel"
method: POST
path: "/jobs/imports/{id}/cancel"
tags: ["Jobs"]
---

# POST /jobs/imports/{id}/cancel

`POST /jobs/imports/{id}/cancel`

## Request

- Base URL: `https://digitaltwins-hostname`
- URL: `https://digitaltwins-hostname/jobs/imports/{id}/cancel`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`

Cancels an import job that is currently running. Service will stop any import operations triggered by the current import job that are in progress, and go to a cancelled state. Please note that this will leave your instance in an unknown state as there won't be any rollback operation. 
Status codes:
* 200 Request Accepted
* 400 Bad Request
  * ValidationFailed - The import job request is not valid.

## Path parameters

- `id` string, required

## Query parameters

- `api-version` string, required

## Headers

- `traceparent` string
- `tracestate` string

## Response `200`

Success

- ImportJob: A job which contains a reference to the operations to perform, results, and execution metadata.
  - `id` string: The identifier of the import job.
  - `inputBlobUri` string, required: The path to the input Azure storage blob that contains file(s) describing the operations to perform in the job.
  - `outputBlobUri` string, required: The path to the output Azure storage blob that will contain the errors and progress logs of import job.
  - `status` 'notstarted' | 'running' | 'failed' | 'succeeded' | 'cancelling' | 'cancelled': Status of the job.
  - `createdDateTime` string, date-time: Start time of the job. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.
  - `lastActionDateTime` string, date-time: Last time service performed any action from the job. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.
  - `finishedDateTime` string, date-time: End time of the job. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.
  - `purgeDateTime` string, date-time: Time at which job will be purged by the service from the system. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.
  - `error` Error: Error definition.
    - `code` string: Service specific error code which serves as the substatus for the HTTP error code.
    - `message` string: A human-readable representation of the error.
    - `details` Error[]: Internal error details.
    - `innererror` InnerError: A more specific error description than was provided by the containing error.
      - `code` string: A more specific error code than was provided by the containing error.
      - `innererror` InnerError (recursive)

## Other responses

- `default`: Default response.

## Changes

- **2026-07-13** (2020-05-31-preview) `83f84c8a4aa9`: 1 info
  - endpoint added
- **2026-07-13** (2020-05-31-preview) `f38ce738ada5`: 2 info
  - api tag `Jobs` added
  - api tag `ImportJobs` removed

[Operation history](https://skmtc.dev/azure/apis/digitaltwins-digitaltwins/changes/jobs/imports/:id/cancel/post.md)

---

[API](https://skmtc.dev/azure/apis/digitaltwins-digitaltwins.md) - [All operations](https://skmtc.dev/azure/apis/digitaltwins-digitaltwins/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/digitaltwins-digitaltwins/revisions/8d81dcdaf9a2?raw)
