dkron-ruby 1.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5c1c99c506acf44fdfc8106efba2d1067446d699aa80ddee769fcb21ba0ea09
4
- data.tar.gz: d72e1d5baf17941b8921f43a36ce95ad538c04d77dadad68e093fbb593361719
3
+ metadata.gz: f6f0d6dbea773e832a83a24a967b0f292f2e579122239e1288369f34f3388688
4
+ data.tar.gz: 0d4f2b5752b5a3fd2b2d8bca591fa36e231b17fd1df19188531fd012c14ccccd
5
5
  SHA512:
6
- metadata.gz: ef40c019dff315153acb9661085188c753694b11c5253695a4331765f9c9dda7e913e12ba1f700daf31dd944aa3e384bfc927a1908783480c9a6b43eb898da5a
7
- data.tar.gz: 735161cefbe15f060dcf3cc120e8ba375831d62d9e9d978e69a4aab271c503b1281b183e660955e5ddda570855e965a811bc2ce1b3dd4c0e401fe365bbc16439
6
+ metadata.gz: ccf06feb2f57b6e7f15970d494ef942dae9c41043909304e3783ebe199b08a7df6a1f92b8dd7cd3d6e67d9a089d66a88e6e4639c8542b5bb0a9e91d4f1d7601d
7
+ data.tar.gz: eadb6cc241bca1a7b09ec8d1079e102bff91c2f980ae58fd6729a8151a772d247b515860e1068c280634a083d5c2ee1279c9e16f3f834bb9672b8a1ace8e8d44
data/DEVELOP.md CHANGED
@@ -1,596 +1,599 @@
1
- `POST` to https://generator.swagger.io/api/gen/clients/ruby
2
- ```json
3
- {
4
- "options":{
5
- "gemName":"dkron-ruby",
6
- "moduleName":"Dkron"
7
- },
8
- "spec":{
9
- "swagger":"2.0",
10
- "basePath":"/v1",
11
- "host":"localhost:8080",
12
- "consumes":[
13
- "application/json"
14
- ],
15
- "produces":[
16
- "application/json"
17
- ],
18
- "schemes":[
19
- "http"
20
- ],
21
- "info":{
22
- "version":"2.2",
23
- "title":"Dkron REST API",
24
- "description":"You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`.\n\nDkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port.\n\nDefault API responses are unformatted JSON add the `pretty=true` param to format the response.\n"
25
- },
26
- "paths":{
27
- "/":{
28
- "get":{
29
- "description":"Gets `Status` object.\n",
30
- "operationId":"status",
31
- "tags":[
32
- "default"
33
- ],
34
- "responses":{
35
- "200":{
36
- "description":"Successful response",
37
- "schema":{
38
- "$ref":"#/definitions/status"
39
- }
40
- }
41
- }
42
- }
43
- },
44
- "/jobs":{
45
- "get":{
46
- "description":"List jobs.\n",
47
- "parameters":[
48
- {
49
- "in":"query",
50
- "name":"metadata",
51
- "type":"array",
52
- "collectionFormat":"multi",
53
- "items":{
54
- "type":"string"
55
- },
56
- "description":"Filter jobs by metadata"
57
- }
58
- ],
59
- "operationId":"getJobs",
60
- "tags":[
61
- "jobs"
62
- ],
63
- "responses":{
64
- "200":{
65
- "description":"Successful response",
66
- "schema":{
67
- "type":"array",
68
- "items":{
69
- "$ref":"#/definitions/job"
70
- }
71
- }
72
- }
73
- }
74
- },
75
- "post":{
76
- "description":"Create or updates a new job.\n",
77
- "operationId":"createOrUpdateJob",
78
- "tags":[
79
- "jobs"
80
- ],
81
- "parameters":[
82
- {
83
- "in":"body",
84
- "name":"body",
85
- "description":"Updated job object",
86
- "required":true,
87
- "schema":{
88
- "$ref":"#/definitions/job"
89
- }
90
- },
91
- {
92
- "in":"query",
93
- "name":"runoncreate",
94
- "description":"If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated.",
95
- "required":false,
96
- "schema":{
97
- "type":"boolean"
98
- },
99
- "allowEmptyValue":true
100
- }
101
- ],
102
- "responses":{
103
- "201":{
104
- "description":"Successful response",
105
- "schema":{
106
- "$ref":"#/definitions/job"
107
- }
108
- }
109
- }
110
- }
111
- },
112
- "/jobs/{job_name}":{
113
- "get":{
114
- "description":"Show a job.\n",
115
- "operationId":"showJobByName",
116
- "tags":[
117
- "jobs"
118
- ],
119
- "parameters":[
120
- {
121
- "in":"path",
122
- "name":"job_name",
123
- "description":"The job that needs to be fetched.",
124
- "required":true,
125
- "type":"string"
126
- }
127
- ],
128
- "responses":{
129
- "200":{
130
- "description":"Successful response",
131
- "schema":{
132
- "$ref":"#/definitions/job"
133
- }
134
- }
135
- }
136
- },
137
- "delete":{
138
- "description":"Delete a job.\n",
139
- "operationId":"deleteJob",
140
- "tags":[
141
- "jobs"
142
- ],
143
- "parameters":[
144
- {
145
- "in":"path",
146
- "name":"job_name",
147
- "description":"The job that needs to be deleted.",
148
- "required":true,
149
- "type":"string"
150
- }
151
- ],
152
- "responses":{
153
- "200":{
154
- "description":"Successful response",
155
- "schema":{
156
- "$ref":"#/definitions/job"
157
- }
158
- }
159
- }
160
- },
161
- "post":{
162
- "description":"Executes a job.\n",
163
- "operationId":"runJob",
164
- "tags":[
165
- "jobs"
166
- ],
167
- "parameters":[
168
- {
169
- "in":"path",
170
- "name":"job_name",
171
- "description":"The job that needs to be run.",
172
- "required":true,
173
- "type":"string"
174
- }
175
- ],
176
- "responses":{
177
- "202":{
178
- "description":"Successful response",
179
- "schema":{
180
- "$ref":"#/definitions/job"
181
- }
182
- }
183
- }
184
- }
185
- },
186
- "/jobs/{job_name}/toggle":{
187
- "post":{
188
- "description":"Toggle a job.\n",
189
- "operationId":"toggleJob",
190
- "tags":[
191
- "jobs"
192
- ],
193
- "parameters":[
194
- {
195
- "in":"path",
196
- "name":"job_name",
197
- "description":"The job that needs to be toggled.",
198
- "required":true,
199
- "type":"string"
200
- }
201
- ],
202
- "responses":{
203
- "200":{
204
- "description":"Successful response",
205
- "schema":{
206
- "$ref":"#/definitions/job"
207
- }
208
- }
209
- }
210
- }
211
- },
212
- "/members":{
213
- "get":{
214
- "description":"List members.\n",
215
- "operationId":"getMember",
216
- "tags":[
217
- "members"
218
- ],
219
- "responses":{
220
- "200":{
221
- "description":"Successful response",
222
- "schema":{
223
- "type":"array",
224
- "items":{
225
- "$ref":"#/definitions/member"
226
- }
227
- }
228
- }
229
- }
230
- }
231
- },
232
- "/leader":{
233
- "get":{
234
- "description":"List leader of cluster.\n",
235
- "operationId":"getLeader",
236
- "tags":[
237
- "default"
238
- ],
239
- "responses":{
240
- "200":{
241
- "description":"Successful response",
242
- "schema":{
243
- "$ref":"#/definitions/member"
244
- }
245
- }
246
- }
247
- }
248
- },
249
- "/leave":{
250
- "post":{
251
- "description":"Force the node to leave the cluster.\n",
252
- "operationId":"leave",
253
- "tags":[
254
- "default"
255
- ],
256
- "responses":{
257
- "200":{
258
- "description":"Successful response",
259
- "schema":{
260
- "type":"array",
261
- "items":{
262
- "$ref":"#/definitions/member"
263
- }
264
- }
265
- }
266
- }
267
- }
268
- },
269
- "/jobs/{job_name}/executions":{
270
- "get":{
271
- "description":"List executions.\n",
272
- "operationId":"listExecutionsByJob",
273
- "tags":[
274
- "executions"
275
- ],
276
- "parameters":[
277
- {
278
- "in":"path",
279
- "name":"job_name",
280
- "description":"The job that owns the executions to be fetched.",
281
- "required":true,
282
- "type":"string"
283
- }
284
- ],
285
- "responses":{
286
- "200":{
287
- "description":"Successful response",
288
- "schema":{
289
- "type":"array",
290
- "items":{
291
- "$ref":"#/definitions/execution"
292
- }
293
- }
294
- }
295
- }
296
- }
297
- }
298
- },
299
- "definitions":{
300
- "status":{
301
- "type":"object",
302
- "description":"Status represents details about the node.",
303
- "readOnly":true,
304
- "properties":{
305
- "agent":{
306
- "description":"Node basic details",
307
- "readOnly":true,
308
- "additionalProperties":{
309
- "type":"object"
310
- }
311
- },
312
- "serf":{
313
- "description":"Serf status",
314
- "readOnly":true,
315
- "additionalProperties":{
316
- "type":"object"
317
- }
318
- },
319
- "tags":{
320
- "description":"Tags asociated with this node",
321
- "readOnly":true,
322
- "additionalProperties":{
323
- "type":"string"
324
- }
325
- }
326
- }
327
- },
328
- "job":{
329
- "type":"object",
330
- "description":"A Job represents a scheduled task to execute.",
331
- "required":[
332
- "name",
333
- "schedule"
334
- ],
335
- "properties":{
336
- "name":{
337
- "type":"string",
338
- "description":"Name for the job.",
339
- "readOnly":false,
340
- "example":"job1"
341
- },
342
- "displayname":{
343
- "type":"string",
344
- "description":"Nice name for the job. Optional.",
345
- "readOnly":false
346
- },
347
- "schedule":{
348
- "type":"string",
349
- "description":"Cron expression for the job.",
350
- "readOnly":false,
351
- "example":"@every 10s"
352
- },
353
- "timezone":{
354
- "type":"string",
355
- "description":"Timezone where the job will be executed. By default and when field is set to empty string, the job will run in local time.",
356
- "readOnly":false,
357
- "example":"Europe/Berlin"
358
- },
359
- "owner":{
360
- "type":"string",
361
- "description":"Owner of the job",
362
- "readOnly":false,
363
- "example":"Platform Team"
364
- },
365
- "owner_email":{
366
- "type":"string",
367
- "description":"Email of the owner",
368
- "readOnly":false,
369
- "example":"platform@example.com"
370
- },
371
- "success_count":{
372
- "type":"integer",
373
- "description":"Number of successful executions",
374
- "readOnly":true
375
- },
376
- "error_count":{
377
- "type":"integer",
378
- "description":"Number of failed executions",
379
- "readOnly":true
380
- },
381
- "last_success":{
382
- "type":"string",
383
- "format":"date-time",
384
- "description":"Last time this job executed successfully",
385
- "readOnly":true
386
- },
387
- "last_error":{
388
- "type":"string",
389
- "format":"date-time",
390
- "description":"Last time this job failed",
391
- "readOnly":true
392
- },
393
- "disabled":{
394
- "type":"boolean",
395
- "description":"Disabled state of the job",
396
- "readOnly":false
397
- },
398
- "tags":{
399
- "type":"object",
400
- "description":"Target nodes tags of this job",
401
- "additionalProperties":{
402
- "type":"string"
403
- },
404
- "readOnly":false,
405
- "example":{
406
- "server":"true"
407
- }
408
- },
409
- "metadata":{
410
- "type":"object",
411
- "description":"Extra metadata tags for this job",
412
- "additionalProperties":{
413
- "type":"string"
414
- },
415
- "readOnly":false,
416
- "example":{
417
- "office":"Barcelona"
418
- }
419
- },
420
- "retries":{
421
- "type":"integer",
422
- "description":"Number of times to retry a failed job execution",
423
- "example":2,
424
- "readOnly":false
425
- },
426
- "parent_job":{
427
- "type":"string",
428
- "description":"The name/id of the job that will trigger the execution of this job",
429
- "example":"parent_job",
430
- "readOnly":false
431
- },
432
- "dependent_jobs":{
433
- "type":"array",
434
- "items":{
435
- "type":"string"
436
- },
437
- "description":"Array containing the jobs that depends on this one",
438
- "example":[
439
- "dependent_job"
440
- ],
441
- "readOnly":true
442
- },
443
- "processors":{
444
- "$ref":"#/definitions/processors"
445
- },
446
- "concurrency":{
447
- "type":"string",
448
- "description":"Concurrency policy for the job allow/forbid",
449
- "example":"allow",
450
- "readOnly":false
451
- },
452
- "executor":{
453
- "type":"string",
454
- "description":"Executor plugin used to run the job",
455
- "readOnly":false,
456
- "example":"shell"
457
- },
458
- "executor_config":{
459
- "type":"object",
460
- "description":"Executor plugin parameters",
461
- "additionalProperties":{
462
- "type":"string"
463
- },
464
- "example":{
465
- "command":"echo 'Hello from Dkron'"
466
- }
467
- },
468
- "status":{
469
- "type":"string",
470
- "readOnly":true,
471
- "description":"Status of the job",
472
- "example":"success"
473
- }
474
- }
475
- },
476
- "member":{
477
- "type":"object",
478
- "description":"A member represents a cluster member node.",
479
- "properties":{
480
- "Name":{
481
- "type":"string",
482
- "description":"Node name",
483
- "example":"dkron1"
484
- },
485
- "Addr":{
486
- "type":"string",
487
- "description":"IP Address",
488
- "example":"192.168.1.137"
489
- },
490
- "Port":{
491
- "type":"integer",
492
- "description":"Port number",
493
- "example":8946
494
- },
495
- "Tags":{
496
- "type":"object",
497
- "description":"Tags asociated with this node",
498
- "additionalProperties":{
499
- "type":"string"
500
- },
501
- "example":{
502
- "rpc_addr":"192.168.1.137:6868",
503
- "server":"true",
504
- "version\"":"1.0.0"
505
- }
506
- },
507
- "Status":{
508
- "type":"integer",
509
- "description":"The serf status of the node see: https://godoc.org/github.com/hashicorp/serf/serf#MemberStatus",
510
- "example":1
511
- },
512
- "ProtocolMin":{
513
- "type":"integer",
514
- "description":"Serf protocol minimum version this node can understand or speak",
515
- "example":5
516
- },
517
- "ProtocolMax":{
518
- "type":"integer",
519
- "description":"Serf protocol maximum version this node can understand or speak",
520
- "example":2
521
- },
522
- "ProtocolCur":{
523
- "type":"integer",
524
- "description":"Serf protocol current version this node can understand or speak",
525
- "example":2
526
- },
527
- "DelegateMin":{
528
- "type":"integer",
529
- "description":"Serf delegate protocol minimum version this node can understand or speak"
530
- },
531
- "DelegateMax":{
532
- "type":"integer",
533
- "description":"Serf delegate protocol maximum version this node can understand or speak",
534
- "example":5
535
- },
536
- "DelegateCur":{
537
- "type":"integer",
538
- "description":"Serf delegate protocol current version this node can understand or speak",
539
- "example":4
540
- }
541
- }
542
- },
543
- "execution":{
544
- "type":"object",
545
- "description":"An execution represents a timed job run.",
546
- "properties":{
547
- "job_name":{
548
- "type":"string",
549
- "description":"job name",
550
- "example":"job_1"
551
- },
552
- "started_at":{
553
- "type":"string",
554
- "format":"date-time",
555
- "description":"start time of the execution"
556
- },
557
- "finished_at":{
558
- "type":"string",
559
- "format":"date-time",
560
- "description":"when the execution finished running"
561
- },
562
- "success":{
563
- "type":"boolean",
564
- "description":"the execution run successfuly"
565
- },
566
- "output":{
567
- "type":"string",
568
- "description":"partial output of the command execution",
569
- "example":"Hello from Dkron"
570
- },
571
- "node_name":{
572
- "type":"string",
573
- "description":"name of the node that executed the command",
574
- "example":"dkron1"
575
- }
576
- }
577
- },
578
- "processors":{
579
- "type":"object",
580
- "description":"Processor plugins used to process executions results of this job",
581
- "additionalProperties":{
582
- "type":"object",
583
- "additionalProperties":{
584
- "type":"string"
585
- }
586
- },
587
- "example":{
588
- "files":{
589
- "forward":true
590
- }
591
- }
592
- }
593
- }
594
- }
595
- }
596
- ```
1
+ 1. Download latest Swagger spec: https://dkron.io/swagger.yaml
2
+ 2. `POST` to https://generator.swagger.io/api/gen/clients/ruby with body (replace spec with latest from above):
3
+ ```json
4
+ {
5
+ "options":{
6
+ "gemName":"dkron-ruby",
7
+ "moduleName":"Dkron"
8
+ },
9
+ "spec":{
10
+ "swagger":"2.0",
11
+ "basePath":"/v1",
12
+ "host":"localhost:8080",
13
+ "consumes":[
14
+ "application/json"
15
+ ],
16
+ "produces":[
17
+ "application/json"
18
+ ],
19
+ "schemes":[
20
+ "http"
21
+ ],
22
+ "info":{
23
+ "version":"2.2",
24
+ "title":"Dkron REST API",
25
+ "description":"You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`.\n\nDkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port.\n\nDefault API responses are unformatted JSON add the `pretty=true` param to format the response.\n"
26
+ },
27
+ "paths":{
28
+ "/":{
29
+ "get":{
30
+ "description":"Gets `Status` object.\n",
31
+ "operationId":"status",
32
+ "tags":[
33
+ "default"
34
+ ],
35
+ "responses":{
36
+ "200":{
37
+ "description":"Successful response",
38
+ "schema":{
39
+ "$ref":"#/definitions/status"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "/jobs":{
46
+ "get":{
47
+ "description":"List jobs.\n",
48
+ "parameters":[
49
+ {
50
+ "in":"query",
51
+ "name":"metadata",
52
+ "type":"array",
53
+ "collectionFormat":"multi",
54
+ "items":{
55
+ "type":"string"
56
+ },
57
+ "description":"Filter jobs by metadata"
58
+ }
59
+ ],
60
+ "operationId":"getJobs",
61
+ "tags":[
62
+ "jobs"
63
+ ],
64
+ "responses":{
65
+ "200":{
66
+ "description":"Successful response",
67
+ "schema":{
68
+ "type":"array",
69
+ "items":{
70
+ "$ref":"#/definitions/job"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ },
76
+ "post":{
77
+ "description":"Create or updates a new job.\n",
78
+ "operationId":"createOrUpdateJob",
79
+ "tags":[
80
+ "jobs"
81
+ ],
82
+ "parameters":[
83
+ {
84
+ "in":"body",
85
+ "name":"body",
86
+ "description":"Updated job object",
87
+ "required":true,
88
+ "schema":{
89
+ "$ref":"#/definitions/job"
90
+ }
91
+ },
92
+ {
93
+ "in":"query",
94
+ "name":"runoncreate",
95
+ "description":"If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated.",
96
+ "required":false,
97
+ "schema":{
98
+ "type":"boolean"
99
+ },
100
+ "allowEmptyValue":true
101
+ }
102
+ ],
103
+ "responses":{
104
+ "201":{
105
+ "description":"Successful response",
106
+ "schema":{
107
+ "$ref":"#/definitions/job"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "/jobs/{job_name}":{
114
+ "get":{
115
+ "description":"Show a job.\n",
116
+ "operationId":"showJobByName",
117
+ "tags":[
118
+ "jobs"
119
+ ],
120
+ "parameters":[
121
+ {
122
+ "in":"path",
123
+ "name":"job_name",
124
+ "description":"The job that needs to be fetched.",
125
+ "required":true,
126
+ "type":"string"
127
+ }
128
+ ],
129
+ "responses":{
130
+ "200":{
131
+ "description":"Successful response",
132
+ "schema":{
133
+ "$ref":"#/definitions/job"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "delete":{
139
+ "description":"Delete a job.\n",
140
+ "operationId":"deleteJob",
141
+ "tags":[
142
+ "jobs"
143
+ ],
144
+ "parameters":[
145
+ {
146
+ "in":"path",
147
+ "name":"job_name",
148
+ "description":"The job that needs to be deleted.",
149
+ "required":true,
150
+ "type":"string"
151
+ }
152
+ ],
153
+ "responses":{
154
+ "200":{
155
+ "description":"Successful response",
156
+ "schema":{
157
+ "$ref":"#/definitions/job"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "post":{
163
+ "description":"Executes a job.\n",
164
+ "operationId":"runJob",
165
+ "tags":[
166
+ "jobs"
167
+ ],
168
+ "parameters":[
169
+ {
170
+ "in":"path",
171
+ "name":"job_name",
172
+ "description":"The job that needs to be run.",
173
+ "required":true,
174
+ "type":"string"
175
+ }
176
+ ],
177
+ "responses":{
178
+ "202":{
179
+ "description":"Successful response",
180
+ "schema":{
181
+ "$ref":"#/definitions/job"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ },
187
+ "/jobs/{job_name}/toggle":{
188
+ "post":{
189
+ "description":"Toggle a job.\n",
190
+ "operationId":"toggleJob",
191
+ "tags":[
192
+ "jobs"
193
+ ],
194
+ "parameters":[
195
+ {
196
+ "in":"path",
197
+ "name":"job_name",
198
+ "description":"The job that needs to be toggled.",
199
+ "required":true,
200
+ "type":"string"
201
+ }
202
+ ],
203
+ "responses":{
204
+ "200":{
205
+ "description":"Successful response",
206
+ "schema":{
207
+ "$ref":"#/definitions/job"
208
+ }
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "/members":{
214
+ "get":{
215
+ "description":"List members.\n",
216
+ "operationId":"getMember",
217
+ "tags":[
218
+ "members"
219
+ ],
220
+ "responses":{
221
+ "200":{
222
+ "description":"Successful response",
223
+ "schema":{
224
+ "type":"array",
225
+ "items":{
226
+ "$ref":"#/definitions/member"
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "/leader":{
234
+ "get":{
235
+ "description":"List leader of cluster.\n",
236
+ "operationId":"getLeader",
237
+ "tags":[
238
+ "default"
239
+ ],
240
+ "responses":{
241
+ "200":{
242
+ "description":"Successful response",
243
+ "schema":{
244
+ "$ref":"#/definitions/member"
245
+ }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ "/leave":{
251
+ "post":{
252
+ "description":"Force the node to leave the cluster.\n",
253
+ "operationId":"leave",
254
+ "tags":[
255
+ "default"
256
+ ],
257
+ "responses":{
258
+ "200":{
259
+ "description":"Successful response",
260
+ "schema":{
261
+ "type":"array",
262
+ "items":{
263
+ "$ref":"#/definitions/member"
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ },
270
+ "/jobs/{job_name}/executions":{
271
+ "get":{
272
+ "description":"List executions.\n",
273
+ "operationId":"listExecutionsByJob",
274
+ "tags":[
275
+ "executions"
276
+ ],
277
+ "parameters":[
278
+ {
279
+ "in":"path",
280
+ "name":"job_name",
281
+ "description":"The job that owns the executions to be fetched.",
282
+ "required":true,
283
+ "type":"string"
284
+ }
285
+ ],
286
+ "responses":{
287
+ "200":{
288
+ "description":"Successful response",
289
+ "schema":{
290
+ "type":"array",
291
+ "items":{
292
+ "$ref":"#/definitions/execution"
293
+ }
294
+ }
295
+ }
296
+ }
297
+ }
298
+ }
299
+ },
300
+ "definitions":{
301
+ "status":{
302
+ "type":"object",
303
+ "description":"Status represents details about the node.",
304
+ "readOnly":true,
305
+ "properties":{
306
+ "agent":{
307
+ "description":"Node basic details",
308
+ "readOnly":true,
309
+ "additionalProperties":{
310
+ "type":"object"
311
+ }
312
+ },
313
+ "serf":{
314
+ "description":"Serf status",
315
+ "readOnly":true,
316
+ "additionalProperties":{
317
+ "type":"object"
318
+ }
319
+ },
320
+ "tags":{
321
+ "description":"Tags asociated with this node",
322
+ "readOnly":true,
323
+ "additionalProperties":{
324
+ "type":"string"
325
+ }
326
+ }
327
+ }
328
+ },
329
+ "job":{
330
+ "type":"object",
331
+ "description":"A Job represents a scheduled task to execute.",
332
+ "required":[
333
+ "name",
334
+ "schedule"
335
+ ],
336
+ "properties":{
337
+ "name":{
338
+ "type":"string",
339
+ "description":"Name for the job.",
340
+ "readOnly":false,
341
+ "example":"job1"
342
+ },
343
+ "displayname":{
344
+ "type":"string",
345
+ "description":"Nice name for the job. Optional.",
346
+ "readOnly":false
347
+ },
348
+ "schedule":{
349
+ "type":"string",
350
+ "description":"Cron expression for the job.",
351
+ "readOnly":false,
352
+ "example":"@every 10s"
353
+ },
354
+ "timezone":{
355
+ "type":"string",
356
+ "description":"Timezone where the job will be executed. By default and when field is set to empty string, the job will run in local time.",
357
+ "readOnly":false,
358
+ "example":"Europe/Berlin"
359
+ },
360
+ "owner":{
361
+ "type":"string",
362
+ "description":"Owner of the job",
363
+ "readOnly":false,
364
+ "example":"Platform Team"
365
+ },
366
+ "owner_email":{
367
+ "type":"string",
368
+ "description":"Email of the owner",
369
+ "readOnly":false,
370
+ "example":"platform@example.com"
371
+ },
372
+ "success_count":{
373
+ "type":"integer",
374
+ "description":"Number of successful executions",
375
+ "readOnly":true
376
+ },
377
+ "error_count":{
378
+ "type":"integer",
379
+ "description":"Number of failed executions",
380
+ "readOnly":true
381
+ },
382
+ "last_success":{
383
+ "type":"string",
384
+ "format":"date-time",
385
+ "description":"Last time this job executed successfully",
386
+ "readOnly":true
387
+ },
388
+ "last_error":{
389
+ "type":"string",
390
+ "format":"date-time",
391
+ "description":"Last time this job failed",
392
+ "readOnly":true
393
+ },
394
+ "disabled":{
395
+ "type":"boolean",
396
+ "description":"Disabled state of the job",
397
+ "readOnly":false
398
+ },
399
+ "tags":{
400
+ "type":"object",
401
+ "description":"Target nodes tags of this job",
402
+ "additionalProperties":{
403
+ "type":"string"
404
+ },
405
+ "readOnly":false,
406
+ "example":{
407
+ "server":"true"
408
+ }
409
+ },
410
+ "metadata":{
411
+ "type":"object",
412
+ "description":"Extra metadata tags for this job",
413
+ "additionalProperties":{
414
+ "type":"string"
415
+ },
416
+ "readOnly":false,
417
+ "example":{
418
+ "office":"Barcelona"
419
+ }
420
+ },
421
+ "retries":{
422
+ "type":"integer",
423
+ "description":"Number of times to retry a failed job execution",
424
+ "example":2,
425
+ "readOnly":false
426
+ },
427
+ "parent_job":{
428
+ "type":"string",
429
+ "description":"The name/id of the job that will trigger the execution of this job",
430
+ "example":"parent_job",
431
+ "readOnly":false
432
+ },
433
+ "dependent_jobs":{
434
+ "type":"array",
435
+ "items":{
436
+ "type":"string"
437
+ },
438
+ "description":"Array containing the jobs that depends on this one",
439
+ "example":[
440
+ "dependent_job"
441
+ ],
442
+ "readOnly":true
443
+ },
444
+ "processors":{
445
+ "$ref":"#/definitions/processors"
446
+ },
447
+ "concurrency":{
448
+ "type":"string",
449
+ "description":"Concurrency policy for the job allow/forbid",
450
+ "example":"allow",
451
+ "readOnly":false
452
+ },
453
+ "executor":{
454
+ "type":"string",
455
+ "description":"Executor plugin used to run the job",
456
+ "readOnly":false,
457
+ "example":"shell"
458
+ },
459
+ "executor_config":{
460
+ "type":"object",
461
+ "description":"Executor plugin parameters",
462
+ "additionalProperties":{
463
+ "type":"string"
464
+ },
465
+ "example":{
466
+ "command":"echo 'Hello from Dkron'"
467
+ }
468
+ },
469
+ "status":{
470
+ "type":"string",
471
+ "readOnly":true,
472
+ "description":"Status of the job",
473
+ "example":"success"
474
+ }
475
+ }
476
+ },
477
+ "member":{
478
+ "type":"object",
479
+ "description":"A member represents a cluster member node.",
480
+ "properties":{
481
+ "Name":{
482
+ "type":"string",
483
+ "description":"Node name",
484
+ "example":"dkron1"
485
+ },
486
+ "Addr":{
487
+ "type":"string",
488
+ "description":"IP Address",
489
+ "example":"192.168.1.137"
490
+ },
491
+ "Port":{
492
+ "type":"integer",
493
+ "description":"Port number",
494
+ "example":8946
495
+ },
496
+ "Tags":{
497
+ "type":"object",
498
+ "description":"Tags asociated with this node",
499
+ "additionalProperties":{
500
+ "type":"string"
501
+ },
502
+ "example":{
503
+ "rpc_addr":"192.168.1.137:6868",
504
+ "server":"true",
505
+ "version\"":"1.0.0"
506
+ }
507
+ },
508
+ "Status":{
509
+ "type":"integer",
510
+ "description":"The serf status of the node see: https://godoc.org/github.com/hashicorp/serf/serf#MemberStatus",
511
+ "example":1
512
+ },
513
+ "ProtocolMin":{
514
+ "type":"integer",
515
+ "description":"Serf protocol minimum version this node can understand or speak",
516
+ "example":5
517
+ },
518
+ "ProtocolMax":{
519
+ "type":"integer",
520
+ "description":"Serf protocol maximum version this node can understand or speak",
521
+ "example":2
522
+ },
523
+ "ProtocolCur":{
524
+ "type":"integer",
525
+ "description":"Serf protocol current version this node can understand or speak",
526
+ "example":2
527
+ },
528
+ "DelegateMin":{
529
+ "type":"integer",
530
+ "description":"Serf delegate protocol minimum version this node can understand or speak"
531
+ },
532
+ "DelegateMax":{
533
+ "type":"integer",
534
+ "description":"Serf delegate protocol maximum version this node can understand or speak",
535
+ "example":5
536
+ },
537
+ "DelegateCur":{
538
+ "type":"integer",
539
+ "description":"Serf delegate protocol current version this node can understand or speak",
540
+ "example":4
541
+ }
542
+ }
543
+ },
544
+ "execution":{
545
+ "type":"object",
546
+ "description":"An execution represents a timed job run.",
547
+ "properties":{
548
+ "job_name":{
549
+ "type":"string",
550
+ "description":"job name",
551
+ "example":"job_1"
552
+ },
553
+ "started_at":{
554
+ "type":"string",
555
+ "format":"date-time",
556
+ "description":"start time of the execution"
557
+ },
558
+ "finished_at":{
559
+ "type":"string",
560
+ "format":"date-time",
561
+ "description":"when the execution finished running"
562
+ },
563
+ "success":{
564
+ "type":"boolean",
565
+ "description":"the execution run successfuly"
566
+ },
567
+ "output":{
568
+ "type":"string",
569
+ "description":"partial output of the command execution",
570
+ "example":"Hello from Dkron"
571
+ },
572
+ "node_name":{
573
+ "type":"string",
574
+ "description":"name of the node that executed the command",
575
+ "example":"dkron1"
576
+ }
577
+ }
578
+ },
579
+ "processors":{
580
+ "type":"object",
581
+ "description":"Processor plugins used to process executions results of this job",
582
+ "additionalProperties":{
583
+ "type":"object",
584
+ "additionalProperties":{
585
+ "type":"string"
586
+ }
587
+ },
588
+ "example":{
589
+ "files":{
590
+ "forward":true
591
+ }
592
+ }
593
+ }
594
+ }
595
+ }
596
+ }
597
+ ```
598
+ 3. Generate new gem with `gem build dkron-ruby.gemspec`
599
+ 4. Publish gem with `gem push [gemfile]`