1. Docs

Job Submit

You can call the Job Submit api from your application to submit the job.

Request

POST /v1/client/job
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Body

KeyTypeValueRequired
job_definitionstringproject_code::job_definition_name:version can be obtained from Job Definition pageYes
job_queuestringproject_code::job_queue_nameYes
namestringunique-job-name-to-the-queueNo
container_cmdstring[]["array", "of", "commands"]No
container_cmd_parameterobject{"subcommand": "-a"}No
container_envobject{"access_token": {"value": "this-will-be-not-shown-again","sensitive": true}}No
schedule_atstring OR number"2025-05-17T06:37:00.000Z" or 1747463820 (unix timestamp in seconds)No

Response

Accepted

// Status: 202
{
  "ok": true,
  "data": {
    "id": "019782a8-4054-7ae2-8adb-499a03e5460a"
  }
}

Bad Request ⚠️

// Status: 400
{
  "ok": false,
  "message": "error info"
}

Example Body

{
  "job_definition": "project-code::hello-world:1",
  "job_queue": "project-code::your-job-queue",
  "container_cmd": ["uname", "Param::subcommand"],
  "container_cmd_parameter": {
    "subcommand": "-a"
  },
  "container_env": {
    "file": {
      "value": "https://example.com/paint.jpg"
    },
    "access_token": {
      "value": "sensitive-vars-will-be-not-shown-again",
      "sensitive": true
    }
  },
  "schedule_at": "2025-05-17T06:37:00.000Z" // or unix timestamp
}

Request Samples

Curl

curl -i --request POST \
  --url https://api.daestro.com/v1/client/job \
  --header 'authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --data '{
  "job_definition": "my-project::hello-world:1",
  "job_queue": "my-project::first-job-queue",
  "container_cmd": ["uname", "Param::subcommand"],
  "container_env": {
    "file": {
      "value": "https://example.com/paint.jpg"
    },
    "access_token": {
      "value": "sensitive-vars-will-be-encrypted",
      "sensitive": true
    }
  },
  "container_cmd_parameter": {
    "subcommand": "-a"
  }
}'