Skip to content

Commit 43d39a8

Browse files
Update OpenAPI Descriptions (github#26288)
* Update OpenAPI Descriptions * Add decorated OpenAPI schema files Co-authored-by: github-openapi-bot <[email protected]>
1 parent 17dd9d4 commit 43d39a8

File tree

3 files changed

+586
-0
lines changed

3 files changed

+586
-0
lines changed

lib/rest/static/apps/enabled-for-apps.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
{
22
"api.github.com": {
33
"actions": [
4+
{
5+
"slug": "get-github-actions-cache-usage-for-an-enterprise",
6+
"verb": "get",
7+
"requestPath": "/enterprises/{enterprise}/actions/cache/usage"
8+
},
9+
{
10+
"slug": "get-github-actions-cache-usage-for-an-organization",
11+
"verb": "get",
12+
"requestPath": "/orgs/{org}/actions/cache/usage"
13+
},
14+
{
15+
"slug": "list-repositories-with-github-actions-cache-usage-for-an-organization",
16+
"verb": "get",
17+
"requestPath": "/orgs/{org}/actions/cache/usage-by-repository"
18+
},
419
{
520
"slug": "get-github-actions-permissions-for-an-organization",
621
"verb": "get",
@@ -236,6 +251,11 @@
236251
"verb": "get",
237252
"requestPath": "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"
238253
},
254+
{
255+
"slug": "get-github-actions-cache-usage-for-a-repository",
256+
"verb": "get",
257+
"requestPath": "/repos/{owner}/{repo}/actions/cache/usage"
258+
},
239259
{
240260
"slug": "get-a-job-for-a-workflow-run",
241261
"verb": "get",

lib/rest/static/decorated/api.github.com.json

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,218 @@
359359
]
360360
}
361361
],
362+
"cache": [
363+
{
364+
"verb": "get",
365+
"requestPath": "/enterprises/{enterprise}/actions/cache/usage",
366+
"parameters": [
367+
{
368+
"name": "enterprise",
369+
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
370+
"in": "path",
371+
"required": true,
372+
"schema": {
373+
"type": "string"
374+
},
375+
"descriptionHTML": "<p>The slug version of the enterprise name. You can also substitute this value with the enterprise id.</p>"
376+
}
377+
],
378+
"x-codeSamples": [
379+
{
380+
"lang": "Shell",
381+
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/cache/usage"
382+
},
383+
{
384+
"lang": "JavaScript",
385+
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/cache/usage', {\n enterprise: 'enterprise'\n})"
386+
}
387+
],
388+
"summary": "Get GitHub Actions cache usage for an enterprise",
389+
"x-github": {
390+
"enabledForGitHubApps": true,
391+
"category": "actions",
392+
"subcategory": "cache"
393+
},
394+
"slug": "get-github-actions-cache-usage-for-an-enterprise",
395+
"category": "actions",
396+
"subcategory": "cache",
397+
"notes": [],
398+
"bodyParameters": [],
399+
"descriptionHTML": "<p>Gets the total GitHub Actions cache usage for an enterprise.\nThe data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.\nYou must authenticate using an access token with the <code>admin:enterprise</code> scope to use this endpoint.</p>",
400+
"responses": [
401+
{
402+
"httpStatusCode": "200",
403+
"httpStatusMessage": "OK",
404+
"description": "<p>Response</p>",
405+
"payload": "{\n \"total_active_caches_size_in_bytes\": 3344284,\n \"total_active_caches_count\": 5\n}"
406+
}
407+
]
408+
},
409+
{
410+
"verb": "get",
411+
"requestPath": "/orgs/{org}/actions/cache/usage",
412+
"parameters": [
413+
{
414+
"name": "org",
415+
"in": "path",
416+
"required": true,
417+
"schema": {
418+
"type": "string"
419+
},
420+
"descriptionHTML": ""
421+
}
422+
],
423+
"x-codeSamples": [
424+
{
425+
"lang": "Shell",
426+
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/cache/usage"
427+
},
428+
{
429+
"lang": "JavaScript",
430+
"source": "await octokit.request('GET /orgs/{org}/actions/cache/usage', {\n org: 'org'\n})"
431+
}
432+
],
433+
"summary": "Get GitHub Actions cache usage for an organization",
434+
"x-github": {
435+
"enabledForGitHubApps": true,
436+
"category": "actions",
437+
"subcategory": "cache"
438+
},
439+
"slug": "get-github-actions-cache-usage-for-an-organization",
440+
"category": "actions",
441+
"subcategory": "cache",
442+
"notes": [],
443+
"bodyParameters": [],
444+
"descriptionHTML": "<p>Gets the total GitHub Actions cache usage for an organization.\nThe data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.\nYou must authenticate using an access token with the <code>read:org</code> scope to use this endpoint. GitHub Apps must have the <code>organization_admistration:read</code> permission to use this endpoint.</p>",
445+
"responses": [
446+
{
447+
"httpStatusCode": "200",
448+
"httpStatusMessage": "OK",
449+
"description": "<p>Response</p>",
450+
"payload": "{\n \"total_active_caches_size_in_bytes\": 3344284,\n \"total_active_caches_count\": 5\n}"
451+
}
452+
]
453+
},
454+
{
455+
"verb": "get",
456+
"requestPath": "/orgs/{org}/actions/cache/usage-by-repository",
457+
"parameters": [
458+
{
459+
"name": "org",
460+
"in": "path",
461+
"required": true,
462+
"schema": {
463+
"type": "string"
464+
},
465+
"descriptionHTML": ""
466+
},
467+
{
468+
"name": "per_page",
469+
"description": "Results per page (max 100)",
470+
"in": "query",
471+
"schema": {
472+
"type": "integer",
473+
"default": 30
474+
},
475+
"descriptionHTML": "<p>Results per page (max 100)</p>"
476+
},
477+
{
478+
"name": "page",
479+
"description": "Page number of the results to fetch.",
480+
"in": "query",
481+
"schema": {
482+
"type": "integer",
483+
"default": 1
484+
},
485+
"descriptionHTML": "<p>Page number of the results to fetch.</p>"
486+
}
487+
],
488+
"x-codeSamples": [
489+
{
490+
"lang": "Shell",
491+
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/cache/usage-by-repository"
492+
},
493+
{
494+
"lang": "JavaScript",
495+
"source": "await octokit.request('GET /orgs/{org}/actions/cache/usage-by-repository', {\n org: 'org'\n})"
496+
}
497+
],
498+
"summary": "List repositories with GitHub Actions cache usage for an organization",
499+
"x-github": {
500+
"enabledForGitHubApps": true,
501+
"category": "actions",
502+
"subcategory": "cache"
503+
},
504+
"slug": "list-repositories-with-github-actions-cache-usage-for-an-organization",
505+
"category": "actions",
506+
"subcategory": "cache",
507+
"notes": [],
508+
"bodyParameters": [],
509+
"descriptionHTML": "<p>Lists repositories and their GitHub Actions cache usage for an organization.\nThe data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.\nYou must authenticate using an access token with the <code>read:org</code> scope to use this endpoint. GitHub Apps must have the <code>organization_admistration:read</code> permission to use this endpoint.</p>",
510+
"responses": [
511+
{
512+
"httpStatusCode": "200",
513+
"httpStatusMessage": "OK",
514+
"description": "<p>Response</p>",
515+
"payload": "{\n \"total_count\": 2,\n \"repository_cache_usages\": [\n {\n \"full_name\": \"octo-org/Hello-World\",\n \"active_caches_size_in_bytes\": 2322142,\n \"active_caches_count\": 3\n },\n {\n \"full_name\": \"octo-org/server\",\n \"active_caches_size_in_bytes\": 1022142,\n \"active_caches_count\": 2\n }\n ]\n}"
516+
}
517+
]
518+
},
519+
{
520+
"verb": "get",
521+
"requestPath": "/repos/{owner}/{repo}/actions/cache/usage",
522+
"parameters": [
523+
{
524+
"name": "owner",
525+
"in": "path",
526+
"required": true,
527+
"schema": {
528+
"type": "string"
529+
},
530+
"descriptionHTML": ""
531+
},
532+
{
533+
"name": "repo",
534+
"in": "path",
535+
"required": true,
536+
"schema": {
537+
"type": "string"
538+
},
539+
"descriptionHTML": ""
540+
}
541+
],
542+
"x-codeSamples": [
543+
{
544+
"lang": "Shell",
545+
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/cache/usage"
546+
},
547+
{
548+
"lang": "JavaScript",
549+
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/cache/usage', {\n owner: 'octocat',\n repo: 'hello-world'\n})"
550+
}
551+
],
552+
"summary": "Get GitHub Actions cache usage for a repository",
553+
"x-github": {
554+
"enabledForGitHubApps": true,
555+
"category": "actions",
556+
"subcategory": "cache"
557+
},
558+
"slug": "get-github-actions-cache-usage-for-a-repository",
559+
"category": "actions",
560+
"subcategory": "cache",
561+
"notes": [],
562+
"bodyParameters": [],
563+
"descriptionHTML": "<p>Gets GitHub Actions cache usage for a repository.\nThe data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the <code>repo</code> scope. GitHub Apps must have the <code>actions:read</code> permission to use this endpoint.</p>",
564+
"responses": [
565+
{
566+
"httpStatusCode": "200",
567+
"httpStatusMessage": "OK",
568+
"description": "<p>Response</p>",
569+
"payload": "{\n \"full_name\": \"octo-org/Hello-World\",\n \"active_caches_size_in_bytes\": 2322142,\n \"active_caches_count\": 3\n}"
570+
}
571+
]
572+
}
573+
],
362574
"permissions": [
363575
{
364576
"verb": "get",

0 commit comments

Comments
 (0)