-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathopenapi.yaml
9275 lines (9181 loc) · 327 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: Figma API
version: 0.29.0
description: |-
This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api).
Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API. If you notice any inaccuracies with the specification, please [file an issue](https://github.com/figma/rest-api-spec/issues).
termsOfService: https://www.figma.com/developer-terms/
contact:
email: [email protected]
servers:
- url: https://api.figma.com
externalDocs:
description: Figma REST API Documentation
url: https://www.figma.com/developers/api
tags:
- name: Files
description: Get file JSON, images, and other file-related content.
externalDocs:
description: File endpoints documentation
url: https://www.figma.com/developers/api#files
- name: Comments
description: Interact with file comments.
externalDocs:
description: Comment endpoints documentation
url: https://www.figma.com/developers/api#comments
- name: Comment Reactions
description: Interact with reactions to file comments.
externalDocs:
description: Comment endpoints documentation
url: https://www.figma.com/developers/api#comments
- name: Projects
description: Get information about projects and files in teams.
externalDocs:
description: Project endpoints documentation
url: https://www.figma.com/developers/api#projects
- name: Users
description: Get information about the currently authenticated user.
externalDocs:
description: User endpoints documentation
url: https://www.figma.com/developers/api#users
- name: Components
description: Get information about published components.
externalDocs:
description: Component and style endpoints documentation
url: https://www.figma.com/developers/api#library-items
- name: Component Sets
description: Get information about published component sets.
externalDocs:
description: Component and style endpoints documentation
url: https://www.figma.com/developers/api#library-items
- name: Styles
description: Get information about published styles.
externalDocs:
description: Component and style endpoints documentation
url: https://www.figma.com/developers/api#library-items
- name: Webhooks
description: Interact with team webhooks as a team admin.
externalDocs:
description: Webhook endpoints documentation
url: https://www.figma.com/developers/api#webhooks_v2
- name: Activity Logs
description: Get activity logs as an organization admin.
externalDocs:
description: Activity log endpoints documentation
url: https://www.figma.com/developers/api#activity_logs
- name: Payments
description: Get purchase information for your Community resources.
externalDocs:
description: Payment endpoints documentation
url: https://www.figma.com/developers/api#payments
- name: Variables
description: Interact with variables in an Enterprise organization.
externalDocs:
description: Variables endpoints documentation
url: https://www.figma.com/developers/api#variables
- name: Dev Resources
description: Interact with dev resources in Figma Dev Mode.
externalDocs:
description: Dev resource endpoints documentation
url: https://www.figma.com/developers/api#dev-resources
- name: Library Analytics
description: Get analytics data for your published libraries.
externalDocs:
description: Library analytics endpoints documentation
url: https://www.figma.com/developers/api#library-analytics
paths:
/v1/files/{file_key}:
get:
tags:
- Files
summary: Get file JSON
security:
- PersonalAccessToken: []
- OAuth2:
- file_content:read
- files:read
description: |-
Returns the document identified by `file_key` as a JSON object. The file key can be parsed from any Figma file url: `https://www.figma.com/file/{file_key}/{title}`.
The `document` property contains a node of type `DOCUMENT`.
The `components` property contains a mapping from node IDs to component metadata. This is to help you determine which components each instance comes from.
operationId: getFile
parameters:
- name: file_key
in: path
description: File to export JSON from. This can be a file key or branch key. Use
`GET /v1/files/:key` with the `branch_data` query param to get the
branch key.
required: true
schema:
type: string
- name: version
in: query
description: A specific version ID to get. Omitting this will get the current
version of the file.
schema:
type: string
- name: ids
in: query
description: |-
Comma separated list of nodes that you care about in the document. If specified, only a subset of the document will be returned corresponding to the nodes listed, their children, and everything between the root node and the listed nodes.
Note: There may be other nodes included in the returned JSON that are outside the ancestor chains of the desired nodes. The response may also include dependencies of anything in the nodes' subtrees. For example, if a node subtree contains an instance of a local component that lives elsewhere in that file, that component and its ancestor chain will also be included.
For historical reasons, top-level canvas nodes are always returned, regardless of whether they are listed in the `ids` parameter. This quirk may be removed in a future version of the API.
schema:
type: string
- name: depth
in: query
description: Positive integer representing how deep into the document tree to
traverse. For example, setting this to 1 returns only Pages, setting
it to 2 returns Pages and all top level objects on each page. Not
setting this parameter returns all nodes.
schema:
type: number
- name: geometry
in: query
description: Set to "paths" to export vector data.
schema:
type: string
- name: plugin_data
in: query
description: A comma separated list of plugin IDs and/or the string "shared".
Any data present in the document written by those plugins will be
included in the result in the `pluginData` and `sharedPluginData`
properties.
schema:
type: string
- name: branch_data
in: query
description: "Returns branch metadata for the requested file. If the file is a
branch, the main file's key will be included in the returned
response. If the file has branches, their metadata will be included
in the returned response. Default: false."
schema:
type: boolean
default: false
responses:
"200":
$ref: "#/components/responses/GetFileResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/files/{file_key}/nodes:
get:
tags:
- Files
summary: Get file JSON for specific nodes
security:
- PersonalAccessToken: []
- OAuth2:
- file_content:read
- files:read
description: |-
Returns the nodes referenced to by `ids` as a JSON object. The nodes are retrieved from the Figma file referenced to by `file_key`.
The node ID and file key can be parsed from any Figma node url: `https://www.figma.com/file/{file_key}/{title}?node-id={id}`
The `name`, `lastModified`, `thumbnailUrl`, `editorType`, and `version` attributes are all metadata of the specified file.
The `linkAccess` field describes the file link share permission level. There are 5 types of permissions a shared link can have: `"inherit"`, `"view"`, `"edit"`, `"org_view"`, and `"org_edit"`. `"inherit"` is the default permission applied to files created in a team project, and will inherit the project's permissions. `"org_view"` and `"org_edit"` restrict the link to org users.
The `document` attribute contains a Node of type `DOCUMENT`.
The `components` key contains a mapping from node IDs to component metadata. This is to help you determine which components each instance comes from.
By default, no vector data is returned. To return vector data, pass the geometry=paths parameter to the endpoint.
Each node can also inherit properties from applicable styles. The styles key contains a mapping from style IDs to style metadata.
Important: the nodes map may contain values that are `null`. This may be due to the node id not existing within the specified file.
operationId: getFileNodes
parameters:
- name: file_key
in: path
description: File to export JSON from. This can be a file key or branch key. Use
`GET /v1/files/:key` with the `branch_data` query param to get the
branch key.
required: true
schema:
type: string
- name: ids
in: query
description: A comma separated list of node IDs to retrieve and convert.
required: true
schema:
type: string
- name: version
in: query
description: A specific version ID to get. Omitting this will get the current
version of the file.
schema:
type: string
- name: depth
in: query
description: |-
Positive integer representing how deep into the node tree to traverse. For example, setting this to 1 will return only the children directly underneath the desired nodes. Not setting this parameter returns all nodes.
Note: this parameter behaves differently from the same parameter in the `GET /v1/files/:key` endpoint. In this endpoint, the depth will be counted starting from the desired node rather than the document root node.
schema:
type: number
- name: geometry
in: query
description: Set to "paths" to export vector data.
schema:
type: string
- name: plugin_data
in: query
description: A comma separated list of plugin IDs and/or the string "shared".
Any data present in the document written by those plugins will be
included in the result in the `pluginData` and `sharedPluginData`
properties.
schema:
type: string
responses:
"200":
$ref: "#/components/responses/GetFileNodesResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/images/{file_key}:
get:
tags:
- Files
summary: Render images of file nodes
security:
- PersonalAccessToken: []
- OAuth2:
- file_content:read
- files:read
description: |
Renders images from a file.
If no error occurs, `"images"` will be populated with a map from node IDs to URLs of the rendered images, and `"status"` will be omitted. The image assets will expire after 30 days. Images up to 32 megapixels can be exported. Any images that are larger will be scaled down.
Important: the image map may contain values that are `null`. This indicates that rendering of that specific node has failed. This may be due to the node id not existing, or other reasons such has the node having no renderable components. It is guaranteed that any node that was requested for rendering will be represented in this map whether or not the render succeeded.
To render multiple images from the same file, use the `ids` query parameter to specify multiple node ids.
```
GET /v1/images/:key?ids=1:2,1:3,1:4
```
operationId: getImages
parameters:
- name: file_key
in: path
description: File to export images from. This can be a file key or branch key.
Use `GET /v1/files/:key` with the `branch_data` query param to get
the branch key.
required: true
schema:
type: string
- name: ids
in: query
description: A comma separated list of node IDs to render.
required: true
schema:
type: string
- name: version
in: query
description: A specific version ID to get. Omitting this will get the current
version of the file.
schema:
type: string
- name: scale
in: query
description: A number between 0.01 and 4, the image scaling factor.
schema:
type: number
minimum: 0.01
maximum: 4
- name: format
in: query
description: A string enum for the image output format.
schema:
type: string
enum:
- jpg
- png
- svg
- pdf
default: png
- name: svg_outline_text
in: query
description: |-
Whether text elements are rendered as outlines (vector paths) or as `<text>` elements in SVGs.
Rendering text elements as outlines guarantees that the text looks exactly the same in the SVG as it does in the browser/inside Figma.
Exporting as `<text>` allows text to be selectable inside SVGs and generally makes the SVG easier to read. However, this relies on the browser's rendering engine which can vary between browsers and/or operating systems. As such, visual accuracy is not guaranteed as the result could look different than in Figma.
schema:
type: boolean
default: true
- name: svg_include_id
in: query
description: Whether to include id attributes for all SVG elements. Adds the
layer name to the `id` attribute of an svg element.
schema:
type: boolean
default: false
- name: svg_include_node_id
in: query
description: Whether to include node id attributes for all SVG elements. Adds
the node id to a `data-node-id` attribute of an svg element.
schema:
type: boolean
default: false
- name: svg_simplify_stroke
in: query
description: Whether to simplify inside/outside strokes and use stroke attribute
if possible instead of `<mask>`.
schema:
type: boolean
default: true
- name: contents_only
in: query
description: Whether content that overlaps the node should be excluded from
rendering. Passing false (i.e., rendering overlaps) may increase
processing time, since more of the document must be included in
rendering.
schema:
type: boolean
default: true
- name: use_absolute_bounds
in: query
description: Use the full dimensions of the node regardless of whether or not it
is cropped or the space around it is empty. Use this to export text
nodes without cropping.
schema:
type: boolean
default: false
responses:
"200":
$ref: "#/components/responses/GetImagesResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/files/{file_key}/images:
get:
tags:
- Files
summary: Get image fills
security:
- PersonalAccessToken: []
- OAuth2:
- file_content:read
- files:read
description: |-
Returns download links for all images present in image fills in a document. Image fills are how Figma represents any user supplied images. When you drag an image into Figma, we create a rectangle with a single fill that represents the image, and the user is able to transform the rectangle (and properties on the fill) as they wish.
This endpoint returns a mapping from image references to the URLs at which the images may be download. Image URLs will expire after no more than 14 days. Image references are located in the output of the GET files endpoint under the `imageRef` attribute in a `Paint`.
operationId: getImageFills
parameters:
- name: file_key
in: path
description: File to get image URLs from. This can be a file key or branch key.
Use `GET /v1/files/:key` with the `branch_data` query param to get
the branch key.
required: true
schema:
type: string
responses:
"200":
$ref: "#/components/responses/GetImageFillsResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/teams/{team_id}/projects:
get:
tags:
- Projects
summary: Get projects in a team
security:
- PersonalAccessToken: []
- OAuth2:
- projects:read
- files:read
description: "You can use this endpoint to get a list of all the Projects within
the specified team. This will only return projects visible to the
authenticated user or owner of the developer token. Note: it is not
currently possible to programmatically obtain the team id of a user just
from a token. To obtain a team id, navigate to a team page of a team you
are a part of. The team id will be present in the URL after the word
team and before your team name."
operationId: getTeamProjects
parameters:
- name: team_id
in: path
description: ID of the team to list projects from
required: true
schema:
type: string
responses:
"200":
$ref: "#/components/responses/GetTeamProjectsResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/projects/{project_id}/files:
get:
tags:
- Projects
summary: Get files in a project
security:
- PersonalAccessToken: []
- OAuth2:
- projects:read
- files:read
description: Get a list of all the Files within the specified project.
operationId: getProjectFiles
parameters:
- name: project_id
in: path
description: ID of the project to list files from
required: true
schema:
type: string
- name: branch_data
in: query
description: Returns branch metadata in the response for each main file with a
branch inside the project.
schema:
type: boolean
default: false
responses:
"200":
$ref: "#/components/responses/GetProjectFilesResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/files/{file_key}/versions:
get:
tags:
- Files
summary: Get versions of a file
security:
- PersonalAccessToken: []
- OAuth2:
- file_versions:read
- files:read
description: This endpoint fetches the version history of a file, allowing you
to see the progression of a file over time. You can then use this
information to render a specific version of the file, via another
endpoint.
operationId: getFileVersions
parameters:
- name: file_key
in: path
description: File to get version history from. This can be a file key or branch
key. Use `GET /v1/files/:key` with the `branch_data` query param to
get the branch key.
required: true
schema:
type: string
- name: page_size
in: query
description: The number of items returned in a page of the response. If not
included, `page_size` is `30`.
schema:
type: number
maximum: 50
- name: before
in: query
description: A version ID for one of the versions in the history. Gets versions
before this ID. Used for paginating. If the response is not
paginated, this link returns the same data in the current response.
schema:
type: number
- name: after
in: query
description: A version ID for one of the versions in the history. Gets versions
after this ID. Used for paginating. If the response is not
paginated, this property is not included.
schema:
type: number
responses:
"200":
$ref: "#/components/responses/GetFileVersionsResponse"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/files/{file_key}/comments:
get:
tags:
- Comments
summary: Get comments in a file
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:read
- files:read
description: Gets a list of comments left on the file.
operationId: getComments
parameters:
- name: file_key
in: path
description: File to get comments from. This can be a file key or branch key.
Use `GET /v1/files/:key` with the `branch_data` query param to get
the branch key.
required: true
schema:
type: string
- name: as_md
in: query
description: If enabled, will return comments as their markdown equivalents when
applicable.
schema:
type: boolean
responses:
"200":
$ref: "#/components/responses/GetCommentsResponse"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
post:
tags:
- Comments
summary: Add a comment to a file
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:write
description: Posts a new comment on the file.
operationId: postComment
parameters:
- name: file_key
in: path
description: File to add comments in. This can be a file key or branch key. Use
`GET /v1/files/:key` with the `branch_data` query param to get the
branch key.
required: true
schema:
type: string
requestBody:
description: Comment to post.
required: true
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: The text contents of the comment to post.
comment_id:
type: string
description: The ID of the comment to reply to, if any. This must be a root
comment. You cannot reply to other replies (a comment that
has a parent_id).
client_meta:
description: The position where to place the comment.
oneOf:
- $ref: "#/components/schemas/Vector"
- $ref: "#/components/schemas/FrameOffset"
- $ref: "#/components/schemas/Region"
- $ref: "#/components/schemas/FrameOffsetRegion"
required:
- message
responses:
"200":
$ref: "#/components/responses/PostCommentResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/files/{file_key}/comments/{comment_id}:
delete:
tags:
- Comments
summary: Delete a comment
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:write
description: Deletes a specific comment. Only the person who made the comment is
allowed to delete it.
operationId: deleteComment
parameters:
- name: file_key
in: path
description: File to delete comment from. This can be a file key or branch key.
Use `GET /v1/files/:key` with the `branch_data` query param to get
the branch key.
required: true
schema:
type: string
- name: comment_id
in: path
description: Comment id of comment to delete
required: true
schema:
type: string
responses:
"200":
$ref: "#/components/responses/DeleteCommentResponse"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/files/{file_key}/comments/{comment_id}/reactions:
get:
tags:
- Comment Reactions
summary: Get reactions for a comment
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:read
- files:read
description: Gets a paginated list of reactions left on the comment.
operationId: getCommentReactions
parameters:
- name: file_key
in: path
description: File to get comment containing reactions from. This can be a file
key or branch key. Use `GET /v1/files/:key` with the `branch_data`
query param to get the branch key.
required: true
schema:
type: string
- name: comment_id
in: path
description: ID of comment to get reactions from.
required: true
schema:
type: string
- name: cursor
in: query
description: Cursor for pagination, retrieved from the response of the previous
call.
schema:
type: string
responses:
"200":
$ref: "#/components/responses/GetCommentReactionsResponse"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
post:
tags:
- Comment Reactions
summary: Add a reaction to a comment
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:write
description: Posts a new comment reaction on a file comment.
operationId: postCommentReaction
parameters:
- name: file_key
in: path
description: File to post comment reactions to. This can be a file key or branch
key. Use `GET /v1/files/:key` with the `branch_data` query param to
get the branch key.
required: true
schema:
type: string
- name: comment_id
in: path
description: ID of comment to react to.
required: true
schema:
type: string
requestBody:
description: Reaction to post.
required: true
content:
application/json:
schema:
type: object
properties:
emoji:
$ref: "#/components/schemas/Emoji"
required:
- emoji
responses:
"200":
$ref: "#/components/responses/PostCommentReactionResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
delete:
tags:
- Comment Reactions
summary: Delete a reaction
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:write
description: Deletes a specific comment reaction. Only the person who made the
reaction is allowed to delete it.
operationId: deleteCommentReaction
parameters:
- name: file_key
in: path
description: File to delete comment reaction from. This can be a file key or
branch key. Use `GET /v1/files/:key` with the `branch_data` query
param to get the branch key.
required: true
schema:
type: string
- name: comment_id
in: path
description: ID of comment to delete reaction from.
required: true
schema:
type: string
- name: emoji
in: query
required: true
schema:
$ref: "#/components/schemas/Emoji"
responses:
"200":
$ref: "#/components/responses/DeleteCommentReactionResponse"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/me:
get:
tags:
- Users
summary: Get current user
security:
- PersonalAccessToken: []
- OAuth2:
- current_user:read
- files:read
description: Returns the user information for the currently authenticated user.
operationId: getMe
responses:
"200":
$ref: "#/components/responses/GetMeResponse"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/teams/{team_id}/components:
get:
tags:
- Components
summary: Get team components
security:
- PersonalAccessToken: []
- OAuth2:
- team_library_content:read
- files:read
description: Get a paginated list of published components within a team library.
operationId: getTeamComponents
parameters:
- name: team_id
in: path
description: Id of the team to list components from.
required: true
schema:
type: string
- name: page_size
in: query
description: Number of items to return in a paged list of results. Defaults to 30.
schema:
type: number
default: 30
- name: after
in: query
description: Cursor indicating which id after which to start retrieving
components for. Exclusive with before. The cursor value is an
internally tracked integer that doesn't correspond to any Ids.
schema:
type: number
- name: before
in: query
description: Cursor indicating which id before which to start retrieving
components for. Exclusive with after. The cursor value is an
internally tracked integer that doesn't correspond to any Ids.
schema:
type: number
responses:
"200":
$ref: "#/components/responses/GetTeamComponentsResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/files/{file_key}/components:
get:
tags:
- Components
summary: Get file components
security:
- PersonalAccessToken: []
- OAuth2:
- library_content:read
- files:read
description: Get a list of published components within a file library.
operationId: getFileComponents
parameters:
- name: file_key
in: path
description: File to list components from. This must be a main file key, not a
branch key, as it is not possible to publish from branches.
required: true
schema:
type: string
responses:
"200":
$ref: "#/components/responses/GetFileComponentsResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/components/{key}:
get:
tags:
- Components
summary: Get component
security:
- PersonalAccessToken: []
- OAuth2:
- library_assets:read
- files:read
description: Get metadata on a component by key.
operationId: getComponent
parameters:
- name: key
in: path
description: The unique identifier of the component.
required: true
schema:
type: string
responses:
"200":
$ref: "#/components/responses/GetComponentResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":
$ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean"
"429":
$ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage"
"500":
$ref: "#/components/responses/InternalServerErrorResponseWithErrMessage"
/v1/teams/{team_id}/component_sets:
get:
tags:
- Component Sets
summary: Get team component sets
security:
- PersonalAccessToken: []
- OAuth2:
- team_library_content:read
- files:read
description: Get a paginated list of published component sets within a team library.
operationId: getTeamComponentSets
parameters:
- name: team_id
in: path
description: Id of the team to list component sets from.
required: true
schema:
type: string
- name: page_size
in: query
description: Number of items to return in a paged list of results. Defaults to 30.
schema:
type: number
default: 30
- name: after
in: query
description: Cursor indicating which id after which to start retrieving
component sets for. Exclusive with before. The cursor value is an
internally tracked integer that doesn't correspond to any Ids.
schema:
type: number
- name: before
in: query
description: Cursor indicating which id before which to start retrieving
component sets for. Exclusive with after. The cursor value is an
internally tracked integer that doesn't correspond to any Ids.
schema:
type: number
responses:
"200":
$ref: "#/components/responses/GetTeamComponentSetsResponse"
"400":
$ref: "#/components/responses/BadRequestErrorResponseWithErrMessage"
"403":
$ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage"
"404":