Merge branch 'main' into patch-1
This commit is contained in:
@@ -20,7 +20,7 @@ topics:
|
||||
|
||||
Subdomain isolation mitigates cross-site scripting and other related vulnerabilities. For more information, see "[Cross-site scripting](http://en.wikipedia.org/wiki/Cross-site_scripting)" on Wikipedia. We highly recommend that you enable subdomain isolation on {% data variables.product.product_location %}.
|
||||
|
||||
When subdomain isolation is enabled, {% data variables.product.prodname_ghe_server %} replaces several paths with subdomains.
|
||||
When subdomain isolation is enabled, {% data variables.product.prodname_ghe_server %} replaces several paths with subdomains. After enabling subdomain isolation, attempts to access the previous paths for some user-supplied content, such as `http(s)://HOSTNAME/raw/`, may return `404` errors.
|
||||
|
||||
{% if currentVersion == "enterprise-server@2.22" %}
|
||||
To use Docker with {% data variables.product.prodname_registry %}, you must also enable subdomain isolation. For more information, see "[Working with the Docker registry](/enterprise/{{ currentVersion }}/user/packages/working-with-a-github-packages-registry/working-with-the-docker-registry)."
|
||||
|
||||
@@ -369,4 +369,4 @@ Name | Type | Description
|
||||
``hub.mode``|`string` | **Required**. Either `subscribe` or `unsubscribe`.
|
||||
``hub.topic``|`string` |**Required**. The URI of the GitHub repository to subscribe to. The path must be in the format of `/{owner}/{repo}/events/{event}`.
|
||||
``hub.callback``|`string` | The URI to receive the updates to the topic.
|
||||
``hub.secret``|`string` | A shared secret key that generates a SHA1 HMAC of the outgoing body content. You can verify a push came from GitHub by comparing the raw request body with the contents of the `X-Hub-Signature` header. You can see [the PubSubHubbub documentation](https://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#authednotify) for more details.
|
||||
``hub.secret``|`string` | A shared secret key that generates a hash signature of the outgoing body content. You can verify a push came from GitHub by comparing the raw request body with the contents of the {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}`X-Hub-Signature` or `X-Hub-Signature-256` headers{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature` header{% elsif currentVersion == "github-ae@latest" %}`X-Hub-Signature-256` header{% endif %}. You can see [the PubSubHubbub documentation](https://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#authednotify) for more details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% tip %}
|
||||
|
||||
**Note:** Locking a repository prevents users from pushing to the repository or modifying a repository's resources, like issues, labels, milestones, wikis, and comments. New teams and collaborators can't be associated with a locked repository.
|
||||
**Note:** Locking a repository prevents all read or write access to the repository. You cannot associate new teams or collaborators with a locked repository.
|
||||
|
||||
If you're performing a trial run, you don't need to lock repositories. Otherwise, it's highly recommended. For more information, see "[About Migrations](/enterprise/admin/migrations/about-migrations#types-of-migrations)."
|
||||
If you're performing a trial run, you do not need to lock the repository. When you migrate data from a repository that's in use, {% data variables.product.company_short %} strongly recommends locking the repository. For more information, see "[About Migrations](/enterprise/admin/migrations/about-migrations#types-of-migrations)."
|
||||
{% endtip %}
|
||||
|
||||
@@ -1 +1 @@
|
||||
Setting a webhook secret allows you to ensure that `POST` requests sent to the payload URL are from {% data variables.product.product_name %}. When you set a secret, you'll receive the {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest" %}`X-Hub-Signature` and `X-Hub-Signature-256` headers{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature` header{% elsif currentVersion == "github-ae@latest" %}`X-Hub-Signature-256` header{% endif %} in the webhook `POST` request. For more information on how to use a secret with a signature header to secure your webhook payloads, see "[Securing your webhooks](/webhooks/securing/)."
|
||||
Setting a webhook secret allows you to ensure that `POST` requests sent to the payload URL are from {% data variables.product.product_name %}. When you set a secret, you'll receive the {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}`X-Hub-Signature` and `X-Hub-Signature-256` headers{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature` header{% elsif currentVersion == "github-ae@latest" %}`X-Hub-Signature-256` header{% endif %} in the webhook `POST` request. For more information on how to use a secret with a signature header to secure your webhook payloads, see "[Securing your webhooks](/webhooks/securing/)."
|
||||
|
||||
@@ -50198,6 +50198,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "https://api.github.com",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -94693,184 +94872,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "https://api.github.com",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n https://api.github.com/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n https://api.github.com/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -31642,6 +31642,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.18/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -65625,184 +65804,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.18/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -32239,6 +32239,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.19/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -66245,184 +66424,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.19/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -32713,6 +32713,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.20/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -66807,184 +66986,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.20/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -36277,6 +36277,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.21/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -71042,184 +71221,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.21/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -44064,6 +44064,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.22/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -78682,184 +78861,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@2.22/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -48521,6 +48521,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@3.0/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -83412,184 +83591,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}/api/v3",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/api/v3/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@3.0/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -49210,6 +49210,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@3.1/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -84304,184 +84483,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://{hostname}",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://{hostname}/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/enterprise-server@3.1/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -41707,6 +41707,185 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://api.{hostname}",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/github-ae@latest/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/github-ae@latest/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
|
||||
@@ -75534,184 +75713,5 @@
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
|
||||
},
|
||||
{
|
||||
"verb": "post",
|
||||
"requestPath": "/{owner}/{repo}/content_references/{content_reference_id}/attachments",
|
||||
"serverUrl": "http(s)://api.{hostname}",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The owner of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptionHTML": "<p>The name of the repository. Determined from the <code>repository</code> <code>full_name</code> of the <code>content_reference</code> event.</p>"
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"descriptionHTML": "<p>The <code>id</code> of the <code>content_reference</code> event.</p>"
|
||||
}
|
||||
],
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "Shell",
|
||||
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://api.{hostname}/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
|
||||
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n http(s)://api.{hostname}/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'</code></pre>"
|
||||
},
|
||||
{
|
||||
"lang": "JavaScript",
|
||||
"source": "await octokit.request('POST /{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
|
||||
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /{owner}/{repo}/content_references/{content_reference_id}/attachments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">content_reference_id</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">title</span>: <span class=\"hljs-string\">'title'</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">mediaType</span>: {\n <span class=\"hljs-attr\">previews</span>: [\n <span class=\"hljs-string\">'corsair'</span>\n ]\n }\n})\n</code></pre>"
|
||||
}
|
||||
],
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
"body": {
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-github": {
|
||||
"githubCloudOnly": false,
|
||||
"enabledForGitHubApps": true,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
|
||||
"html": "<p>To access the Content Attachments API during the preview period, you must provide a custom <a href=\"https://docs.github.com/github-ae@latest/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code class=\"hljs language-shell\">application/vnd.github.corsair-preview+json</code></pre>"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
},
|
||||
"slug": "create-a-content-attachment",
|
||||
"category": "apps",
|
||||
"categoryLabel": "Apps",
|
||||
"subcategory": "installations",
|
||||
"subcategoryLabel": "Installations",
|
||||
"notes": [],
|
||||
"descriptionHTML": "<p>Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the <code>id</code> and <code>repository</code> <code>full_name</code> of the content reference from the <a href=\"https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference\"><code>content_reference</code> event</a> to create an attachment.</p>\n<p>The app must create a content attachment within six hours of the content reference URL being posted. See \"<a href=\"https://docs.github.com/github-ae@latest/apps/using-content-attachments/\">Using content attachments</a>\" for details about content attachments.</p>\n<p>You must use an <a href=\"https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation\">installation access token</a> to access this endpoint.</p>",
|
||||
"bodyParameters": [
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The title of the attachment</p>",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"name": "title",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The title of the attachment",
|
||||
"childParamsGroups": []
|
||||
},
|
||||
{
|
||||
"description": "<p><strong>Required</strong>. The body of the attachment</p>",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144,
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"rawType": "string",
|
||||
"rawDescription": "The body of the attachment",
|
||||
"childParamsGroups": []
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"httpStatusMessage": "OK",
|
||||
"description": "Response",
|
||||
"payload": "<pre><code class=\"hljs language-json\">{\n <span class=\"hljs-attr\">\"id\"</span>: <span class=\"hljs-number\">101</span>,\n <span class=\"hljs-attr\">\"title\"</span>: <span class=\"hljs-string\">\"[A-1234] Error found in core/models.py file'\"</span>,\n <span class=\"hljs-attr\">\"body\"</span>: <span class=\"hljs-string\">\"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"</span>\n}\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "304",
|
||||
"httpStatusMessage": "Not Modified",
|
||||
"description": "Not modified"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "403",
|
||||
"httpStatusMessage": "Forbidden",
|
||||
"description": "Forbidden"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"httpStatusMessage": "Not Found",
|
||||
"description": "Resource not found"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "410",
|
||||
"httpStatusMessage": "Gone",
|
||||
"description": "Gone"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "415",
|
||||
"httpStatusMessage": "Unsupported Media Type",
|
||||
"description": "Preview header missing"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "422",
|
||||
"httpStatusMessage": "Unprocessable Entity",
|
||||
"description": "Validation failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -185332,6 +185332,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -392433,313 +392740,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117293,6 +117293,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -296922,313 +297229,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120335,6 +120335,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -300288,313 +300595,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122556,6 +122556,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -303594,313 +303901,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134168,6 +134168,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -313642,313 +313949,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165071,6 +165071,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -345131,313 +345438,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170466,6 +170466,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -350852,313 +351159,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173350,6 +173350,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -355243,313 +355550,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141894,6 +141894,313 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/contents/{path}": {
|
||||
"get": {
|
||||
"summary": "Get repository content",
|
||||
@@ -311664,313 +311971,6 @@
|
||||
"category": "meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
|
||||
"post": {
|
||||
"summary": "Create a content attachment",
|
||||
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
|
||||
"tags": [
|
||||
"apps"
|
||||
],
|
||||
"operationId": "apps/create-content-attachment",
|
||||
"externalDocs": {
|
||||
"description": "API method documentation",
|
||||
"url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "content_reference_id",
|
||||
"description": "The `id` of the `content_reference` event.",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "ContentReferenceAttachment",
|
||||
"description": "Content Reference attachments allow you to provide context around URLs posted in comments",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The ID of the attachment",
|
||||
"example": 21,
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"description": "The title of the attachment",
|
||||
"example": "Title of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"body": {
|
||||
"description": "The body of the attachment",
|
||||
"example": "Body of the attachment",
|
||||
"type": "string",
|
||||
"maxLength": 262144
|
||||
},
|
||||
"node_id": {
|
||||
"description": "The node_id of the content attachment",
|
||||
"example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 101,
|
||||
"title": "[A-1234] Error found in core/models.py file'",
|
||||
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Validation Error",
|
||||
"description": "Validation Error",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code"
|
||||
],
|
||||
"properties": {
|
||||
"resource": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"410": {
|
||||
"description": "Gone",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"415": {
|
||||
"description": "Preview header missing",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message",
|
||||
"documentation_url"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"documentation_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Not modified"
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"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,
|
||||
"previews": [
|
||||
{
|
||||
"required": true,
|
||||
"name": "corsair",
|
||||
"note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
|
||||
}
|
||||
],
|
||||
"category": "apps",
|
||||
"subcategory": "installations"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user