1. Docs

Job Submit

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

Request

Uri: https://api.daestro.com/v1/client/job/submit

Method: POST

Header:

Authorization: Bearer your_api_key_here
Content-Type: application/json

Body:

{
  "job_definition": "project-code::hello-world:1",
  "job_queue": "project-code::your-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"
  }
}

Curl

curl --request POST 
  --url https://api.daestro.com/v1/client/job/submit 
  --header 'authorization: Bearer your_api_key_here' 
  --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"
  }
}'

Response

Status: 202

Body:

{
  "id": "019473a0-3dfd-7cd2-abef-527bb77dc64c"
}