Cancel Job

Cancel Import or Validation Job

Overview

This API allows users to cancel import or validation operations that are currently in progress or scheduled for future execution. Cancellation is immediate for scheduled jobs and graceful for running jobs.

Cancellation Behavior

  • Scheduled Jobs: Immediate cancellation, no processing occurs
  • In Progress Jobs: Graceful shutdown, current item completes, no new items start
  • Completed Jobs: Cannot be cancelled (returns error)
  • Failed Jobs: Cannot be cancelled (already stopped)

When to Cancel

  • Content Issues: Discover problems with source content
  • Timing Changes: Need to reschedule for different time
  • Resource Constraints: System resources are needed elsewhere
  • User Request: Manual cancellation by authorized users
  • System Maintenance: Planned maintenance windows

Cancellation Process

  1. Request Received: System receives cancellation request
  2. Status Check: Verifies current job status
  3. Graceful Shutdown: For running jobs, completes current item
  4. Resource Cleanup: Releases allocated system resources
  5. Status Update: Marks job as cancelled
  6. Notification: Updates job status and logs

Post-Cancellation

  • Job Status: Changes to "Cancelled"
  • Partial Results: Any completed items remain in system
  • Logs: Cancellation reason and timing recorded
  • Resources: System resources freed for other operations

Best Practices

  • Monitor Jobs: Regularly check job status to identify candidates for cancellation
  • Plan Cancellations: Schedule cancellations during low-usage periods
  • Resource Planning: Consider resource impact before cancelling large jobs

Permissions

Actor Permission
User
  • User must be a department user.
  • Content can only be validated for user's home department.
  • User must have 'Author' role.
  • The job must have been created by the logged in user, or the logged in user must have 'Edit' permissions on the user who created the job.
  • SecurityoAuthUser
    Request
    path Parameters
    job_id
    required
    string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3...

    Job ID Parameter

    The unique identifier for the import or validation job. This ID was returned when the job was created via the Import or Validate API.

    Format: UUID v4 (e.g., 7A84B875-6F75-4C7B-B137-0632B62DB0BD)

    Example Usage:

    GET /import/content/7A84B875-6F75-4C7B-B137-0632B62DB0BD/status
    
    Example: 7A84B875-6F75-4C7B-B137-0632B62DB0BD
    Responses
    204

    No content

    401

    Unauthorized

    403

    Forbidden

    404

    Not Found

    406

    Not acceptable

    500

    Internal server error

    post/import/content/{job_id}/cancel
    Request samples
    Response samples
    application/json
    {
    • "code": "401-101",
    • "developerMessage": "Invalid or expired 'Authorization' header provided. New login is required."
    }