Skip to content

Latest commit

 

History

History
72 lines (69 loc) · 3.36 KB

restapi.md

File metadata and controls

72 lines (69 loc) · 3.36 KB

Rest API Manual

The following endpoints are available:

  • / - list failures (failed jobs and tasks having at least one failed job).
  • /jobs - list non-finished jobs.
  • /tasks - list non-finished tasks.
    Note: a task is registered in the ExecPool on start of the first descendant job, so only tasks related to the started jobs are shown.

All endpoints have uniform URL parameters:

  • fmt - required format of the result: json htm txt
  • cols - item (job/task) properties to be shown (all by default): category rcode duration memkind memsize name numadded numdone numterm pid task tstart tstop
  • flt - items filtering by the specified properties in the following format: <pname>[*][:<beg>[..<end>]]
    • <pname> - property name, see cols.
    • * - optional property, the item is filtered out only if the property value is out of the specified range but not if this property is not present.
    • beg - begin of the property value range, inclusive. Exact match is expected if end is omitted.
    • end - end of the property value range, exclusive.
    Fully omitted range requires any non-None property value.
    For example, to show terminated jobs with return code -15 and tasks having these jobs (rcode* is optional since tasks do not have this property), where the jobs have defined category* (optional since tasks do not have category) and where each job executed from 1.5 sec up to 1 hour (3600 sec):
    ?flt=rcode*:-15|duration:1.5..3600|category*
    Omitted low/high bound of the range is substituted with -/+inf: rcode:.. is the same as rcode:-inf..inf.
    Duration can be specified in the DHMS format: [<days:int>d][<hours:int>h][<minutes:int>m][<seconds:float>], for example: duration:2d5h12.8...
  • lim - limit the number of the showing items up to this number of jobs / tasks, 50 by default.
  • refresh - page auto refresh time in seconds, ≥ 2, absent by default.

Query examples:

  • Show tasks with their jobs having rcode=-15 if exists, 1.5 sec ≤ duration < 3600 sec and cat1 ≤ category < cat5 if exists:
          http://localhost:8080/tasks?flt=rcode*:-15|duration:1.5..3600|category*=cat1..cat5
        
  • Show jobs having rcode < 0 if exists, 1.5 sec ≤ duration < 10 days 2 hours 5.7 sec and task attribute present with some defined value:
          http://localhost:8080/jobs?flt=rcode*:..0|duration:1.5..10d2h15.7|task