Skip to main content
If you need to abort an asynchronous compliance job that is currently in progress — for example, because you submitted incorrect polygon data, the wrong batch ID, or you need to cancel a DDS generation before it reaches the TRACES NT submission queue — you can halt it using this endpoint. Calling this endpoint sends an immediate stop signal to the processing thread, preventing further satellite analysis, Hedera anchoring, or certificate generation. Jobs that have already reached the ANCHORING or later phases may not be stoppable due to the immutable nature of Hedera consensus operations. You should check the job status after calling this endpoint to confirm the job has moved to a terminal state.

Endpoint

DELETE /api/v1/enterprise/eudr/jobs/{jobId}

Path Parameters

jobId
string
required
The unique identifier of the asynchronous job you want to halt. This is the jobId returned by the 202 Accepted response from the ingestion endpoint. Example: job_998877

Response Fields

A successful halt request returns an HTTP 200 OK status confirming the stop signal has been issued to the processing thread. The job status will transition to FAILED shortly after, which you can confirm by polling the Get Job Status endpoint.

Error Responses

StatusCodeDescription
401UNAUTHORIZEDMissing or invalid X-API-Key
403FORBIDDENYour API key does not have job management permissions
404NOT_FOUNDNo job found for the provided jobId
409CONFLICTThe job has already reached a terminal state (COMPLETED or FAILED) and cannot be halted
423LOCKEDThe job is in a phase that cannot be interrupted (e.g., mid-Hedera consensus transaction) — wait and retry
import agribackup
from agribackup.rest import ApiException
import time

configuration = agribackup.Configuration(host="https://live.agribackup.com/api/v1")
configuration.api_key['ApiKeyAuth'] = 'sk_live_YOUR_API_KEY'

JOB_ID = "job_998877"

with agribackup.ApiClient(configuration) as api_client:
    api_instance = agribackup.EnterpriseJobsApi(api_client)
    try:
        api_instance.halt_job(job_id=JOB_ID)
        print(f"Halt signal issued for job {JOB_ID}. Polling for terminal state...")

        # Poll to confirm the job has stopped
        for _ in range(10):
            time.sleep(2)
            status = api_instance.get_job_status(job_id=JOB_ID)
            print(f"Current phase: {status.phase}")
            if status.phase in ("COMPLETED", "FAILED"):
                print(f"Job reached terminal state: {status.phase}")
                break
    except ApiException as e:
        print("Exception when calling halt_job: %s\n" % e)
import { AgriBackupClient } from '@agribackup/sdk';

const client = new AgriBackupClient({
  apiKey: 'sk_live_YOUR_API_KEY',
  baseUrl: 'https://live.agribackup.com/api/v1'
});

async function haltJob(jobId) {
  try {
    await client.jobs.haltJob({ jobId });
    console.log(`Halt signal issued for job ${jobId}. Polling for terminal state...`);

    // Poll to confirm the job has stopped
    for (let i = 0; i < 10; i++) {
      await new Promise(resolve => setTimeout(resolve, 2000));
      const status = await client.jobs.getJobStatus({ jobId });
      console.log(`Current phase: ${status.phase}`);
      if (['COMPLETED', 'FAILED'].includes(status.phase)) {
        console.log(`Job reached terminal state: ${status.phase}`);
        break;
      }
    }
  } catch (error) {
    console.error('Error halting job:', error);
  }
}

haltJob('job_998877');
curl --request DELETE \
  --url https://live.agribackup.com/api/v1/enterprise/eudr/jobs/job_998877 \
  --header 'X-API-Key: sk_live_YOUR_API_KEY'
Jobs in the ANCHORING phase or beyond involve interactions with the Hedera Hashgraph consensus ledger, which is immutable by design. If the job has already written a transaction to Hedera, the halt signal may not be able to reverse that operation. Always check the job phase via Get Job Status before calling this endpoint to determine whether a halt is still possible.