You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
43100
+
43101
+
The 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.
43102
+
43103
+
You 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.
description: The owner of the repository. Determined from the `repository`
43113
+
`full_name` of the `content_reference` event.
43114
+
in: path
43115
+
required: true
43116
+
schema:
43117
+
type: string
43118
+
- name: repo
43119
+
description: The name of the repository. Determined from the `repository`
43120
+
`full_name` of the `content_reference` event.
43121
+
in: path
43122
+
required: true
43123
+
schema:
43124
+
type: string
43125
+
- name: content_reference_id
43126
+
description: The `id` of the `content_reference` event.
43127
+
in: path
43128
+
required: true
43129
+
schema:
43130
+
type: integer
43131
+
requestBody:
43132
+
content:
43133
+
application/json:
43134
+
schema:
43135
+
properties:
43136
+
title:
43137
+
description: The title of the attachment
43138
+
example: Title of the attachment
43139
+
type: string
43140
+
maxLength: 1024
43141
+
body:
43142
+
description: The body of the attachment
43143
+
example: Body of the attachment
43144
+
type: string
43145
+
maxLength: 262144
43146
+
required:
43147
+
- title
43148
+
- body
43149
+
type: object
43150
+
responses:
43151
+
'200':
43152
+
description: Response
43153
+
content:
43154
+
application/json:
43155
+
schema:
43156
+
title: ContentReferenceAttachment
43157
+
description: Content Reference attachments allow you to provide context
43158
+
around URLs posted in comments
43159
+
type: object
43160
+
properties:
43161
+
id:
43162
+
description: The ID of the attachment
43163
+
example: 21
43164
+
type: integer
43165
+
title:
43166
+
description: The title of the attachment
43167
+
example: Title of the attachment
43168
+
type: string
43169
+
maxLength: 1024
43170
+
body:
43171
+
description: The body of the attachment
43172
+
example: Body of the attachment
43173
+
type: string
43174
+
maxLength: 262144
43175
+
node_id:
43176
+
description: The node_id of the content attachment
43177
+
example: MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=
43178
+
type: string
43179
+
required:
43180
+
- id
43181
+
- title
43182
+
- body
43183
+
examples:
43184
+
default:
43185
+
value:
43186
+
id: 101
43187
+
title: "[A-1234] Error found in core/models.py file'"
43188
+
body: |-
43189
+
You have used an email that already exists for the user_email_uniq field.
43190
+
## DETAILS:
43191
+
43192
+
The (email)=(Octocat@github.com) already exists.
43193
+
43194
+
The error was found in core/models.py in get_or_create_user at line 62.
43195
+
43196
+
self.save()
43197
+
'422':
43198
+
description: Validation failed
43199
+
content: *22
43200
+
'404':
43201
+
description: Resource not found
43202
+
content: *10
43203
+
'410':
43204
+
description: Gone
43205
+
content: *163
43206
+
'415':
43207
+
description: Preview header missing
43208
+
content: *13
43209
+
'304':
43210
+
description: Not modified
43211
+
'403':
43212
+
description: Forbidden
43213
+
content: *17
43214
+
x-github:
43215
+
githubCloudOnly: false
43216
+
enabledForGitHubApps: true
43217
+
previews:
43218
+
- required: true
43219
+
name: corsair
43220
+
note: |-
43221
+
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:
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.
79232
-
79233
-
The 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.
79234
-
79235
-
You 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.
description: The owner of the repository. Determined from the `repository`
79245
-
`full_name` of the `content_reference` event.
79246
-
in: path
79247
-
required: true
79248
-
schema:
79249
-
type: string
79250
-
- name: repo
79251
-
description: The name of the repository. Determined from the `repository`
79252
-
`full_name` of the `content_reference` event.
79253
-
in: path
79254
-
required: true
79255
-
schema:
79256
-
type: string
79257
-
- name: content_reference_id
79258
-
description: The `id` of the `content_reference` event.
79259
-
in: path
79260
-
required: true
79261
-
schema:
79262
-
type: integer
79263
-
requestBody:
79264
-
content:
79265
-
application/json:
79266
-
schema:
79267
-
properties:
79268
-
title:
79269
-
description: The title of the attachment
79270
-
example: Title of the attachment
79271
-
type: string
79272
-
maxLength: 1024
79273
-
body:
79274
-
description: The body of the attachment
79275
-
example: Body of the attachment
79276
-
type: string
79277
-
maxLength: 262144
79278
-
required:
79279
-
- title
79280
-
- body
79281
-
type: object
79282
-
responses:
79283
-
'200':
79284
-
description: Response
79285
-
content:
79286
-
application/json:
79287
-
schema:
79288
-
title: ContentReferenceAttachment
79289
-
description: Content Reference attachments allow you to provide context
79290
-
around URLs posted in comments
79291
-
type: object
79292
-
properties:
79293
-
id:
79294
-
description: The ID of the attachment
79295
-
example: 21
79296
-
type: integer
79297
-
title:
79298
-
description: The title of the attachment
79299
-
example: Title of the attachment
79300
-
type: string
79301
-
maxLength: 1024
79302
-
body:
79303
-
description: The body of the attachment
79304
-
example: Body of the attachment
79305
-
type: string
79306
-
maxLength: 262144
79307
-
node_id:
79308
-
description: The node_id of the content attachment
79309
-
example: MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=
79310
-
type: string
79311
-
required:
79312
-
- id
79313
-
- title
79314
-
- body
79315
-
examples:
79316
-
default:
79317
-
value:
79318
-
id: 101
79319
-
title: "[A-1234] Error found in core/models.py file'"
79320
-
body: |-
79321
-
You have used an email that already exists for the user_email_uniq field.
79322
-
## DETAILS:
79323
-
79324
-
The (email)=(Octocat@github.com) already exists.
79325
-
79326
-
The error was found in core/models.py in get_or_create_user at line 62.
79327
-
79328
-
self.save()
79329
-
'422':
79330
-
description: Validation failed
79331
-
content: *22
79332
-
'404':
79333
-
description: Resource not found
79334
-
content: *10
79335
-
'410':
79336
-
description: Gone
79337
-
content: *163
79338
-
'415':
79339
-
description: Preview header missing
79340
-
content: *13
79341
-
'304':
79342
-
description: Not modified
79343
-
'403':
79344
-
description: Forbidden
79345
-
content: *17
79346
-
x-github:
79347
-
githubCloudOnly: false
79348
-
enabledForGitHubApps: true
79349
-
previews:
79350
-
- required: true
79351
-
name: corsair
79352
-
note: |-
79353
-
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:
0 commit comments