-
Notifications
You must be signed in to change notification settings - Fork 250
/
services.go
2397 lines (2395 loc) · 110 KB
/
services.go
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
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by `go generate ./apis`; DO NOT EDIT
//
//go:generate go run ../codegen/cmd/gen-services
package apis
import "github.com/taskcluster/taskcluster/v57/clients/client-shell/apis/definitions"
var services = map[string]definitions.Service{
"Auth": definitions.Service{
APIVersion: "v1",
ServiceName: "auth",
Title: "Auth Service",
Description: "Authentication related API end-points for Taskcluster and related\nservices. These API end-points are of interest if you wish to:\n * Authorize a request signed with Taskcluster credentials,\n * Manage clients and roles,\n * Inspect or audit clients and roles,\n * Gain access to various services guarded by this API.\n",
Entries: []definitions.Entry{
definitions.Entry{
Name: "ping",
Title: "Ping Server",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/ping",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "lbheartbeat",
Title: "Load Balancer Heartbeat",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/__lbheartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "version",
Title: "Taskcluster Version",
Description: "Respond with the JSON version object.\nhttps://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md",
Stability: "stable",
Method: "get",
Route: "/__version__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "listClients",
Title: "List Clients",
Description: "Get a list of all clients. With `prefix`, only clients for which\nit is a prefix of the clientId are returned.\n\nBy default this end-point will try to return up to 1000 clients in one\nrequest. But it **may return less, even none**.\nIt may also return a `continuationToken` even though there are no more\nresults. However, you can only be sure to have seen all results if you\nkeep calling `listClients` with the last `continuationToken` until you\nget a result without a `continuationToken`.",
Stability: "stable",
Method: "get",
Route: "/clients/",
Args: []string{},
Query: []string{
"prefix",
"continuationToken",
"limit",
},
Input: "",
},
definitions.Entry{
Name: "client",
Title: "Get Client",
Description: "Get information about a single client.",
Stability: "stable",
Method: "get",
Route: "/clients/<clientId>",
Args: []string{
"clientId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "createClient",
Title: "Create Client",
Description: "Create a new client and get the `accessToken` for this client.\nYou should store the `accessToken` from this API call as there is no\nother way to retrieve it.\n\nIf you loose the `accessToken` you can call `resetAccessToken` to reset\nit, and a new `accessToken` will be returned, but you cannot retrieve the\ncurrent `accessToken`.\n\nIf a client with the same `clientId` already exists this operation will\nfail. Use `updateClient` if you wish to update an existing client.\n\nThe caller's scopes must satisfy `scopes`.",
Stability: "stable",
Method: "put",
Route: "/clients/<clientId>",
Args: []string{
"clientId",
},
Query: []string{},
Input: "v1/create-client-request.json#",
},
definitions.Entry{
Name: "resetAccessToken",
Title: "Reset `accessToken`",
Description: "Reset a clients `accessToken`, this will revoke the existing\n`accessToken`, generate a new `accessToken` and return it from this\ncall.\n\nThere is no way to retrieve an existing `accessToken`, so if you loose it\nyou must reset the accessToken to acquire it again.",
Stability: "stable",
Method: "post",
Route: "/clients/<clientId>/reset",
Args: []string{
"clientId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "updateClient",
Title: "Update Client",
Description: "Update an exisiting client. The `clientId` and `accessToken` cannot be\nupdated, but `scopes` can be modified. The caller's scopes must\nsatisfy all scopes being added to the client in the update operation.\nIf no scopes are given in the request, the client's scopes remain\nunchanged",
Stability: "stable",
Method: "post",
Route: "/clients/<clientId>",
Args: []string{
"clientId",
},
Query: []string{},
Input: "v1/create-client-request.json#",
},
definitions.Entry{
Name: "enableClient",
Title: "Enable Client",
Description: "Enable a client that was disabled with `disableClient`. If the client\nis already enabled, this does nothing.\n\nThis is typically used by identity providers to re-enable clients that\nhad been disabled when the corresponding identity's scopes changed.",
Stability: "stable",
Method: "post",
Route: "/clients/<clientId>/enable",
Args: []string{
"clientId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "disableClient",
Title: "Disable Client",
Description: "Disable a client. If the client is already disabled, this does nothing.\n\nThis is typically used by identity providers to disable clients when the\ncorresponding identity's scopes no longer satisfy the client's scopes.",
Stability: "stable",
Method: "post",
Route: "/clients/<clientId>/disable",
Args: []string{
"clientId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "deleteClient",
Title: "Delete Client",
Description: "Delete a client, please note that any roles related to this client must\nbe deleted independently.",
Stability: "stable",
Method: "delete",
Route: "/clients/<clientId>",
Args: []string{
"clientId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "listRoles",
Title: "List Roles (no pagination)",
Description: "Get a list of all roles. Each role object also includes the list of\nscopes it expands to. This always returns all roles in a single HTTP\nrequest.\n\nTo get paginated results, use `listRoles2`.",
Stability: "stable",
Method: "get",
Route: "/roles/",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "listRoles2",
Title: "List Roles",
Description: "Get a list of all roles. Each role object also includes the list of\nscopes it expands to. This is similar to `listRoles` but differs in the\nformat of the response.\n\nIf no limit is given, all roles are returned. Since this\nlist may become long, callers can use the `limit` and `continuationToken`\nquery arguments to page through the responses.",
Stability: "stable",
Method: "get",
Route: "/roles2/",
Args: []string{},
Query: []string{
"continuationToken",
"limit",
},
Input: "",
},
definitions.Entry{
Name: "listRoleIds",
Title: "List Role IDs",
Description: "Get a list of all role IDs.\n\nIf no limit is given, the roleIds of all roles are returned. Since this\nlist may become long, callers can use the `limit` and `continuationToken`\nquery arguments to page through the responses.",
Stability: "stable",
Method: "get",
Route: "/roleids/",
Args: []string{},
Query: []string{
"continuationToken",
"limit",
},
Input: "",
},
definitions.Entry{
Name: "role",
Title: "Get Role",
Description: "Get information about a single role, including the set of scopes that the\nrole expands to.",
Stability: "stable",
Method: "get",
Route: "/roles/<roleId>",
Args: []string{
"roleId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "createRole",
Title: "Create Role",
Description: "Create a new role.\n\nThe caller's scopes must satisfy the new role's scopes.\n\nIf there already exists a role with the same `roleId` this operation\nwill fail. Use `updateRole` to modify an existing role.\n\nCreation of a role that will generate an infinite expansion will result\nin an error response.",
Stability: "stable",
Method: "put",
Route: "/roles/<roleId>",
Args: []string{
"roleId",
},
Query: []string{},
Input: "v1/create-role-request.json#",
},
definitions.Entry{
Name: "updateRole",
Title: "Update Role",
Description: "Update an existing role.\n\nThe caller's scopes must satisfy all of the new scopes being added, but\nneed not satisfy all of the role's existing scopes.\n\nAn update of a role that will generate an infinite expansion will result\nin an error response.",
Stability: "stable",
Method: "post",
Route: "/roles/<roleId>",
Args: []string{
"roleId",
},
Query: []string{},
Input: "v1/create-role-request.json#",
},
definitions.Entry{
Name: "deleteRole",
Title: "Delete Role",
Description: "Delete a role. This operation will succeed regardless of whether or not\nthe role exists.",
Stability: "stable",
Method: "delete",
Route: "/roles/<roleId>",
Args: []string{
"roleId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "expandScopes",
Title: "Expand Scopes",
Description: "Return an expanded copy of the given scopeset, with scopes implied by any\nroles included.",
Stability: "stable",
Method: "post",
Route: "/scopes/expand",
Args: []string{},
Query: []string{},
Input: "v1/scopeset.json#",
},
definitions.Entry{
Name: "currentScopes",
Title: "Get Current Scopes",
Description: "Return the expanded scopes available in the request, taking into account all sources\nof scopes and scope restrictions (temporary credentials, assumeScopes, client scopes,\nand roles).",
Stability: "stable",
Method: "get",
Route: "/scopes/current",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "awsS3Credentials",
Title: "Get Temporary Read/Write Credentials S3",
Description: "Get temporary AWS credentials for `read-write` or `read-only` access to\na given `bucket` and `prefix` within that bucket.\nThe `level` parameter can be `read-write` or `read-only` and determines\nwhich type of credentials are returned. Please note that the `level`\nparameter is required in the scope guarding access. The bucket name must\nnot contain `.`, as recommended by Amazon.\n\nThis method can only allow access to a whitelisted set of buckets, as configured\nin the Taskcluster deployment\n\nThe credentials are set to expire after an hour, but this behavior is\nsubject to change. Hence, you should always read the `expires` property\nfrom the response, if you intend to maintain active credentials in your\napplication.\n\nPlease note that your `prefix` may not start with slash `/`. Such a prefix\nis allowed on S3, but we forbid it here to discourage bad behavior.\n\nAlso note that if your `prefix` doesn't end in a slash `/`, the STS\ncredentials may allow access to unexpected keys, as S3 does not treat\nslashes specially. For example, a prefix of `my-folder` will allow\naccess to `my-folder/file.txt` as expected, but also to `my-folder.txt`,\nwhich may not be intended.\n\nFinally, note that the `PutObjectAcl` call is not allowed. Passing a canned\nACL other than `private` to `PutObject` is treated as a `PutObjectAcl` call, and\nwill result in an access-denied error from AWS. This limitation is due to a\nsecurity flaw in Amazon S3 which might otherwise allow indefinite access to\nuploaded objects.\n\n**EC2 metadata compatibility**, if the querystring parameter\n`?format=iam-role-compat` is given, the response will be compatible\nwith the JSON exposed by the EC2 metadata service. This aims to ease\ncompatibility for libraries and tools built to auto-refresh credentials.\nFor details on the format returned by EC2 metadata service see:\n[EC2 User Guide](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#instance-metadata-security-credentials).",
Stability: "stable",
Method: "get",
Route: "/aws/s3/<level>/<bucket>/<prefix>",
Args: []string{
"level",
"bucket",
"prefix",
},
Query: []string{
"format",
},
Input: "",
},
definitions.Entry{
Name: "azureAccounts",
Title: "List Accounts Managed by Auth",
Description: "Retrieve a list of all Azure accounts managed by Taskcluster Auth.",
Stability: "deprecated",
Method: "get",
Route: "/azure/accounts",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "azureTables",
Title: "List Tables in an Account Managed by Auth",
Description: "Retrieve a list of all tables in an account.",
Stability: "deprecated",
Method: "get",
Route: "/azure/<account>/tables",
Args: []string{
"account",
},
Query: []string{
"continuationToken",
},
Input: "",
},
definitions.Entry{
Name: "azureTableSAS",
Title: "Get Shared-Access-Signature for Azure Table",
Description: "Get a shared access signature (SAS) string for use with a specific Azure\nTable Storage table.\n\nThe `level` parameter can be `read-write` or `read-only` and determines\nwhich type of credentials are returned. If level is read-write, it will create the\ntable if it doesn't already exist.",
Stability: "deprecated",
Method: "get",
Route: "/azure/<account>/table/<table>/<level>",
Args: []string{
"account",
"table",
"level",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "azureContainers",
Title: "List containers in an Account Managed by Auth",
Description: "Retrieve a list of all containers in an account.",
Stability: "deprecated",
Method: "get",
Route: "/azure/<account>/containers",
Args: []string{
"account",
},
Query: []string{
"continuationToken",
},
Input: "",
},
definitions.Entry{
Name: "azureContainerSAS",
Title: "Get Shared-Access-Signature for Azure Container",
Description: "Get a shared access signature (SAS) string for use with a specific Azure\nBlob Storage container.\n\nThe `level` parameter can be `read-write` or `read-only` and determines\nwhich type of credentials are returned. If level is read-write, it will create the\ncontainer if it doesn't already exist.",
Stability: "deprecated",
Method: "get",
Route: "/azure/<account>/containers/<container>/<level>",
Args: []string{
"account",
"container",
"level",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "sentryDSN",
Title: "Get DSN for Sentry Project",
Description: "Get temporary DSN (access credentials) for a sentry project.\nThe credentials returned can be used with any Sentry client for up to\n24 hours, after which the credentials will be automatically disabled.\n\nIf the project doesn't exist it will be created, and assigned to the\ninitial team configured for this component. Contact a Sentry admin\nto have the project transferred to a team you have access to if needed",
Stability: "stable",
Method: "get",
Route: "/sentry/<project>/dsn",
Args: []string{
"project",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "websocktunnelToken",
Title: "Get a client token for the Websocktunnel service",
Description: "Get a temporary token suitable for use connecting to a\n[websocktunnel](https://github.com/taskcluster/taskcluster/tree/main/tools/websocktunnel) server.\n\nThe resulting token will only be accepted by servers with a matching audience\nvalue. Reaching such a server is the callers responsibility. In general,\na server URL or set of URLs should be provided to the caller as configuration\nalong with the audience value.\n\nThe token is valid for a limited time (on the scale of hours). Callers should\nrefresh it before expiration.",
Stability: "stable",
Method: "get",
Route: "/websocktunnel/<wstAudience>/<wstClient>",
Args: []string{
"wstAudience",
"wstClient",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "gcpCredentials",
Title: "Get Temporary GCP Credentials",
Description: "Get temporary GCP credentials for the given serviceAccount in the given project.\n\nOnly preconfigured projects and serviceAccounts are allowed, as defined in the\ndeployment of the Taskcluster services.\n\nThe credentials are set to expire after an hour, but this behavior is\nsubject to change. Hence, you should always read the `expires` property\nfrom the response, if you intend to maintain active credentials in your\napplication.",
Stability: "stable",
Method: "get",
Route: "/gcp/credentials/<projectId>/<serviceAccount>",
Args: []string{
"projectId",
"serviceAccount",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "authenticateHawk",
Title: "Authenticate Hawk Request",
Description: "Validate the request signature given on input and return list of scopes\nthat the authenticating client has.\n\nThis method is used by other services that wish rely on Taskcluster\ncredentials for authentication. This way we can use Hawk without having\nthe secret credentials leave this service.",
Stability: "stable",
Method: "post",
Route: "/authenticate-hawk",
Args: []string{},
Query: []string{},
Input: "v1/authenticate-hawk-request.json#",
},
definitions.Entry{
Name: "testAuthenticate",
Title: "Test Authentication",
Description: "Utility method to test client implementations of Taskcluster\nauthentication.\n\nRather than using real credentials, this endpoint accepts requests with\nclientId `tester` and accessToken `no-secret`. That client's scopes are\nbased on `clientScopes` in the request body.\n\nThe request is validated, with any certificate, authorizedScopes, etc.\napplied, and the resulting scopes are checked against `requiredScopes`\nfrom the request body. On success, the response contains the clientId\nand scopes as seen by the API method.",
Stability: "stable",
Method: "post",
Route: "/test-authenticate",
Args: []string{},
Query: []string{},
Input: "v1/test-authenticate-request.json#",
},
definitions.Entry{
Name: "testAuthenticateGet",
Title: "Test Authentication (GET)",
Description: "Utility method similar to `testAuthenticate`, but with the GET method,\nso it can be used with signed URLs (bewits).\n\nRather than using real credentials, this endpoint accepts requests with\nclientId `tester` and accessToken `no-secret`. That client's scopes are\n`['test:*', 'auth:create-client:test:*']`. The call fails if the\n`test:authenticate-get` scope is not available.\n\nThe request is validated, with any certificate, authorizedScopes, etc.\napplied, and the resulting scopes are checked, just like any API call.\nOn success, the response contains the clientId and scopes as seen by\nthe API method.\n\nThis method may later be extended to allow specification of client and\nrequired scopes via query arguments.",
Stability: "stable",
Method: "get",
Route: "/test-authenticate-get/",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "heartbeat",
Title: "Heartbeat",
Description: "Respond with a service heartbeat.\n\nThis endpoint is used to check on backing services this service\ndepends on.",
Stability: "stable",
Method: "get",
Route: "/__heartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
},
},
"Github": definitions.Service{
APIVersion: "v1",
ServiceName: "github",
Title: "GitHub Service",
Description: "The github service is responsible for creating tasks in response\nto GitHub events, and posting results to the GitHub UI.\n\nThis document describes the API end-point for consuming GitHub\nweb hooks, as well as some useful consumer APIs.\n\nWhen Github forbids an action, this service returns an HTTP 403\nwith code ForbiddenByGithub.",
Entries: []definitions.Entry{
definitions.Entry{
Name: "ping",
Title: "Ping Server",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/ping",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "lbheartbeat",
Title: "Load Balancer Heartbeat",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/__lbheartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "version",
Title: "Taskcluster Version",
Description: "Respond with the JSON version object.\nhttps://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md",
Stability: "stable",
Method: "get",
Route: "/__version__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "githubWebHookConsumer",
Title: "Consume GitHub WebHook",
Description: "Capture a GitHub event and publish it via pulse, if it's a push,\nrelease, check run or pull request.",
Stability: "stable",
Method: "post",
Route: "/github",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "builds",
Title: "List of Builds",
Description: "A paginated list of builds that have been run in\nTaskcluster. Can be filtered on various git-specific\nfields.",
Stability: "stable",
Method: "get",
Route: "/builds",
Args: []string{},
Query: []string{
"continuationToken",
"limit",
"organization",
"repository",
"sha",
"pullRequest",
},
Input: "",
},
definitions.Entry{
Name: "cancelBuilds",
Title: "Cancel repository builds",
Description: "Cancel all running Task Groups associated with given repository and sha or pullRequest number",
Stability: "stable",
Method: "post",
Route: "/builds/<owner>/<repo>/cancel",
Args: []string{
"owner",
"repo",
},
Query: []string{
"sha",
"pullRequest",
},
Input: "",
},
definitions.Entry{
Name: "badge",
Title: "Latest Build Status Badge",
Description: "Checks the status of the latest build of a given branch\nand returns corresponding badge svg.",
Stability: "experimental",
Method: "get",
Route: "/repository/<owner>/<repo>/<branch>/badge.svg",
Args: []string{
"owner",
"repo",
"branch",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "repository",
Title: "Get Repository Info",
Description: "Returns any repository metadata that is\nuseful within Taskcluster related services.",
Stability: "experimental",
Method: "get",
Route: "/repository/<owner>/<repo>",
Args: []string{
"owner",
"repo",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "latest",
Title: "Latest Status for Branch",
Description: "For a given branch of a repository, this will always point\nto a status page for the most recent task triggered by that\nbranch.\n\nNote: This is a redirect rather than a direct link.",
Stability: "stable",
Method: "get",
Route: "/repository/<owner>/<repo>/<branch>/latest",
Args: []string{
"owner",
"repo",
"branch",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "createStatus",
Title: "Post a status against a given changeset",
Description: "For a given changeset (SHA) of a repository, this will attach a \"commit status\"\non github. These statuses are links displayed next to each revision.\nThe status is either OK (green check) or FAILURE (red cross),\nmade of a custom title and link.",
Stability: "experimental",
Method: "post",
Route: "/repository/<owner>/<repo>/statuses/<sha>",
Args: []string{
"owner",
"repo",
"sha",
},
Query: []string{},
Input: "v1/create-status.json#",
},
definitions.Entry{
Name: "createComment",
Title: "Post a comment on a given GitHub Issue or Pull Request",
Description: "For a given Issue or Pull Request of a repository, this will write a new message.",
Stability: "stable",
Method: "post",
Route: "/repository/<owner>/<repo>/issues/<number>/comments",
Args: []string{
"owner",
"repo",
"number",
},
Query: []string{},
Input: "v1/create-comment.json#",
},
definitions.Entry{
Name: "renderTaskclusterYml",
Title: "Render .taskcluster.yml file",
Description: "This endpoint allows to render the .taskcluster.yml file for a given event or payload.\nThis is useful to preview the result of the .taskcluster.yml file before pushing it to\nthe repository.\nRead more about the .taskcluster.yml file in the [documentation](https://docs.taskcluster.net/docs/reference/integrations/github/taskcluster-yml-v1)",
Stability: "experimental",
Method: "post",
Route: "/taskcluster-yml",
Args: []string{},
Query: []string{},
Input: "v1/render-taskcluster-yml-input.json#",
},
definitions.Entry{
Name: "heartbeat",
Title: "Heartbeat",
Description: "Respond with a service heartbeat.\n\nThis endpoint is used to check on backing services this service\ndepends on.",
Stability: "stable",
Method: "get",
Route: "/__heartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
},
},
"Hooks": definitions.Service{
APIVersion: "v1",
ServiceName: "hooks",
Title: "Hooks Service",
Description: "The hooks service provides a mechanism for creating tasks in response to events.\n",
Entries: []definitions.Entry{
definitions.Entry{
Name: "ping",
Title: "Ping Server",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/ping",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "lbheartbeat",
Title: "Load Balancer Heartbeat",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/__lbheartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "version",
Title: "Taskcluster Version",
Description: "Respond with the JSON version object.\nhttps://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md",
Stability: "stable",
Method: "get",
Route: "/__version__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "listHookGroups",
Title: "List hook groups",
Description: "This endpoint will return a list of all hook groups with at least one hook.",
Stability: "stable",
Method: "get",
Route: "/hooks",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "listHooks",
Title: "List hooks in a given group",
Description: "This endpoint will return a list of all the hook definitions within a\ngiven hook group.",
Stability: "stable",
Method: "get",
Route: "/hooks/<hookGroupId>",
Args: []string{
"hookGroupId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "hook",
Title: "Get hook definition",
Description: "This endpoint will return the hook definition for the given `hookGroupId`\nand hookId.",
Stability: "stable",
Method: "get",
Route: "/hooks/<hookGroupId>/<hookId>",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "getHookStatus",
Title: "Get hook status",
Description: "This endpoint will return the current status of the hook. This represents a\nsnapshot in time and may vary from one call to the next.\n\nThis method is deprecated in favor of listLastFires.",
Stability: "deprecated",
Method: "get",
Route: "/hooks/<hookGroupId>/<hookId>/status",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "createHook",
Title: "Create a hook",
Description: "This endpoint will create a new hook.\n\nThe caller's credentials must include the role that will be used to\ncreate the task. That role must satisfy task.scopes as well as the\nnecessary scopes to add the task to the queue.",
Stability: "stable",
Method: "put",
Route: "/hooks/<hookGroupId>/<hookId>",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "v1/create-hook-request.json#",
},
definitions.Entry{
Name: "updateHook",
Title: "Update a hook",
Description: "This endpoint will update an existing hook. All fields except\n`hookGroupId` and `hookId` can be modified.",
Stability: "stable",
Method: "post",
Route: "/hooks/<hookGroupId>/<hookId>",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "v1/create-hook-request.json#",
},
definitions.Entry{
Name: "removeHook",
Title: "Delete a hook",
Description: "This endpoint will remove a hook definition.",
Stability: "stable",
Method: "delete",
Route: "/hooks/<hookGroupId>/<hookId>",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "triggerHook",
Title: "Trigger a hook",
Description: "This endpoint will trigger the creation of a task from a hook definition.\n\nThe HTTP payload must match the hooks `triggerSchema`. If it does, it is\nprovided as the `payload` property of the JSON-e context used to render the\ntask template.",
Stability: "stable",
Method: "post",
Route: "/hooks/<hookGroupId>/<hookId>/trigger",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "v1/trigger-hook.json#",
},
definitions.Entry{
Name: "getTriggerToken",
Title: "Get a trigger token",
Description: "Retrieve a unique secret token for triggering the specified hook. This\ntoken can be deactivated with `resetTriggerToken`.",
Stability: "stable",
Method: "get",
Route: "/hooks/<hookGroupId>/<hookId>/token",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "resetTriggerToken",
Title: "Reset a trigger token",
Description: "Reset the token for triggering a given hook. This invalidates token that\nmay have been issued via getTriggerToken with a new token.",
Stability: "stable",
Method: "post",
Route: "/hooks/<hookGroupId>/<hookId>/token",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "triggerHookWithToken",
Title: "Trigger a hook with a token",
Description: "This endpoint triggers a defined hook with a valid token.\n\nThe HTTP payload must match the hooks `triggerSchema`. If it does, it is\nprovided as the `payload` property of the JSON-e context used to render the\ntask template.",
Stability: "stable",
Method: "post",
Route: "/hooks/<hookGroupId>/<hookId>/trigger/<token>",
Args: []string{
"hookGroupId",
"hookId",
"token",
},
Query: []string{},
Input: "v1/trigger-hook.json#",
},
definitions.Entry{
Name: "listLastFires",
Title: "Get information about recent hook fires",
Description: "This endpoint will return information about the the last few times this hook has been\nfired, including whether the hook was fired successfully or not\n\nBy default this endpoint will return up to 1000 most recent fires in one request.",
Stability: "stable",
Method: "get",
Route: "/hooks/<hookGroupId>/<hookId>/last-fires",
Args: []string{
"hookGroupId",
"hookId",
},
Query: []string{
"continuationToken",
"limit",
},
Input: "",
},
definitions.Entry{
Name: "heartbeat",
Title: "Heartbeat",
Description: "Respond with a service heartbeat.\n\nThis endpoint is used to check on backing services this service\ndepends on.",
Stability: "stable",
Method: "get",
Route: "/__heartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
},
},
"Index": definitions.Service{
APIVersion: "v1",
ServiceName: "index",
Title: "Index Service",
Description: "The index service is responsible for indexing tasks. The service ensures that\ntasks can be located by user-defined names.\n\nAs described in the service documentation, tasks are typically indexed via Pulse\nmessages, so the most common use of API methods is to read from the index.\n\nSlashes (`/`) aren't allowed in index paths.",
Entries: []definitions.Entry{
definitions.Entry{
Name: "ping",
Title: "Ping Server",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/ping",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "lbheartbeat",
Title: "Load Balancer Heartbeat",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/__lbheartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "version",
Title: "Taskcluster Version",
Description: "Respond with the JSON version object.\nhttps://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md",
Stability: "stable",
Method: "get",
Route: "/__version__",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "findTask",
Title: "Find Indexed Task",
Description: "Find a task by index path, returning the highest-rank task with that path. If no\ntask exists for the given path, this API end-point will respond with a 404 status.",
Stability: "stable",
Method: "get",
Route: "/task/<indexPath>",
Args: []string{
"indexPath",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "listNamespaces",
Title: "List Namespaces",
Description: "List the namespaces immediately under a given namespace.\n\nThis endpoint\nlists up to 1000 namespaces. If more namespaces are present, a\n`continuationToken` will be returned, which can be given in the next\nrequest. For the initial request, the payload should be an empty JSON\nobject.",
Stability: "stable",
Method: "get",
Route: "/namespaces/<namespace>",
Args: []string{
"namespace",
},
Query: []string{
"continuationToken",
"limit",
},
Input: "",
},
definitions.Entry{
Name: "listTasks",
Title: "List Tasks",
Description: "List the tasks immediately under a given namespace.\n\nThis endpoint\nlists up to 1000 tasks. If more tasks are present, a\n`continuationToken` will be returned, which can be given in the next\nrequest. For the initial request, the payload should be an empty JSON\nobject.\n\n**Remark**, this end-point is designed for humans browsing for tasks, not\nservices, as that makes little sense.",
Stability: "stable",
Method: "get",
Route: "/tasks/<namespace>",
Args: []string{
"namespace",
},
Query: []string{
"continuationToken",
"limit",
},
Input: "",
},
definitions.Entry{
Name: "insertTask",
Title: "Insert Task into Index",
Description: "Insert a task into the index. If the new rank is less than the existing rank\nat the given index path, the task is not indexed but the response is still 200 OK.\n\nPlease see the introduction above for information\nabout indexing successfully completed tasks automatically using custom routes.",
Stability: "stable",
Method: "put",
Route: "/task/<namespace>",
Args: []string{
"namespace",
},
Query: []string{},
Input: "v1/insert-task-request.json#",
},
definitions.Entry{
Name: "deleteTask",
Title: "Remove Task from Index",
Description: "Remove a task from the index. This is intended for administrative use,\nwhere an index entry is no longer appropriate. The parent namespace is\nnot automatically deleted. Index entries with lower rank that were\npreviously inserted will not re-appear, as they were never stored.",
Stability: "stable",
Method: "delete",
Route: "/task/<namespace>",
Args: []string{
"namespace",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "findArtifactFromTask",
Title: "Get Artifact From Indexed Task",
Description: "Find a task by index path and redirect to the artifact on the most recent\nrun with the given `name`.\n\nNote that multiple calls to this endpoint may return artifacts from differen tasks\nif a new task is inserted into the index between calls. Avoid using this method as\na stable link to multiple, connected files if the index path does not contain a\nunique identifier. For example, the following two links may return unrelated files:\n* https://tc.example.com/api/index/v1/task/some-app.win64.latest.installer/artifacts/public/installer.exe`\n* https://tc.example.com/api/index/v1/task/some-app.win64.latest.installer/artifacts/public/debug-symbols.zip`\n\nThis problem be remedied by including the revision in the index path or by bundling both\ninstaller and debug symbols into a single artifact.\n\nIf no task exists for the given index path, this API end-point responds with 404.",
Stability: "stable",
Method: "get",
Route: "/task/<indexPath>/artifacts/<name>",
Args: []string{
"indexPath",
"name",
},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "heartbeat",
Title: "Heartbeat",
Description: "Respond with a service heartbeat.\n\nThis endpoint is used to check on backing services this service\ndepends on.",
Stability: "stable",
Method: "get",
Route: "/__heartbeat__",
Args: []string{},
Query: []string{},
Input: "",
},
},
},
"Notify": definitions.Service{
APIVersion: "v1",
ServiceName: "notify",
Title: "Notification Service",
Description: "The notification service listens for tasks with associated notifications\nand handles requests to send emails and post pulse messages.",
Entries: []definitions.Entry{
definitions.Entry{
Name: "ping",
Title: "Ping Server",
Description: "Respond without doing anything.\nThis endpoint is used to check that the service is up.",
Stability: "stable",
Method: "get",
Route: "/ping",
Args: []string{},
Query: []string{},
Input: "",
},
definitions.Entry{
Name: "lbheartbeat",