Skip to main content
PUT
/
v1
/
jobs
/
{uuid}
/
cancel
Stop Job
curl --request PUT \
  --url https://api.compute.x.io/v1/jobs/{uuid}/cancel \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "Cancelled by user"
}
'
{
  "object": "job",
  "created_at": "2023-12-25",
  "updated_at": "2023-12-25",
  "status": "PENDING",
  "task": "BATCH",
  "title": "<string>",
  "cpu_count": 123,
  "gpu_count": 123,
  "min_ram_gb": 123,
  "min_vram_gb": 123,
  "min_storage_gb": 123,
  "parameters": {
    "parameters": {
      "allowed_ips": [
        "<string>"
      ],
      "env": {},
      "host": "<string>",
      "image": "<string>",
      "imagesrc": "<string>",
      "ports": [
        123
      ],
      "secret": "<string>",
      "sshkey": "<string>",
      "tag": "<string>",
      "user": "<string>",
      "volumes": [
        {
          "image": "<string>",
          "mount": "<string>",
          "registry": "<string>",
          "secret": "<string>",
          "tag": "<string>",
          "user": "<string>"
        }
      ]
    },
    "type": "docker"
  },
  "timeout_assign_at_ms": 123,
  "uuid": "<string>",
  "started_at": "2023-12-25",
  "completed_at": "2023-12-25",
  "description": "<string>",
  "gpu_name": "<string>",
  "gpu_registry_uuid": "<string>",
  "max_timeout_assign_ms": 123,
  "max_timeout_run_ms": 123,
  "max_timeout_start_ms": 123,
  "max_retry_count": 123,
  "max_node_count": 123,
  "image_size_bytes": 123,
  "container_access_tokens": [],
  "status_reason": "<string>",
  "source_recipe_uuid": "<string>"
}

Path Parameters

uuid
string<uuid>
required

Body

application/json
reason
string
Example:

"Cancelled by user"

Response

Job cancelled

object
enum<string>
required
Available options:
job
created_at
string<date> | null
required
updated_at
string<date> | null
required
status
enum<string>
required
Available options:
PENDING,
ASSIGNED,
RUNNING,
COMPLETED,
CANCELLED,
FAILED
task
enum<string>
required
Available options:
BATCH,
PERSISTENT
title
string
required
cpu_count
number | null
required
gpu_count
number | null
required
min_ram_gb
number
required
min_vram_gb
number
required
min_storage_gb
number
required
parameters
object
required
timeout_assign_at_ms
number | null
required
uuid
string | null
started_at
string<date> | null
completed_at
string<date> | null
description
string | null
gpu_name
string | null
gpu_registry_uuid
string | null
max_timeout_assign_ms
number | null
max_timeout_run_ms
number | null
max_timeout_start_ms
number | null
max_retry_count
number | null
max_node_count
number | null
image_size_bytes
number | null
container_access_tokens
object[]
status_reason
string | null
source_recipe_uuid
string | null