Slide 18
Slide 18 text
Sample API access
#!/bin/env ruby
require 'net/http'
require 'uri'
require 'json'
require 'time'
url = URI.parse('http://localhost:65432/')
res = Net::HTTP.start(url.host, url.port) {|http|
http.get('/api/schedules')
}
schedules = JSON.parse(res.body)
schedules['schedules'].sort_by { |s| Time.strptime(s['nextRunTime'],'%Y-%m-%dT%H:%M:%S%z').to_i }.each do |row|
next if row['disabledAt']
printf("%s\t%s/%s\n",Time.strptime(row['nextRunTime'],'%Y-%m-%dT%H:%M:%S%z').localtime,row['project']['name'],row['workflow']['name'])
end