forked from adamlaska/circleci-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.yml
More file actions
714 lines (681 loc) · 27.8 KB
/
api.yml
File metadata and controls
714 lines (681 loc) · 27.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
me:
try_it: true
url: "/api/v1.1/me"
description: "Provides information about the signed in user."
method: "GET"
response: |
{
"basic_email_prefs" : "smart", // can be "smart", "none" or "all"
"login" : "pbiggar" // your github username
}
projects:
try_it: true
url: "/api/v1.1/projects"
description: "List of all the projects you're following on CircleCI, with build information organized by branch."
method: "GET"
response: |
[ {
"vcs_url": "https://github.com/circleci/mongofinil",
"followed": true, // true if you follow this project in CircleCI
"username": "circleci",
"reponame": "mongofinil",
"branches" : {
"master" : {
"pusher_logins" : [ "pbiggar", "arohner" ], // users who have pushed
"last_non_success" : { // last failed build on this branch
"pushed_at" : "2013-02-12T21:33:14Z",
"vcs_revision" : "1d231626ba1d2838e599c5c598d28e2306ad4e48",
"build_num" : 22,
"outcome" : "failed",
},
"last_success" : { // last successful build on this branch
"pushed_at" : "2012-08-09T03:59:53Z",
"vcs_revision" : "384211bbe72b2a22997116a78788117b3922d570",
"build_num" : 15,
"outcome" : "success",
},
"recent_builds" : [ { // last 5 builds, ordered by pushed_at (decreasing)
"pushed_at" : "2013-02-12T21:33:14Z",
"vcs_revision" : "1d231626ba1d2838e599c5c598d28e2306ad4e48",
"build_num" : 22,
"outcome" : "failed",
}, {
"pushed_at" : "2013-02-11T03:09:54Z",
"vcs_revision" : "0553ba86b35a97e22ead78b0d568f6a7c79b838d",
"build_num" : 21,
"outcome" : "failed",
}, ... ],
"running_builds" : [ ] // currently running builds
}
}
}, ... ]
follow:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/follow"
description: "Follow a new project. CircleCI will then monitor the project for automatic building of commits."
method: "POST"
response: |
{
"followed" : true,
"first_build" : {
"compare" : null,
"previous_successful_build" : null,
"build_parameters" : null,
"oss" : true,
"committer_date" : null,
"body" : null,
"usage_queued_at" : "2016-09-07T13:48:10.825Z",
"fail_reason" : null,
"retry_of" : null,
"reponame" : "testing-circleci",
"ssh_users" : [ ],
"build_url" : "https://circleci.com/gh/circleci/mongofinil/1",
"parallel" : 1,
"failed" : null,
"branch" : "master",
"username" : "circleci",
"author_date" : null,
"why" : "first-build",
"user" : {
"is_user" : true,
"login" : "circleci",
"avatar_url" : "https://avatars.githubusercontent.com/u/6017470?v=3",
"name" : "CircleCI",
"vcs_type" : "github",
"id" : 10101010
},
"vcs_revision" : "b2b5def65bf54091dde02ebb39ef3c54de3ff049",
"vcs_tag" : null,
"build_num" : 1,
"infrastructure_fail" : false,
"committer_email" : null,
"previous" : null,
"status" : "not_running",
"committer_name" : null,
"retries" : null,
"subject" : null,
"vcs_type" : "github",
"timedout" : false,
"dont_build" : null,
"lifecycle" : "not_running",
"no_dependency_cache" : false,
"stop_time" : null,
"ssh_disabled" : false,
"build_time_millis" : null,
"circle_yml" : null,
"messages" : [ ],
"is_first_green_build" : false,
"job_name" : null,
"start_time" : null,
"canceler" : null,
"outcome" : null,
"vcs_url" : "https://github.com/circleci/mongofinil",
"author_name" : null,
"node" : null,
"canceled" : false,
"author_email" : null
}
}
project:
url: "/api/v1.1/project/:vcs-type/:username/:project"
description: "Build summary for each of the last 30 builds for a single git repo, ordered by build_num."
method: "GET"
params:
- {name: "limit", description: "The number of builds to return. Maximum 100, defaults to 30.", example: 20}
- {name: "offset", description: "The API returns builds starting from this offset, defaults to 0.", example: 5}
- {name: "filter", description: "Restricts which builds are returned. Set to \"completed\", \"successful\", \"failed\", \"running\", or defaults to no filter.", example: "completed"}
response: |
[ {
"vcs_url" : "https://github.com/circleci/mongofinil",
"build_url" : "https://circleci.com/gh/circleci/mongofinil/22",
"build_num" : 22,
"branch" : "master",
"vcs_revision" : "1d231626ba1d2838e599c5c598d28e2306ad4e48",
"committer_name" : "Allen Rohner",
"committer_email" : "arohner@gmail.com",
"subject" : "Don't explode when the system clock shifts backwards",
"body" : "", // commit message body
"why" : "github", // short string explaining the reason we built
"dont_build" : null, // reason why we didn't build, if we didn't build
"queued_at" : "2013-02-12T21:33:30Z" // time build was queued
"start_time" : "2013-02-12T21:33:38Z", // time build started running
"stop_time" : "2013-02-12T21:34:01Z", // time build finished running
"build_time_millis" : 23505,
"username" : "circleci",
"reponame" : "mongofinil",
"lifecycle" : "finished", // :queued, :not_run, :not_running, :running or :finished
"outcome" : "failed", // :canceled, :infrastructure_fail, :timedout, :failed, :no_tests or :success
"status" : "failed", // :retried, :canceled, :infrastructure_fail, :timedout, :not_run, :running, :failed, :queued, :not_running, :no_tests, :fixed, :success
"retry_of" : null, // build_num of the build this is a retry of
"previous" : { // previous build
"status" : "failed",
"build_num" : 21
}, ... ]
recent_builds:
try_it: true
url: "/api/v1.1/recent-builds"
description: "Build summary for each of the last 30 recent builds, ordered by build_num."
method: "GET"
params:
- {name: "limit", description: "The number of builds to return. Maximum 100, defaults to 30.", example: 20}
- { name: "offset", description: "The API returns builds starting from this offset, defaults to 0.", example: 5}
response: |
[ {
"vcs_url" : "https://github.com/circleci/mongofinil",
"build_url" : "https://circleci.com/gh/circleci/mongofinil/22",
"build_num" : 22,
"branch" : "master",
"vcs_revision" : "1d231626ba1d2838e599c5c598d28e2306ad4e48",
"committer_name" : "Allen Rohner",
"committer_email" : "arohner@gmail.com",
"subject" : "Don't explode when the system clock shifts backwards",
"body" : "", // commit message body
"why" : "github", // short string explaining the reason we built
"dont_build" : null, // reason why we didn't build, if we didn't build
"queued_at" : "2013-02-12T21:33:30Z" // time build was queued
"start_time" : "2013-02-12T21:33:38Z", // time build started
"stop_time" : "2013-02-12T21:34:01Z", // time build finished
"build_time_millis" : 23505,
"username" : "circleci",
"reponame" : "mongofinil",
"lifecycle" : "finished", // :queued, :not_run, :not_running, :running or :finished
"outcome" : "failed", // :canceled, :infrastructure_fail, :timedout, :failed, :no_tests or :success
"status" : "failed", // :retried, :canceled, :infrastructure_fail, :timedout, :not_run, :running, :failed, :queued, :not_running, :no_tests, :fixed, :success
"retry_of" : null, // build_num of the build this is a retry of
"previous" : { // previous build
"status" : "failed",
"build_num" : 21
}, ... ]
build:
url: "/api/v1.1/project/:vcs-type/:username/:project/:build_num"
description: "Full details for a single job. The response includes all of the fields from the job summary."
method: "GET"
response: |
{
"vcs_url" : "https://github.com/circleci/mongofinil",
"build_url" : "https://circleci.com/gh/circleci/mongofinil/22",
"build_num" : 22,
"branch" : "master",
"vcs_revision" : "1d231626ba1d2838e599c5c598d28e2306ad4e48",
"committer_name" : "Allen Rohner",
"committer_email" : "arohner@gmail.com",
"subject" : "Don't explode when the system clock shifts backwards",
"body" : "", // commit message body
"why" : "github", // short string explaining the reason the build ran
"dont_build" : null, // reason why we didn't build, if we didn't build
"queued_at" : "2013-02-12T21:33:30Z" // time build was queued
"start_time" : "2013-02-12T21:33:38Z", // time build started
"stop_time" : "2013-02-12T21:34:01Z", // time build finished
"build_time_millis" : 23505,
"username" : "circleci",
"reponame" : "mongofinil",
"lifecycle" : "finished", // :queued, :not_run, :not_running, :running or :finished
"outcome" : "success", // :canceled, :infrastructure_fail, :timedout, :failed, :no_tests or :success
"status" : "success", // :retried, :canceled, :infrastructure_fail, :timedout, :not_run, :running, :failed, :queued, :not_running, :no_tests, :fixed, :success
"retry_of" : null, // build_num of the build this is a retry of
"steps" : [ {
"name" : "configure the build",
"actions" : [ {
"bash_command" : null,
"run_time_millis" : 1646,
"start_time" : "2013-02-12T21:33:38Z",
"end_time" : "2013-02-12T21:33:39Z",
"name" : "configure the build",
"exit_code" : null,
"type" : "infrastructure",
"index" : 0,
"status" : "success",
} ] },
"name" : "lein2 deps",
"actions" : [ {
"bash_command" : "lein2 deps",
"run_time_millis" : 7555,
"start_time" : "2013-02-12T21:33:47Z",
"messages" : [ ],
"step" : 1,
"exit_code" : 0,
"end_time" : "2013-02-12T21:33:54Z",
"index" : 0,
"status" : "success",
"type" : "dependencies",
"source" : "inference",
"failed" : null
} ] },
"name" : "lein2 trampoline midje",
"actions" : [ {
"bash_command" : "lein2 trampoline midje",
"run_time_millis" : 2310,
"continue" : null,
"parallel" : true,
"start_time" : "2013-02-12T21:33:59Z",
"name" : "lein2 trampoline midje",
"messages" : [ ],
"step" : 6,
"exit_code" : 1,
"end_time" : "2013-02-12T21:34:01Z",
"index" : 0,
"status" : "failed",
"timedout" : null,
"infrastructure_fail" : null,
"type" : "test",
"source" : "inference",
"failed" : true
} ]
} ],
...
}
artifacts:
url: "/api/v1.1/project/:vcs-type/:username/:project/:build_num/artifacts"
description: "List the artifacts produced by a given build."
method: "GET"
response: |
[ {
"path" : "raw-test-output/go-test-report.xml",
"pretty_path" : "raw-test-output/go-test-report.xml",
"node_index" : 0,
"url" : "https://24-88881093-gh.circle-artifacts.com/0/raw-test-output/go-test-report.xml"
}, {
"path" : "raw-test-output/go-test.out",
"pretty_path" : "raw-test-output/go-test.out",
"node_index" : 0,
"url" : "https://24-88881093-gh.circle-artifacts.com/0/raw-test-output/go-test.out"
} ]
artifacts_latest:
url: "/api/v1.1/project/:vcs-type/:username/:project/latest/artifacts"
description: "List the artifacts produced by the latest build on a given branch."
method: "GET"
params:
- {name: "branch", description: "The branch you would like to look in for the latest build. Returns artifacts for latest build in entire project if omitted.", example: ":branch"}
- {name: "filter", description: "Restricts which builds are returned. Set to \"completed\", \"successful\", \"failed\". Defaults to \"completed\".", example: ":filter"}
response: |
[ {
"path" : "raw-test-output/go-test-report.xml",
"pretty_path" : "raw-test-output/go-test-report.xml",
"node_index" : 0,
"url" : "https://24-88881093-gh.circle-artifacts.com/0/raw-test-output/go-test-report.xml"
}, {
"path" : "raw-test-output/go-test.out",
"pretty_path" : "raw-test-output/go-test.out",
"node_index" : 0,
"url" : "https://24-88881093-gh.circle-artifacts.com/0/raw-test-output/go-test.out"
} ]
retry_build:
url: "/api/v1.1/project/:vcs-type/:username/:project/:build_num/retry"
description: "Retries the build, returns a summary of the new build."
method: "POST"
response: |
{
"vcs_url" : "https://github.com/circleci/mongofinil",
"build_url" : "https://circleci.com/gh/circleci/mongofinil/23",
"build_num" : 23,
"branch" : "master",
"vcs_revision" : "1d231626ba1d2838e599c5c598d28e2306ad4e48",
"committer_name" : "Allen Rohner",
"committer_email" : "arohner@gmail.com",
"subject" : "Don't explode when the system clock shifts backwards",
"body" : "", // commit message body
"why" : "retry", // short string explaining the reason we built
"dont_build" : null, // reason why we didn't build, if we didn't build
"queued_at" : "2013-04-12T21:33:30Z" // time build was queued
"start_time" : "2013-04-12T21:33:38Z", // time build started running
"stop_time" : "2013-04-12T21:34:01Z", // time build finished running
"build_time_millis" : 23505,
"username" : "circleci",
"reponame" : "mongofinil",
"lifecycle" : "queued",
"outcome" : null,
"status" : "queued",
"retry_of" : 22, // build_num of the build this is a retry of
"previous" : { // previous build
"status" : "failed",
"build_num" : 22
}
}
cancel_build:
url: "/api/v1.1/project/:vcs-type/:username/:project/:build_num/cancel"
description: "Cancels the build, returns a summary of the build."
method: "POST"
response: |
{
"vcs_url" : "https://github.com/circleci/mongofinil",
"build_url" : "https://circleci.com/gh/circleci/mongofinil/26",
"build_num" : 26,
"branch" : "master",
"vcs_revision" : "59c9c5ea3e289f2f3b0c94e128267cc0ce2d65c6",
"committer_name" : "Allen Rohner",
"committer_email" : "arohner@gmail.com",
"subject" : "Merge pull request #6 from dlowe/master"
"body" : "le bump", // commit message body
"why" : "retry", // short string explaining the reason we built
"dont_build" : null, // reason why we didn't build, if we didn't build
"queued_at" : "2013-05-24T19:37:59.095Z" // time build was queued
"start_time" : null, // time build started running
"stop_time" : null, // time build finished running
"build_time_millis" : null,
"username" : "circleci",
"reponame" : "mongofinil",
"lifecycle" : "queued",
"outcome" : "canceled",
"status" : "canceled",
"canceled" : true,
"retry_of" : 25, // build_num of the build this is a retry of
"previous" : { // previous build
"status" : "success",
"build_num" : 25
}
}
add_user_ssh:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/:build_num/ssh-users"
method: "POST"
description: |
Only available when using a user API token. If the current user has
permission to build the project, this API adds the current user's SSH
public key to the authorized keys on each container running a build.
This allows them to SSH to the build containers.
response: '{... the build data ... }'
project_build:
url: "/api/v1.1/project/:vcs-type/:username/:project/build"
method: "POST"
description: "Trigger a build of the specified project, by branch, revision, or tag. Workflows will be run or scheduled in the same way as when a webhook from source control is received."
body: '{"branch":"staging"}'
params:
- {name: "branch", description: "The branch to build. Cannot be used with tag parameter."}
- {name: "revision", description: "The specific revision to build. If not specified, the HEAD of the branch is used. Cannot be used with tag parameter.", note: "Branch and revision can either be used separately or together. If they are used together, the revision is built but the branch is used to display the correct branch on the job page."}
- {name: "tag", description: "The git tag to build. Cannot be used with branch and revision parameters."}
response: |
{
"status": 200,
"body": "Build created"
}
project_branch:
url: "/api/v1.1/project/:vcs-type/:username/:project/tree/:branch"
description: "Triggers a new build, returns a summary of the build."
method: "POST"
params:
- {name: "parallel", description: "The number of containers to use to run the build. Default is null and the project default is used.", example: 4}
- {name: "revision", description: "The specific revision to build. Default is null and the head of the branch is used", example: "f1baeb913288519dd9a942499cef2873f5b1c2bf"}
- {name: "build_parameters", description: "Additional environment variables to inject into the execution environment. A map of names to values.", example: "{\"JAVA_OPTS\": \"+Xms128m\"}"}
body: |
{
"parallel": 2, //optional, default null
"revision": "f1baeb913288519dd9a942499cef2873f5b1c2bf" // optional
"build_parameters": { // optional
"RUN_EXTRA_TESTS": "true"
}
}
response: |
{
"author_name": "Allen Rohner",
"build_url": "https://circleci.com/gh/circleci/mongofinil/54",
"reponame": "mongofinil",
"failed": null,
"infrastructure_fail": false,
"canceled": false,
"all_commit_details": [
{
"author_name": "Allen Rohner",
"commit": "f1baeb913288519dd9a942499cef2873f5b1c2bf",
"author_login": "arohner",
"committer_login": "arohner",
"committer_name": "Allen Rohner",
"body": "Minor version bump",
"author_date": "2014-04-17T08:41:40Z",
"committer_date": "2014-04-17T08:41:40Z",
"commit_url": "https://github.com/circleci/mongofinil/commit/f1baeb913288519dd9a942499cef2873f5b1c2bf",
"committer_email": "arohner@gmail.com",
"author_email": "arohner@gmail.com",
"subject": "Merge pull request #15 from circleci/minor-version-bump"
}
],
"previous": {
"build_num": 53,
"status": "success",
"build_time_millis": 55413
},
"ssh_enabled": null,
"author_email": "arohner@gmail.com",
"why": "edit",
"build_time_millis": null,
"committer_email": "arohner@gmail.com",
"parallel": 2,
"retries": null,
"compare": null,
"dont_build": null,
"committer_name": "Allen Rohner",
"usage_queued_at": "2014-04-29T12:56:55.338Z",
"branch": "master",
"body": "Minor version bump",
"author_date": "2014-04-17T08:41:40Z",
"node": null,
"committer_date": "2014-04-17T08:41:40Z",
"start_time": null,
"stop_time": null,
"lifecycle": "not_running", // :queued, :not_run, :not_running, :running or :finished
"user": {
"email": "arohner@gmail.com",
"name": "Allen Rohner",
"login": "arohner",
"is_user": true
},
"subject": "Merge pull request #15 from circleci/minor-version-bump",
"messages": [],
"job_name": null,
"retry_of": null,
"previous_successful_build": {
"build_num": 53,
"status": "success",
"build_time_millis": 55413
},
"outcome": null,
"status": "not_running",
"vcs_revision": "f1baeb913288519dd9a942499cef2873f5b1c2bf",
"build_num": 54,
"username": "circleci",
"vcs_url": "https://github.com/circleci/mongofinil",
"timedout": false
}
user_ssh-key:
url: "/api/v1.1/user/ssh-key"
method: "POST"
description: "Adds a CircleCI key to your GitHub User account."
list_environment_variables:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/envvar"
method: "GET"
description: "Returns four 'x' characters plus the last four ASCII characters of the value, consistent with the display of environment variable values in the CircleCI website."
response: '[{"name":"foo","value":"xxxx1234"}]'
add_environment_variable:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/envvar"
method: "POST"
description: "Creates a new environment variable"
body: '{"name":"foo", "value":"bar"}'
response: '{"name":"foo","value":"xxxx"}'
get_environment_variable:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/envvar/:name"
method: "GET"
description: "Gets the hidden value of environment variable :name"
response: '{"name":"foo","value":"xxxx"}'
delete_environment_variable:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/envvar/:name"
method: "DELETE"
description: "Deletes the environment variable named ':name'"
response: '{"message":"ok"}'
list_checkout_keys:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/checkout-key"
method: "GET"
description: "Lists the checkout keys for :project"
response: |
[{"public_key": "ssh-rsa...",
"type": "deploy-key", // can be "deploy-key" or "github-user-key"
"fingerprint": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
"preferred": true,
"time" : "2015-09-21T17:29:21.042Z" // when the key was issued
}]
new_checkout_key:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/checkout-key"
method: "POST"
description: "Creates a new checkout key. Only usable with a user API token."
body: '{"type":"github-user-key"}'
params:
- {name: "type", description: "The type of key to create. Can be 'deploy-key' or 'github-user-key'.", example: "github-user-key"}
response: |
{"public_key": "ssh-rsa...",
"type": "deploy-key", // can be "deploy-key" or "user-key"
"fingerprint": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
"preferred": true,
"time" : "2015-09-21T17:29:21.042Z" // when the key was issued
}
get_checkout_key:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/checkout-key/:fingerprint"
method: "GET"
description: "Gets the checkout key"
response: |
{"public_key": "ssh-rsa...",
"type": "deploy-key", // can be "deploy-key" or "user-key"
"fingerprint": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
"preferred": true,
"time" : "2015-09-21T17:29:21.042Z" // when the key was issued
}
delete_checkout_key:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/checkout-key/:fingerprint"
method: "DELETE"
description: "Deletes the checkout key"
response: '{"message":"ok"}'
test_metadata:
try_it: false
url: "/api/v1.1/project/:vcs-type/:username/:project/:build_num/tests"
description: "Provides test metadata for a build"
method: "GET"
response: |
{
"tests" : [ {
"message" : "",
"file" : "features/desktop/invitations.feature",
"source" : "cucumber",
"run_time" : 2.957513661,
"result" : "success",
"name" : "Accepting an invitation",
"classname" : "Invitations"
}, {
"message" : null,
"file" : "spec/lib/webfinger_spec.rb",
"source" : "rspec",
"run_time" : 0.011366,
"result" : "success",
"name" : "Webfinger#intialize sets account ",
"classname" : "spec.lib.webfinger_spec"
} ]
}
ssh_key:
url: "/api/v1.1/project/:vcs-type/:username/:project/ssh-key"
description: "Creates an ssh key that will be used to access the external system identified by the hostname parameter for SSH key-based authentication."
method: "POST"
body: '{"hostname":"hostname","private_key":"RSA private key"}'
response: " "
delete_ssh_key:
url: "/api/v1.1/project/:vcs-type/:username/:project/ssh-key"
description: "Delete an ssh key that will be used to access the external system identified by fingerprint. Hostname is optional."
method: "DELETE"
body: '{"fingerprint":"Fingerprint", "hostname":"Hostname"}'
response: " "
project_post:
url: "/api/v1.1/project/:vcs-type/:username/:project"
description: "Triggers a new build, returns a summary of the build."
method: "POST"
params:
- {name: "revision", description: "The specific revision to build. Default is null and the head of the branch is used. Cannot be used with tag parameter.", example: "f1baeb913288519dd9a942499cef2873f5b1c2bf"}
- {name: "tag", description: "The tag to build. Default is null. Cannot be used with revision parameter.", example: "f1baeb913288519dd9a942499cef2873f5b1c2bf"}
- {name: "parallel", description: "The number of containers to use to run the build. Default is null and the project default is used. This parameter is ignored for builds running on our 2.0 infrastructure.", example: 4}
- {name: "build_parameters", description: "Additional environment variables to inject into the execution environment. A map of names to values.", example: "{\"JAVA_OPTS\": \"+Xms128m\"}"}
body: |
{
"tag": "v0.1", // optional
"parallel": 2, //optional, default null
"build_parameters": { // optional
"RUN_EXTRA_TESTS": "true"
}
}
response: |
{
"author_name": "Allen Rohner",
"build_url": "https://circleci.com/gh/circleci/mongofinil/54",
"reponame": "mongofinil",
"failed": null,
"infrastructure_fail": false,
"canceled": false,
"all_commit_details": [{
"author_name": "Allen Rohner",
"commit": "f1baeb913288519dd9a942499cef2873f5b1c2bf",
"author_login": "arohner",
"committer_login": "arohner",
"committer_name": "Allen Rohner",
"body": "Minor version bump",
"author_date": "2014-04-17T08:41:40Z",
"committer_date": "2014-04-17T08:41:40Z",
"commit_url": "https://github.com/circleci/mongofinil/commit/f1baeb913288519dd9a942499cef2873f5b1c2bf",
"committer_email": "arohner@gmail.com",
"author_email": "arohner@gmail.com",
"subject": "Merge pull request #15 from circleci/minor-version-bump"
}],
"previous": {
"build_num": 53,
"status": "success",
"build_time_millis": 55413
},
"ssh_enabled": null,
"author_email": "arohner@gmail.com",
"why": "edit",
"build_time_millis": null,
"committer_email": "arohner@gmail.com",
"parallel": 2,
"retries": null,
"compare": null,
"dont_build": null,
"committer_name": "Allen Rohner",
"usage_queued_at": "2014-04-29T12:56:55.338Z",
"branch": "master",
"body": "Minor version bump",
"author_date": "2014-04-17T08:41:40Z",
"node": null,
"committer_date": "2014-04-17T08:41:40Z",
"start_time": null,
"stop_time": null,
"lifecycle": "not_running",
"user": {
"email": "arohner@gmail.com",
"name": "Allen Rohner",
"login": "arohner",
"is_user": true
},
"subject": "Merge pull request #15 from circleci/minor-version-bump",
"messages": [],
"job_name": null,
"retry_of": null,
"previous_successful_build": {
"build_num": 53,
"status": "success",
"build_time_millis": 55413
},
"outcome": null,
"status": "not_running",
"vcs_revision": "f1baeb913288519dd9a942499cef2873f5b1c2bf",
"vcs_tag": "v0.1",
"build_num": 54,
"username": "circleci",
"vcs_url": "https://github.com/circleci/mongofinil",
"timedout": false
}
heroku_key:
url: "/user/heroku-key"
description: "Adds your Heroku API key to CircleCI"
method: "POST"
body: '{"apikey":"Heroku key"}'
response: " "