diff --git a/content/rest/reference/permissions-required-for-github-apps.md b/content/rest/reference/permissions-required-for-github-apps.md index 9f6a813ca7..2a93b8d2ce 100644 --- a/content/rest/reference/permissions-required-for-github-apps.md +++ b/content/rest/reference/permissions-required-for-github-apps.md @@ -160,6 +160,9 @@ _Search_ {% if currentVersion == "free-pro-team@latest" %} - [`DELETE /repos/:owner/:repo/interaction-limits`](/rest/reference/interactions#remove-interaction-restrictions-for-a-repository) (:write) {% endif %} +{% if currentVersion == "free-pro-team@latest" %} +- [`GET /repos/:owner/:repo/pages/health`](/rest/reference/repos#get-a-dns-health-check-for-github-pages) (:write) +{% endif %} - [`PUT /repos/:owner/:repo/topics`](/rest/reference/repos#replace-all-repository-topics) (:write) - [`POST /repos/:owner/:repo/transfer`](/rest/reference/repos#transfer-a-repository) (:write) {% if currentVersion == "free-pro-team@latest" %} @@ -678,6 +681,9 @@ _Teams_ - [`POST /repos/:owner/:repo/pages/builds`](/rest/reference/repos#request-a-github-pages-build) (:write) - [`GET /repos/:owner/:repo/pages/builds/:build_id`](/rest/reference/repos#get-github-pages-build) (:read) - [`GET /repos/:owner/:repo/pages/builds/latest`](/rest/reference/repos#get-latest-pages-build) (:read) +{% if currentVersion == "free-pro-team@latest" %} +- [`GET /repos/:owner/:repo/pages/health`](/rest/reference/repos#get-a-dns-health-check-for-github-pages) (:write) +{% endif %} ### Permission on "pull requests" diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index 3fd6794fdc..ab325a9085 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -66563,6 +66563,95 @@ } ] }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pages/health", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/health", + "html": "
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/health"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "await octokit.request('GET /repos/{owner}/{repo}/pages/health', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
+ "html": "await octokit.request('GET /repos/{owner}/{repo}/pages/health', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
+ }
+ ],
+ "summary": "Get a DNS health check for GitHub Pages",
+ "description": "Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.\n\nThe first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response.\n\nUsers must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint.",
+ "tags": [
+ "repos"
+ ],
+ "operationId": "repos/get-pages-health-check",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/rest/reference/repos#get-a-dns-health-check-for-github-pages"
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "category": "repos",
+ "subcategory": "pages"
+ },
+ "slug": "get-a-dns-health-check-for-github-pages",
+ "category": "repos",
+ "categoryLabel": "Repos",
+ "subcategory": "pages",
+ "subcategoryLabel": "Pages",
+ "notes": [],
+ "bodyParameters": [],
+ "descriptionHTML": "Gets a health check of the DNS settings for the CNAME record configured for a repository's GitHub Pages.
The first request to this endpoint returns a 202 Accepted status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a 200 OK status with the health check results in the response.
Users must have admin or owner permissions. GitHub Apps must have the pages:write and administration:write permission to use this endpoint.
{\n \"domain\": {\n \"host\": \"example.com\",\n \"uri\": \"http://example.com/\",\n \"nameservers\": \"default\",\n \"dns_resolves\": true,\n \"is_proxied\": false,\n \"is_cloudflare_ip\": false,\n \"is_fastly_ip\": false,\n \"is_old_ip_address\": false,\n \"is_a_record\": true,\n \"has_cname_record\": false,\n \"has_mx_records_present\": false,\n \"is_valid_domain\": true,\n \"is_apex_domain\": true,\n \"should_be_a_record\": true,\n \"is_cname_to_github_user_domain\": false,\n \"is_cname_to_pages_dot_github_dot_com\": false,\n \"is_cname_to_fastly\": false,\n \"is_pointed_to_github_pages_ip\": true,\n \"is_non_github_pages_ip_present\": false,\n \"is_pages_domain\": false,\n \"is_served_by_pages\": true,\n \"is_valid\": true,\n \"reason\": null,\n \"responds_to_https\": true,\n \"enforces_https\": true,\n \"https_error\": null,\n \"is_https_eligible\": true,\n \"caa_error\": null\n },\n \"alt_domain\": {\n \"host\": \"www.example.com\",\n \"uri\": \"http://www.example.com/\",\n \"nameservers\": \"default\",\n \"dns_resolves\": true,\n \"is_proxied\": false,\n \"is_cloudflare_ip\": false,\n \"is_fastly_ip\": false,\n \"is_old_ip_address\": false,\n \"is_a_record\": true,\n \"has_cname_record\": false,\n \"has_mx_records_present\": false,\n \"is_valid_domain\": true,\n \"is_apex_domain\": true,\n \"should_be_a_record\": true,\n \"is_cname_to_github_user_domain\": false,\n \"is_cname_to_pages_dot_github_dot_com\": false,\n \"is_cname_to_fastly\": false,\n \"is_pointed_to_github_pages_ip\": true,\n \"is_non_github_pages_ip_present\": false,\n \"is_pages_domain\": false,\n \"is_served_by_pages\": true,\n \"is_valid\": true,\n \"reason\": null,\n \"responds_to_https\": true,\n \"enforces_https\": true,\n \"https_error\": null,\n \"is_https_eligible\": true,\n \"caa_error\": null\n }\n}\n"
+ },
+ {
+ "httpStatusCode": "202",
+ "httpStatusMessage": "Accepted",
+ "description": "Empty response"
+ },
+ {
+ "httpStatusCode": "400",
+ "httpStatusMessage": "Bad Request",
+ "description": "Custom domains are not available for GitHub Pages"
+ },
+ {
+ "httpStatusCode": "404",
+ "httpStatusMessage": "Not Found",
+ "description": "Resource not found"
+ },
+ {
+ "httpStatusCode": "422",
+ "httpStatusMessage": "Unprocessable Entity",
+ "description": "There isn't a CNAME for this page"
+ }
+ ]
+ },
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/projects",
diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json
index 83eaa47098..c8e17ff4df 100644
--- a/lib/rest/static/dereferenced/api.github.com.deref.json
+++ b/lib/rest/static/dereferenced/api.github.com.deref.json
@@ -253294,6 +253294,376 @@
}
}
},
+ "/repos/{owner}/{repo}/pages/health": {
+ "get": {
+ "summary": "Get a DNS health check for GitHub Pages",
+ "description": "Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.\n\nThe first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response.\n\nUsers must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint.",
+ "tags": [
+ "repos"
+ ],
+ "operationId": "repos/get-pages-health-check",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/rest/reference/repos#get-a-dns-health-check-for-github-pages"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Pages Health Check Status",
+ "description": "Pages Health Check Status",
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "uri": {
+ "type": "string"
+ },
+ "nameservers": {
+ "type": "string"
+ },
+ "dns_resolves": {
+ "type": "boolean"
+ },
+ "is_proxied": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cloudflare_ip": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_fastly_ip": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_old_ip_address": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_a_record": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "has_cname_record": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "has_mx_records_present": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_valid_domain": {
+ "type": "boolean"
+ },
+ "is_apex_domain": {
+ "type": "boolean"
+ },
+ "should_be_a_record": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cname_to_github_user_domain": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cname_to_pages_dot_github_dot_com": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cname_to_fastly": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_pointed_to_github_pages_ip": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_non_github_pages_ip_present": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_pages_domain": {
+ "type": "boolean"
+ },
+ "is_served_by_pages": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_valid": {
+ "type": "boolean"
+ },
+ "reason": {
+ "type": "string",
+ "nullable": true
+ },
+ "responds_to_https": {
+ "type": "boolean"
+ },
+ "enforces_https": {
+ "type": "boolean"
+ },
+ "https_error": {
+ "type": "string",
+ "nullable": true
+ },
+ "is_https_eligible": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "caa_error": {
+ "type": "string",
+ "nullable": true
+ }
+ }
+ },
+ "alt_domain": {
+ "type": "object",
+ "nullable": true,
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "uri": {
+ "type": "string"
+ },
+ "nameservers": {
+ "type": "string"
+ },
+ "dns_resolves": {
+ "type": "boolean"
+ },
+ "is_proxied": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cloudflare_ip": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_fastly_ip": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_old_ip_address": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_a_record": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "has_cname_record": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "has_mx_records_present": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_valid_domain": {
+ "type": "boolean"
+ },
+ "is_apex_domain": {
+ "type": "boolean"
+ },
+ "should_be_a_record": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cname_to_github_user_domain": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cname_to_pages_dot_github_dot_com": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_cname_to_fastly": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_pointed_to_github_pages_ip": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_non_github_pages_ip_present": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_pages_domain": {
+ "type": "boolean"
+ },
+ "is_served_by_pages": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "is_valid": {
+ "type": "boolean"
+ },
+ "reason": {
+ "type": "string",
+ "nullable": true
+ },
+ "responds_to_https": {
+ "type": "boolean"
+ },
+ "enforces_https": {
+ "type": "boolean"
+ },
+ "https_error": {
+ "type": "string",
+ "nullable": true
+ },
+ "is_https_eligible": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "caa_error": {
+ "type": "string",
+ "nullable": true
+ }
+ }
+ }
+ }
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "domain": {
+ "host": "example.com",
+ "uri": "http://example.com/",
+ "nameservers": "default",
+ "dns_resolves": true,
+ "is_proxied": false,
+ "is_cloudflare_ip": false,
+ "is_fastly_ip": false,
+ "is_old_ip_address": false,
+ "is_a_record": true,
+ "has_cname_record": false,
+ "has_mx_records_present": false,
+ "is_valid_domain": true,
+ "is_apex_domain": true,
+ "should_be_a_record": true,
+ "is_cname_to_github_user_domain": false,
+ "is_cname_to_pages_dot_github_dot_com": false,
+ "is_cname_to_fastly": false,
+ "is_pointed_to_github_pages_ip": true,
+ "is_non_github_pages_ip_present": false,
+ "is_pages_domain": false,
+ "is_served_by_pages": true,
+ "is_valid": true,
+ "reason": null,
+ "responds_to_https": true,
+ "enforces_https": true,
+ "https_error": null,
+ "is_https_eligible": true,
+ "caa_error": null
+ },
+ "alt_domain": {
+ "host": "www.example.com",
+ "uri": "http://www.example.com/",
+ "nameservers": "default",
+ "dns_resolves": true,
+ "is_proxied": false,
+ "is_cloudflare_ip": false,
+ "is_fastly_ip": false,
+ "is_old_ip_address": false,
+ "is_a_record": true,
+ "has_cname_record": false,
+ "has_mx_records_present": false,
+ "is_valid_domain": true,
+ "is_apex_domain": true,
+ "should_be_a_record": true,
+ "is_cname_to_github_user_domain": false,
+ "is_cname_to_pages_dot_github_dot_com": false,
+ "is_cname_to_fastly": false,
+ "is_pointed_to_github_pages_ip": true,
+ "is_non_github_pages_ip_present": false,
+ "is_pages_domain": false,
+ "is_served_by_pages": true,
+ "is_valid": true,
+ "reason": null,
+ "responds_to_https": true,
+ "enforces_https": true,
+ "https_error": null,
+ "is_https_eligible": true,
+ "caa_error": null
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "202": {
+ "description": "Empty response"
+ },
+ "400": {
+ "description": "Custom domains are not available for GitHub Pages"
+ },
+ "422": {
+ "description": "There isn't a CNAME for this page"
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "category": "repos",
+ "subcategory": "pages"
+ }
+ }
+ },
"/repos/{owner}/{repo}/projects": {
"get": {
"summary": "List repository projects",