-
Notifications
You must be signed in to change notification settings - Fork 47
API Documentation
Repository API |
---|
Get all job definitions |
List head revisions' numbers |
List all revisions |
Get a job definition |
Get specific revision of a job definition |
Create/update job definition |
Get latest revision of all job definitions in the repository.
Request method | Content type | Syntax |
---|---|---|
GET | application/transit+json application/transit+msgpack |
/repo/jobdefinitions |
Returns a map of all job definitions that exist in the repository. For each job definition, only the latest (head) revision is returned.
{"test" {:first-step "step1",
:name "test",
:type nil,
:properties {:name "World"},
:steps [{:id "step1",
:type :custom,
:supertype :tasklet,
:next [[false "step2"] [true "step3"]],
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]
{:message (str \"Hello \" (:name p)) :return-code (nil? (:name p))})",
:type nil},
:properties {}}
{:id "step2",
:type :custom,
:supertype :tasklet,
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]\n{:message (str (:message p) \"!\")})",
:type nil},
:next [],
:properties {}}
{:id "step3",
:type :custom,
:supertype :tasklet,
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]
{:message (str (:message p) \"nobody!\")})",
:type nil},
:next [],
:properties {}}],
:revision 2}}
Request method | Content type | Syntax |
---|---|---|
GET | application/transit+json application/transit+msgpack |
/repo/jobdefinitions/heads |
Returns a map of the latest revision number of each job definition that exists in the repository.
{"test" 2}
Request method | Content type | Syntax |
---|---|---|
GET | application/transit+json application/transit+msgpack |
repo/jobdefinitions/revisions |
Returns a map of job definitions. For each job definition name as key, the map contains their respective list of revisions which in turn consists of a vector of revision number, its timestamp, author and revision notes.
{"test" ([2 #inst"2018-10-03T10:28:27.000-00:00" "miro" "dolor sit amet, consectetur adipiscing elit"]
[1 #inst"2018-10-03T10:28:26.000-00:00" "anonymous" "lorem ipsum"])}
Request method | Content type | Syntax |
---|---|---|
GET | application/transit+json application/transit+msgpack |
/repo/jobdefinitions/{job definition's name} |
Returns a head revision of given job definitions.
{:first-step "step1",
:name "test",
:type nil,
:properties {:name "World"},
:steps [{:id "step1",
:type :custom,
:supertype :tasklet,
:next [[false "step2"] [true "step3"]],
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]
{:message (str \"Hello \" (:name p)) :return-code (nil? (:name p))})",
:type nil},
:properties {}}
{:id "step2",
:type :custom,
:supertype :tasklet,
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]\n{:message (str (:message p) \"!\")})",
:type nil},
:next [],
:properties {}}
{:id "step3",
:type :custom,
:supertype :tasklet,
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]\n{:message (str (:message p) \"nobody!\")})",
:type nil},
:next [],
:properties {}}],
:revision 2}
Request method | Content type | Syntax |
---|---|---|
GET | application/transit+json application/transit+msgpack |
/repo/jobdefinitions/{job definition's name}/{revision} |
Returns the specified revision of given job definitions.
{:first-step "step1",
:name "test",
:type nil,
:properties {:name "World"},
:steps [{:id "step1",
:type :custom,
:supertype :tasklet,
:next [[false "step2"] [true "step3"]],
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]
{:message (str \"Hello \" (:name p)) :return-code (nil? (:name p))})",
:type nil},
:properties {}}
{:id "step2",
:type :custom,
:supertype :tasklet,
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]\n{:message (str (:message p) \"!\")})",
:type nil},
:next [],
:properties {}}
{:id "step3",
:type :custom,
:supertype :tasklet,
:workload-fn #titanoboa.exp.Expression{:value "(fn [p]\n{:message (str (:message p) \"nobody!\")})",
:type nil},
:next [],
:properties {}}],
:revision 1}
Adds a new revision of a job definition. If the job definition does not exists yet, it will be created.
Request method | Content type | Syntax |
---|---|---|
POST | application/transit+json application/transit+msgpack |
/repo/jobdefinitions/{job definition's name} |
Request Attribute | Type | Use |
---|---|---|
:definition | map | job definition map |
:notes | String | revision notes |
Returns number of new revision that was created.
3