LogoLogo
WebsiteSlack
0.32
0.32
  • Get started
  • Clusters
    • Management
      • Auth
      • Create
      • Update
      • Delete
      • Environments
    • Instances
      • Multi-instance
      • Spot instances
    • Observability
      • Logging
      • Metrics
    • Networking
      • Load balancers
      • VPC peering
      • HTTPS
      • Custom domain
    • Advanced
      • Setting up kubectl
      • Private Docker registry
  • Workloads
    • Realtime APIs
      • Example
      • Predictor
      • Configuration
      • Models
      • Parallelism
      • Server-side batching
      • Autoscaling
      • Statuses
      • Metrics
      • Multi-model
        • Example
        • Configuration
        • Caching
      • Traffic Splitter
        • Example
        • Configuration
      • Troubleshooting
    • Async APIs
      • Example
      • Predictor
      • Configuration
      • Statuses
      • Webhooks
      • Metrics
    • Batch APIs
      • Example
      • Predictor
      • Configuration
      • Jobs
      • Statuses
      • Metrics
    • Task APIs
      • Example
      • Definition
      • Configuration
      • Jobs
      • Statuses
      • Metrics
    • Dependencies
      • Example
      • Python packages
      • System packages
      • Custom images
  • Clients
    • Install
    • Uninstall
    • CLI commands
    • Python client
Powered by GitBook
On this page
  • Get the TaskAPI endpoint
  • Submit a Job
  • Get a job's status
  • Stop a job
  1. Workloads
  2. Task APIs

Jobs

Get the TaskAPI endpoint

cortex get <task_api_name>

Submit a Job

POST <task_api_endpoint>:
{
    "timeout": <int>,  # duration in seconds since the submission of a job before it is terminated (optional)
    "config": {  # custom fields for this specific job (will override values in `config` specified in your api configuration) (optional)
        "string": <any>
    }
}

RESPONSE:
{
    "job_id": <string>,
    "api_name": <string>,
    "kind": "TaskAPI",
    "workers": 1,
    "config": {<string>: <any>},
    "api_id": <string>,
    "timeout": <int>,
    "created_time": <string>
}

Get a job's status

cortex get <task_api_name> <job_id>

Or make a GET request to <task_api_endpoint>?jobID=<jobID>:

GET <task_api_endpoint>?jobID=<jobID>:

RESPONSE:
{
    "job_status": {
        "job_id": <string>,
        "api_name": <string>,
        "kind": "TaskAPI",
        "workers": 1,
        "config": {<string>: <any>},
        "api_id": <string>,
        "status": <string>,
        "created_time": <string>
        "start_time": <string>
        "end_time": <string> (optional)
    },
    "endpoint": <string>
    "api_spec": {
        ...
    }
}

Stop a job

cortex delete <task_api_name> <job_id>

Or make a DELETE request to <task_api_endpoint>?jobID=<jobID>:

DELETE <task_api_endpoint>?jobID=<jobID>:

RESPONSE:
{"message":"stopped job <job_id>"}
PreviousConfigurationNextStatuses

Last updated 4 years ago