forked from openapi-ts/openapi-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoctokit-ghes-3.6-diff-to-api.ts
9978 lines (9971 loc) · 407 KB
/
octokit-ghes-3.6-diff-to-api.ts
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
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/admin/hooks": {
/** List global webhooks */
get: operations["enterprise-admin/list-global-webhooks"];
/** Create a global webhook */
post: operations["enterprise-admin/create-global-webhook"];
};
"/admin/hooks/{hook_id}": {
/** Get a global webhook */
get: operations["enterprise-admin/get-global-webhook"];
/** Delete a global webhook */
delete: operations["enterprise-admin/delete-global-webhook"];
/**
* Update a global webhook
* @description Parameters that are not provided will be overwritten with the default value or removed if no default exists.
*/
patch: operations["enterprise-admin/update-global-webhook"];
};
"/admin/hooks/{hook_id}/pings": {
/**
* Ping a global webhook
* @description This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook.
*/
post: operations["enterprise-admin/ping-global-webhook"];
};
"/admin/keys": {
/** List public keys */
get: operations["enterprise-admin/list-public-keys"];
};
"/admin/keys/{key_ids}": {
/** Delete a public key */
delete: operations["enterprise-admin/delete-public-key"];
};
"/admin/ldap/teams/{team_id}/mapping": {
/**
* Update LDAP mapping for a team
* @description Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping.
*/
patch: operations["enterprise-admin/update-ldap-mapping-for-team"];
};
"/admin/ldap/teams/{team_id}/sync": {
/**
* Sync LDAP mapping for a team
* @description Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.
*/
post: operations["enterprise-admin/sync-ldap-mapping-for-team"];
};
"/admin/ldap/users/{username}/mapping": {
/** Update LDAP mapping for a user */
patch: operations["enterprise-admin/update-ldap-mapping-for-user"];
};
"/admin/ldap/users/{username}/sync": {
/**
* Sync LDAP mapping for a user
* @description Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.
*/
post: operations["enterprise-admin/sync-ldap-mapping-for-user"];
};
"/admin/organizations": {
/** Create an organization */
post: operations["enterprise-admin/create-org"];
};
"/admin/organizations/{org}": {
/** Update an organization name */
patch: operations["enterprise-admin/update-org-name"];
};
"/admin/pre-receive-environments": {
/** List pre-receive environments */
get: operations["enterprise-admin/list-pre-receive-environments"];
/** Create a pre-receive environment */
post: operations["enterprise-admin/create-pre-receive-environment"];
};
"/admin/pre-receive-environments/{pre_receive_environment_id}": {
/** Get a pre-receive environment */
get: operations["enterprise-admin/get-pre-receive-environment"];
/**
* Delete a pre-receive environment
* @description If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response.
*
* The possible error messages are:
*
* * _Cannot modify or delete the default environment_
* * _Cannot delete environment that has hooks_
* * _Cannot delete environment when download is in progress_
*/
delete: operations["enterprise-admin/delete-pre-receive-environment"];
/**
* Update a pre-receive environment
* @description You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response.
*/
patch: operations["enterprise-admin/update-pre-receive-environment"];
};
"/admin/pre-receive-environments/{pre_receive_environment_id}/downloads": {
/**
* Start a pre-receive environment download
* @description Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment.
*
* If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response.
*
* The possible error messages are:
*
* * _Cannot modify or delete the default environment_
* * _Can not start a new download when a download is in progress_
*/
post: operations["enterprise-admin/start-pre-receive-environment-download"];
};
"/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest": {
/**
* Get the download status for a pre-receive environment
* @description In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status.
*/
get: operations["enterprise-admin/get-download-status-for-pre-receive-environment"];
};
"/admin/pre-receive-hooks": {
/** List pre-receive hooks */
get: operations["enterprise-admin/list-pre-receive-hooks"];
/** Create a pre-receive hook */
post: operations["enterprise-admin/create-pre-receive-hook"];
};
"/admin/pre-receive-hooks/{pre_receive_hook_id}": {
/** Get a pre-receive hook */
get: operations["enterprise-admin/get-pre-receive-hook"];
/** Delete a pre-receive hook */
delete: operations["enterprise-admin/delete-pre-receive-hook"];
/** Update a pre-receive hook */
patch: operations["enterprise-admin/update-pre-receive-hook"];
};
"/admin/tokens": {
/**
* List personal access tokens
* @description Lists personal access tokens for all users, including admin users.
*/
get: operations["enterprise-admin/list-personal-access-tokens"];
};
"/admin/tokens/{token_id}": {
/**
* Delete a personal access token
* @description Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error.
*/
delete: operations["enterprise-admin/delete-personal-access-token"];
};
"/admin/users": {
/**
* Create a user
* @description If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user.
*
* The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created.
*
* If the login name or email address is already associated with an account, the server will return a `422` response.
*/
post: operations["enterprise-admin/create-user"];
};
"/admin/users/{username}": {
/**
* Delete a user
* @description Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option.
*
* You can delete any user account except your own.
*/
delete: operations["enterprise-admin/delete-user"];
/** Update the username for a user */
patch: operations["enterprise-admin/update-username-for-user"];
};
"/admin/users/{username}/authorizations": {
/** Create an impersonation OAuth token */
post: operations["enterprise-admin/create-impersonation-o-auth-token"];
/** Delete an impersonation OAuth token */
delete: operations["enterprise-admin/delete-impersonation-o-auth-token"];
};
"/app/installations": {
/**
* List installations for the authenticated app
* @description You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*
* The permissions the installation has are included under the `permissions` key.
*/
get: operations["apps/list-installations"];
};
"/app/installations/{installation_id}": {
/**
* Get an installation for the authenticated app
* @description Enables an authenticated GitHub App to find an installation's information using the installation id.
*
* You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/get-installation"];
};
"/app/installations/{installation_id}/access_tokens": {
/**
* Create an installation access token for an app
* @description Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.
*
* You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
post: operations["apps/create-installation-access-token"];
};
"/applications/grants": {
/**
* List your grants
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`.
*/
get: operations["oauth-authorizations/list-grants"];
};
"/applications/grants/{grant_id}": {
/**
* Get a single grant
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
get: operations["oauth-authorizations/get-grant"];
/**
* Delete a grant
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
*/
delete: operations["oauth-authorizations/delete-grant"];
};
"/applications/{client_id}/token": {
/**
* Check a token
* @description OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.
*/
post: operations["apps/check-token"];
/**
* Reset a token
* @description OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
*/
patch: operations["apps/reset-token"];
};
"/applications/{client_id}/token/scoped": {
/**
* Create a scoped access token
* @description Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
*/
post: operations["apps/scope-token"];
};
"/authorizations": {
/**
* List your authorizations
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
get: operations["oauth-authorizations/list-authorizations"];
/**
* Create a new authorization
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
*
* Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
*
* To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.
*
* You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use).
*
* Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on).
*/
post: operations["oauth-authorizations/create-authorization"];
};
"/authorizations/clients/{client_id}": {
/**
* Get-or-create an authorization for a specific app
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
*
* Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
*
* If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
*
* **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
put: operations["oauth-authorizations/get-or-create-authorization-for-app"];
};
"/authorizations/clients/{client_id}/{fingerprint}": {
/**
* Get-or-create an authorization for a specific app and fingerprint
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
*
* This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
*
* If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
*/
put: operations["oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint"];
};
"/authorizations/{authorization_id}": {
/**
* Get a single authorization
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
get: operations["oauth-authorizations/get-authorization"];
/**
* Delete an authorization
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*/
delete: operations["oauth-authorizations/delete-authorization"];
/**
* Update an existing authorization
* @deprecated
* @description **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
*
* If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
*
* You can only send one of these scope keys at a time.
*/
patch: operations["oauth-authorizations/update-authorization"];
};
"/enterprise/announcement": {
/**
* Get the global announcement banner
* @description Gets the current message and expiration date of the global announcement banner in your enterprise.
*/
get: operations["enterprise-admin/get-announcement"];
/**
* Remove the global announcement banner
* @description Removes the global announcement banner in your enterprise.
*/
delete: operations["enterprise-admin/remove-announcement"];
/**
* Set the global announcement banner
* @description Sets the message and expiration time for the global announcement banner in your enterprise.
*/
patch: operations["enterprise-admin/set-announcement"];
};
"/enterprise/settings/license": {
/** Get license information */
get: operations["enterprise-admin/get-license-information"];
};
"/enterprise/stats/all": {
/** Get all statistics */
get: operations["enterprise-admin/get-all-stats"];
};
"/enterprise/stats/comments": {
/** Get comment statistics */
get: operations["enterprise-admin/get-comment-stats"];
};
"/enterprise/stats/gists": {
/** Get gist statistics */
get: operations["enterprise-admin/get-gist-stats"];
};
"/enterprise/stats/hooks": {
/** Get hooks statistics */
get: operations["enterprise-admin/get-hooks-stats"];
};
"/enterprise/stats/issues": {
/** Get issue statistics */
get: operations["enterprise-admin/get-issue-stats"];
};
"/enterprise/stats/milestones": {
/** Get milestone statistics */
get: operations["enterprise-admin/get-milestone-stats"];
};
"/enterprise/stats/orgs": {
/** Get organization statistics */
get: operations["enterprise-admin/get-org-stats"];
};
"/enterprise/stats/pages": {
/** Get pages statistics */
get: operations["enterprise-admin/get-pages-stats"];
};
"/enterprise/stats/pulls": {
/** Get pull request statistics */
get: operations["enterprise-admin/get-pull-request-stats"];
};
"/enterprise/stats/repos": {
/** Get repository statistics */
get: operations["enterprise-admin/get-repo-stats"];
};
"/enterprise/stats/users": {
/** Get users statistics */
get: operations["enterprise-admin/get-user-stats"];
};
"/enterprises/{enterprise}/actions/cache/usage-policy": {
/**
* Get GitHub Actions cache usage policy for an enterprise
* @description Gets the GitHub Actions cache usage policy for an enterprise.
* You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
* GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint.
*/
get: operations["actions/get-actions-cache-usage-policy-for-enterprise"];
/**
* Set GitHub Actions cache usage policy for an enterprise
* @description Sets the GitHub Actions cache usage policy for an enterprise.
* You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
* GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint.
*/
patch: operations["actions/set-actions-cache-usage-policy-for-enterprise"];
};
"/enterprises/{enterprise}/actions/permissions/selected-actions": {
/**
* Get allowed actions for an enterprise
* @description Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/get-allowed-actions-enterprise"];
/**
* Set allowed actions for an enterprise
* @description Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/set-allowed-actions-enterprise"];
};
"/enterprises/{enterprise}/audit-log": {
/**
* Get the audit log for an enterprise
* @description Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope.
*/
get: operations["enterprise-admin/get-audit-log"];
};
"/enterprises/{enterprise}/secret-scanning/alerts": {
/**
* List secret scanning alerts for an enterprise
* @description Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.
* To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).
*/
get: operations["secret-scanning/list-alerts-for-enterprise"];
};
"/meta": {
/** Get GitHub Enterprise Server meta information */
get: operations["meta/get"];
};
"/organizations/{organization_id}/custom_roles": {
/**
* List custom repository roles in an organization
* @description List the custom repository roles available in this organization. In order to see custom
* repository roles in an organization, the authenticated user must be an organization owner.
*
* To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.
* GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.
*
* For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)".
*/
get: operations["orgs/list-custom-roles"];
};
"/orgs/{org}": {
/**
* Get an organization
* @description To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).
*
* GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below."
*/
get: operations["orgs/get"];
/**
* Update an organization
* @description **Parameter Deprecation Notice:** GitHub Enterprise Server will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).
*
* Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges.
*/
patch: operations["orgs/update"];
};
"/orgs/{org}/actions/permissions/selected-actions": {
/**
* Get allowed actions for an organization
* @description Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).""
*
* You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
*/
get: operations["actions/get-allowed-actions-organization"];
/**
* Set allowed actions for an organization
* @description Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
*
* If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.
*
* To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.
*
* You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
*/
put: operations["actions/set-allowed-actions-organization"];
};
"/orgs/{org}/audit-log": {
/**
* Get the audit log for an organization
* @description Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."
*
* To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint.
*
* By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)."
*
* Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)."
*/
get: operations["orgs/get-audit-log"];
};
"/orgs/{org}/external-group/{group_id}": {
/**
* Get an external group
* @description Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to.
*
* You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
*/
get: operations["teams/external-idp-group-info-for-org"];
};
"/orgs/{org}/external-groups": {
/**
* List external groups in an organization
* @description Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."
*
* You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
*/
get: operations["teams/list-external-idp-groups-for-org"];
};
"/orgs/{org}/installation": {
/**
* Get an organization installation for the authenticated app
* @description Enables an authenticated GitHub App to find the organization's installation information.
*
* You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/get-org-installation"];
};
"/orgs/{org}/installations": {
/**
* List app installations for an organization
* @description Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint.
*/
get: operations["orgs/list-app-installations"];
};
"/orgs/{org}/pre-receive-hooks": {
/**
* List pre-receive hooks for an organization
* @description List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed.
*/
get: operations["enterprise-admin/list-pre-receive-hooks-for-org"];
};
"/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}": {
/** Get a pre-receive hook for an organization */
get: operations["enterprise-admin/get-pre-receive-hook-for-org"];
/**
* Remove pre-receive hook enforcement for an organization
* @description Removes any overrides for this hook at the org level for this org.
*/
delete: operations["enterprise-admin/remove-pre-receive-hook-enforcement-for-org"];
/**
* Update pre-receive hook enforcement for an organization
* @description For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration`
*/
patch: operations["enterprise-admin/update-pre-receive-hook-enforcement-for-org"];
};
"/orgs/{org}/secret-scanning/alerts": {
/**
* List secret scanning alerts for an organization
* @description Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.
* To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.
* For public repositories, you may instead use the `public_repo` scope.
*
* GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
*/
get: operations["secret-scanning/list-alerts-for-org"];
};
"/orgs/{org}/teams": {
/**
* Create a team
* @description To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)."
*
* When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)".
*/
post: operations["teams/create"];
};
"/orgs/{org}/teams/{team_slug}/external-groups": {
/**
* List a connection between an external group and a team
* @description Lists a connection between a team and an external group.
*
* You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
*/
get: operations["teams/list-linked-external-idp-groups-to-team-for-org"];
/**
* Remove the connection between an external group and a team
* @description Deletes a connection between a team and an external group.
*
* You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
*/
delete: operations["teams/unlink-external-idp-group-from-team-for-org"];
/**
* Update the connection between an external group and a team
* @description Creates a connection between a team and an external group. Only one external group can be linked to a team.
*
* You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
*/
patch: operations["teams/link-external-idp-group-to-team-for-org"];
};
"/rate_limit": {
/**
* Get rate limit status for the authenticated user
* @description **Note:** Accessing this endpoint does not count against your REST API rate limit.
*
* **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object.
*/
get: operations["rate-limit/get"];
};
"/repos/{owner}/{repo}/actions/cache/usage-policy": {
/**
* Get GitHub Actions cache usage policy for a repository
* @description Gets GitHub Actions cache usage policy for a repository.
* You must authenticate using an access token with the `repo` scope to use this endpoint.
* GitHub Apps must have the `actions:read` permission to use this endpoint.
*/
get: operations["actions/get-actions-cache-usage-policy"];
/**
* Set GitHub Actions cache usage policy for a repository
* @description Sets GitHub Actions cache usage policy for a repository.
* You must authenticate using an access token with the `repo` scope to use this endpoint.
* GitHub Apps must have the `actions:write` permission to use this endpoint.
*/
patch: operations["actions/set-actions-cache-usage-policy"];
};
"/repos/{owner}/{repo}/actions/permissions/selected-actions": {
/**
* Get allowed actions for a repository
* @description Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
*
* You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
*/
get: operations["actions/get-allowed-actions-repository"];
/**
* Set allowed actions for a repository
* @description Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
*
* If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings.
*
* To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.
*
* You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
*/
put: operations["actions/set-allowed-actions-repository"];
};
"/repos/{owner}/{repo}/actions/runs": {
/**
* List workflow runs for a repository
* @description Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters).
*
* Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
*/
get: operations["actions/list-workflow-runs-for-repo"];
};
"/repos/{owner}/{repo}/actions/runs/{run_id}": {
/**
* Get a workflow run
* @description Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
*/
get: operations["actions/get-workflow-run"];
};
"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": {
/**
* Get a workflow run attempt
* @description Gets a specific workflow run attempt. Anyone with read access to the repository
* can use this endpoint. If the repository is private you must use an access token
* with the `repo` scope. GitHub Apps must have the `actions:read` permission to
* use this endpoint.
*/
get: operations["actions/get-workflow-run-attempt"];
};
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": {
/**
* List workflow runs for a workflow
* @description List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters).
*
* Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
*/
get: operations["actions/list-workflow-runs"];
};
"/repos/{owner}/{repo}/autolinks": {
/**
* List all autolinks of a repository
* @description This returns a list of autolinks configured for the given repository.
*
* Information about autolinks are only available to repository administrators.
*/
get: operations["repos/list-autolinks"];
/**
* Create an autolink reference for a repository
* @description Users with admin access to the repository can create an autolink.
*/
post: operations["repos/create-autolink"];
};
"/repos/{owner}/{repo}/autolinks/{autolink_id}": {
/**
* Get an autolink reference of a repository
* @description This returns a single autolink reference by ID that was configured for the given repository.
*
* Information about autolinks are only available to repository administrators.
*/
get: operations["repos/get-autolink"];
};
"/repos/{owner}/{repo}/code-scanning/analyses": {
/**
* List code scanning analyses for a repository
* @description Lists the details of all code scanning analyses for a repository,
* starting with the most recent.
* The response is paginated and you can use the `page` and `per_page` parameters
* to list the analyses you're interested in.
* By default 30 analyses are listed per page.
*
* The `rules_count` field in the response give the number of rules
* that were run in the analysis.
* For very old analyses this data is not available,
* and `0` is returned in this field.
*
* You must use an access token with the `security_events` scope to use this endpoint with private repos,
* the `public_repo` scope also grants permission to read security events on public repos only.
* GitHub Apps must have the `security_events` read permission to use this endpoint.
*
* **Deprecation notice**:
* The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
*/
get: operations["code-scanning/list-recent-analyses"];
};
"/repos/{owner}/{repo}/collaborators": {
/**
* List repository collaborators
* @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
* Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint.
*
* Team members will include the members of child teams.
*
* You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this
* endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this
* endpoint.
*/
get: operations["repos/list-collaborators"];
};
"/repos/{owner}/{repo}/collaborators/{username}/permission": {
/**
* Get repository permissions for a user
* @description Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`.
*/
get: operations["repos/get-collaborator-permission-level"];
};
"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": {
/**
* Get a diff of the dependencies between commits
* @description Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits.
*/
get: operations["dependency-graph/diff-range"];
};
"/repos/{owner}/{repo}/forks": {
/**
* Create a fork
* @description Create a fork for the authenticated user.
*
* **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api).
*/
post: operations["repos/create-fork"];
};
"/repos/{owner}/{repo}/installation": {
/**
* Get a repository installation for the authenticated app
* @description Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
*
* You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/get-repo-installation"];
};
"/repos/{owner}/{repo}/keys": {
/** List deploy keys */
get: operations["repos/list-deploy-keys"];
/**
* Create a deploy key
* @description You can create a read-only deploy key.
*/
post: operations["repos/create-deploy-key"];
};
"/repos/{owner}/{repo}/keys/{key_id}": {
/** Get a deploy key */
get: operations["repos/get-deploy-key"];
};
"/repos/{owner}/{repo}/pre-receive-hooks": {
/**
* List pre-receive hooks for a repository
* @description List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed.
*/
get: operations["enterprise-admin/list-pre-receive-hooks-for-repo"];
};
"/repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}": {
/** Get a pre-receive hook for a repository */
get: operations["enterprise-admin/get-pre-receive-hook-for-repo"];
/**
* Remove pre-receive hook enforcement for a repository
* @description Deletes any overridden enforcement on this repository for the specified hook.
*
* Responds with effective values inherited from owner and/or global level.
*/
delete: operations["enterprise-admin/remove-pre-receive-hook-enforcement-for-repo"];
/**
* Update pre-receive hook enforcement for a repository
* @description For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement`
*/
patch: operations["enterprise-admin/update-pre-receive-hook-enforcement-for-repo"];
};
"/repos/{owner}/{repo}/releases": {
/**
* List releases
* @description This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repository-tags).
*
* Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.
*/
get: operations["repos/list-releases"];
/**
* Create a release
* @description Users with push access to the repository can create a release.
*
* This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
*/
post: operations["repos/create-release"];
};
"/repos/{owner}/{repo}/releases/latest": {
/**
* Get the latest release
* @description View the latest published full release for the repository.
*
* The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published.
*/
get: operations["repos/get-latest-release"];
};
"/repos/{owner}/{repo}/releases/tags/{tag}": {
/**
* Get a release by tag name
* @description Get a published release with the specified tag.
*/
get: operations["repos/get-release-by-tag"];
};
"/repos/{owner}/{repo}/releases/{release_id}": {
/**
* Get a release
* @description **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia).
*/
get: operations["repos/get-release"];
/**
* Update a release
* @description Users with push access to the repository can edit a release.
*/
patch: operations["repos/update-release"];
};
"/repos/{owner}/{repo}/replicas/caches": {
/**
* List repository cache replication status
* @description Lists the status of each repository cache replica.
*/
get: operations["repos/list-cache-info"];
};
"/repos/{owner}/{repo}/secret-scanning/alerts": {
/**
* List secret scanning alerts for a repository
* @description Lists secret scanning alerts for an eligible repository, from newest to oldest.
* To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope.
* For public repositories, you may instead use the `public_repo` scope.
*
* GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
*/
get: operations["secret-scanning/list-alerts-for-repo"];
};
"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": {
/**
* Get a secret scanning alert
* @description Gets a single secret scanning alert detected in an eligible repository.
* To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope.
* For public repositories, you may instead use the `public_repo` scope.
*
* GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
*/
get: operations["secret-scanning/get-alert"];
/**
* Update a secret scanning alert
* @description Updates the status of a secret scanning alert in an eligible repository.
* To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope.
* For public repositories, you may instead use the `public_repo` scope.
*
* GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint.
*/
patch: operations["secret-scanning/update-alert"];
};
"/repositories": {
/**
* List public repositories
* @description Lists all public repositories in the order that they were created.
*
* Note:
* - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.
* - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories.
*/
get: operations["repos/list-public"];
};
"/scim/v2/enterprises/{enterprise}/Groups": {
/**
* List provisioned SCIM groups for an enterprise
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*/
get: operations["enterprise-admin/list-provisioned-groups-enterprise"];
/**
* Provision a SCIM enterprise group and invite users
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*
* Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.
*/
post: operations["enterprise-admin/provision-and-invite-enterprise-group"];
};
"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": {
/**
* Get SCIM provisioning information for an enterprise group
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*/
get: operations["enterprise-admin/get-provisioning-information-for-enterprise-group"];
/**
* Set SCIM information for a provisioned enterprise group
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*
* Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead.
*/
put: operations["enterprise-admin/set-information-for-provisioned-enterprise-group"];
/**
* Delete a SCIM group from an enterprise
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*/
delete: operations["enterprise-admin/delete-scim-group-from-enterprise"];
/**
* Update an attribute for a SCIM enterprise group
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*
* Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
*/
patch: operations["enterprise-admin/update-attribute-for-enterprise-group"];
};
"/scim/v2/enterprises/{enterprise}/Users": {
/**
* List SCIM provisioned identities for an enterprise
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*
* Retrieves a paginated list of all provisioned enterprise members, including pending invitations.
*
* When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub Enterprise Server. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
* - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future.
* - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
* - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.
*
* The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub Enterprise Server account after completing SSO:
*
* 1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Server enterprise.
*
* 1. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server account.
*
* 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub Enterprise Server account:
* - If the user signs in, their GitHub Enterprise Server account is linked to this entry.
* - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub Enterprise Server enterprise, and the external identity `null` entry remains in place.
*/
get: operations["enterprise-admin/list-provisioned-identities-enterprise"];
/**
* Provision and invite a SCIM enterprise user
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*
* Provision enterprise membership for a user, and send organization invitation emails to the email address.
*
* You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent.
*/
post: operations["enterprise-admin/provision-and-invite-enterprise-user"];
};
"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": {
/**
* Get SCIM provisioning information for an enterprise user
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*/
get: operations["enterprise-admin/get-provisioning-information-for-enterprise-user"];
/**
* Set SCIM information for a provisioned enterprise user
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*
* Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead.
*
* You must at least provide the required values for the user: `userName`, `name`, and `emails`.
*
* **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`.
*/
put: operations["enterprise-admin/set-information-for-provisioned-enterprise-user"];
/**
* Delete a SCIM user from an enterprise
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
*/
delete: operations["enterprise-admin/delete-user-from-enterprise"];
/**
* Update an attribute for a SCIM enterprise user
* @description **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.