# Cancel an import

Administrators only. An import that has not started is closed at once and its file deleted. One that is running is asked to stop (`cancelRequested`) and does so within a few rows, leaving what it has already written: a later import of the same file finishes the rest without duplicating anything. One that has finished is a 409 `already_finished`. The action is recorded on the security log.

Canonical: https://easerix.com/docs/developers/api/tasks/imports/cancelImport

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="tasks" operations={[{"path":"/v1/imports/{id}/cancel","method":"post"}]} />
    </>
  );
}
