Branch was updated using the 'autoupdate branch' Actions workflow.
This commit is contained in:
@@ -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