-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
2020 lines (1993 loc) · 64.6 KB
/
Copy pathopenapi.yml
File metadata and controls
2020 lines (1993 loc) · 64.6 KB
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.0.0
info:
title: Qiita API v2
version: 0.0.1
description: |
## 概要
このドキュメントではQiita API v2の仕様について説明します。
## リクエスト
APIとの全ての通信にはHTTPSプロトコルを利用します。アクセス先のホストには、Qiitaのデータを利用する場合には `qiita.com` を利用し、Qiita Teamのデータを利用する場合には `*.qiita.com` を利用します ( `*` には所属しているTeamのIDが入ります)。
## パラメータ
API v2へのリクエストには、GET、POST、PUT、PATCH、DELETEの5種類のHTTPメソッドを利用します。多くのAPIへのリクエストにはパラメータを含められますが、GETリクエストにパラメータを含める場合にはURIクエリを利用し、それ以外の場合にはリクエストボディを利用します。パラメータには、ページネーション用途など任意で渡すものと、投稿時の本文など必須のものが存在します。APIドキュメントには、各APIごとに送信可能なパラメータが記載されています。
## 利用制限
認証している状態ではユーザーごとに1時間に1000回まで、認証していない状態ではIPアドレスごとに1時間に60回までリクエストを受け付けます。
## シングルサインオンを利用中のチームについて
シングルサインオンによる認証のみを許可しているQiita Teamのチームでは、セキュリティ上の理由から、チーム別アクセストークンでのみAPIを利用したアクセスが可能です。
## ステータスコード
200、201、204、400、401、403、404、500の8種類のステータスコードを利用します。GETまたはPATCHリクエストに対しては200を、POSTリクエストに対しては201を、PUTまたはDELETEリクエストに対しては204を返します。但し、エラーが起きた場合にはその他のステータスコードの中から適切なものを返します。
## データ形式
APIとのデータの送受信にはJSONを利用します。JSONをリクエストボディに含める場合、リクエストのContent-Typeヘッダにapplication/jsonを指定してください。但し、GETリクエストにバラメータを含める場合にはURIクエリを利用します。また、PUTリクエストまたはDELETEリクエストに対してはレスポンスボディが返却されません。日時を表現する場合には、[ISO 8601](http://ja.wikipedia.org/wiki/ISO_8601) 形式の文字列を利用します。
```
GET /api/v2/items?page=1&per_page=20 HTTP/1.1
```
## エラーレスポンス
エラーが発生した場合、エラーを表現するオブジェクトを含んだエラーレスポンスが返却されます。このオブジェクトには、エラーの内容を説明するmessageプロパティと、エラーの種類を表すtypeプロパティで構成されます。typeプロパティはエラーの種類ごとに一意な文字列で、`^[a-z0-9_]+$` というパターンで表現できます。
```
{
"message": "Not found",
"type": "not_found"
}
```
## ページネーション
一部の配列を返すAPIでは、全ての要素を一度に返すようにはなっておらず、代わりにページを指定できるようになっています。これらのAPIには、1から始まるページ番号を表すpageパラメータと、1ページあたりに含まれる要素数を表すper_pageパラメータを指定することができます。pageの初期値は1、pageの最大値は100に設定されています。また、per_pageの初期値は20、per_pageの最大値は100に設定されています。
ページを指定できるAPIでは、[Linkヘッダ](http://tools.ietf.org/html/rfc5988) を含んだレスポンスを返します。Linkヘッダには、最初のページと最後のページへのリンクに加え、存在する場合には次のページと前のページへのリンクが含まれます。個々のリンクにはそれぞれ、first、last、next、prevという値を含んだrel属性が紐付けられます。
```
Link: <https://qiita.com/api/v2/users?page=1>; rel="first",
<https://qiita.com/api/v2/users?page=1>; rel="prev",
<https://qiita.com/api/v2/users?page=3>; rel="next",
<https://qiita.com/api/v2/users?page=6>; rel="last"
```
また、ページを指定できるAPIでは、要素の合計数が `Total-Count` レスポンスヘッダに含まれます。
```
Total-Count: 6
```
## JSON Schema
Qiita API v2では、APIのインターフェースを定義したJSON-Schemaを提供しています。このスキーマでは、APIでどのようなリソースが提供されているか、それらはどのようなプロパティを持っているか、それらがどのように表現されるか、及びどのような操作が提供されているかといった事柄が定義されています。スキーマには、次のURLでアクセスできます。
- https://qiita.com/api/v2/schema
- https://qiita.com/api/v2/schema?locale=en
- https://qiita.com/api/v2/schema?locale=ja
contact:
name: nanato12
url: 'https://github.com/nanato12'
email: admin@okj.info
termsOfService: 'https://github.com/nanato12/qiita-openapi'
servers:
- url: 'https://qiita.com'
description: When using data from Qiita
- url: 'https://{team_id}.qiita.com'
description: When using Qiita Team data
security:
- Bearer: []
tags:
- name: user
- name: team
paths:
/api/v2/oauth/authorize:
get:
summary: Get OAuth authorize
responses:
'200':
description: OK
operationId: get-oauth-authorize
description: |-
read_qiita_team、write_qiita_teamを使う場合、authorizeページによる認証認可は2020年6月5日に非推奨となりました。今後はご利用されるチームのホストでteam_authorizeをご利用ください。
アクセストークンを発行するには、アプリケーションのユーザーに認可画面を表示する必要があります。ユーザーがアプリケーションからのアクセスを認可すると、アプリケーション登録時に指定されたURLにリダイレクトされます。このとき、リダイレクト先のURLクエリにcodeが付与されます。また指定した場合は state も付与されます。アプリケーションでは、この code の値を利用して POST /api/v2/access_tokens にリクエストを送り、アクセストークンを発行します。
parameters:
- $ref: '#/components/parameters/client_id'
- $ref: '#/components/parameters/scope'
- $ref: '#/components/parameters/state'
tags:
- user
/api/v2/oauth/team_authorize:
get:
summary: Get OAuth team authorize
tags:
- team
responses:
'200':
description: OK
operationId: get-oauth-team-authorize
description: チーム別アクセストークンを発行するには、それぞれのチームでアプリケーションのユーザーに認可画面を表示する必要があります。ユーザーがアプリケーションからのアクセスを認可すると、アプリケーション登録時に指定されたURLにリダイレクトされます。このとき、リダイレクト先のURLクエリにcodeが付与されます。また指定した場合は state も付与されます。アプリケーションでは、この code の値を利用して POST /api/v2/team_access_tokens にリクエストを送り、チーム別アクセストークンを発行します。Qiita Teamでのみ有効です。
parameters:
- $ref: '#/components/parameters/client_id'
- $ref: '#/components/parameters/scope'
- $ref: '#/components/parameters/state'
/api/v2/access_tokens:
post:
summary: Issue access token
operationId: issue-access_tokens
responses:
'200':
description: OK
description: 与えられた認証情報をもとに新しいアクセストークンを発行します。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/IssueAccessTokenRequest'
tags:
- user
'/api/v2/access_tokens/{access_token}':
parameters:
- schema:
type: string
pattern: '^[0-9a-f]{40}$'
minLength: 40
maxLength: 40
example: ea5d0a593b2655e9568f144fb1826342292f5c6b
name: access_token
in: path
required: true
description: アクセストークンを表現する文字列
delete:
summary: ''
operationId: delete-api-v2-access_tokens-access_token
responses:
'200':
description: OK
description: |
指定されたアクセストークンを失効させ、それ以降利用できないようにします。
tags:
- user
/api/v2/groups:
get:
summary: Get groups
tags:
- team
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetGroupsResponse'
'404':
description: Not Found
operationId: get-groups
description: チーム内に存在するグループ一覧のうち未参加のプライベートグループ以外を作成日時の降順で返します。
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
parameters: []
post:
summary: Create group
operationId: create-group
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CreateGroupResponse'
description: 新たにグループを作成します。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateGroupRequest'
description: ''
tags:
- team
'/api/v2/groups/{url_name}':
get:
summary: Get group
tags:
- team
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetGroupResponse'
'404':
description: Not Found
operationId: get-group
description: グループを取得します。
parameters: []
parameters:
- schema:
type: string
name: url_name
in: path
description: グループのチーム上での一意な名前
required: true
patch:
summary: Update group
operationId: update-group
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateGroupResponse'
description: グループを更新します。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateGroupRequest'
tags:
- team
delete:
summary: Delete group
operationId: delete-group
responses:
'204':
description: No Content
description: グループを削除します。
tags:
- team
'/api/v2/groups/{url_name}/members':
get:
summary: Get group members
tags:
- team
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetGroupResponse'
'404':
description: Not Found
operationId: get-group-members
description: チーム内に存在する特定のグループ一のメンバー一覧を作成日時の降順で返します。
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
parameters:
- schema:
type: string
name: url_name
in: path
description: グループのチーム上での一意な名前
required: true
delete:
summary: Delete group members
operationId: delete-group-members
responses:
'204':
description: No Content
description: グループからメンバーを脱退させます。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteGroupMemberRequest'
tags:
- team
post:
summary: Add group members
operationId: add-group-members
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/AddGroupMemberResponse'
description: 新たにグループにメンバーを追加します。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddGroupMemberRequest'
tags:
- team
'/api/v2/groups/{url_name}/members/{user_id}':
get:
summary: Get group member
tags:
- team
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetGroupResponse'
'404':
description: Not Found
operationId: get-group-member
description: グループのメンバーの名前を取得します。
parameters: []
parameters:
- schema:
type: string
name: url_name
in: path
description: グループのチーム上での一意な名前
required: true
- schema:
type: string
name: user_id
in: path
required: true
description: ユーザーID
/api/v2/items:
get:
summary: Get items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetItemsResponse'
operationId: get-items
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/query'
description: 記事の一覧を作成日時の降順で返します。
tags:
- user
- team
post:
summary: Create item
operationId: create-item
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CreateItemResponse'
description: |-
新たに記事を作成します。
Create a new article.
tags:
- user
- team
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateItemRequest'
'/api/v2/items/{item_id}/like':
parameters:
- schema:
type: string
name: item_id
in: path
required: true
description: Article ID
put:
summary: Create item like
operationId: create-item-like
responses:
'204':
description: No Content
'403':
description: Forbidden
description: Qiita TeamのいいねAPIは2020年11月4日より廃止となりました。今後は絵文字リアクションAPIをご利用ください。 記事に「いいね」を付けます。
tags:
- user
delete:
summary: Delete item like
operationId: delete-item-like
responses:
'204':
description: No Content
'404':
description: Not Found
description: Qiita TeamのいいねAPIは2020年11月4日より廃止となりました。今後は絵文字リアクションAPIをご利用ください。 記事への「いいね」を取り消します。
tags:
- user
get:
summary: Is item like
operationId: is-item-like
responses:
'204':
description: No Content
'404':
description: Not Found
description: Qiita TeamのいいねAPIは2020年11月4日より廃止となりました。今後は絵文字リアクションAPIをご利用ください。 記事に「いいね」を付けているかどうかを調べます。
tags:
- user
'/api/v2/items/{item_id}/likes':
parameters:
- schema:
type: string
name: item_id
in: path
required: true
description: Article ID
get:
summary: Get item likes
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetItemLikesResponse'
examples: {}
operationId: get-item-likes
description: |-
Qiita TeamのいいねAPIは2020年11月4日より廃止となりました。今後は絵文字リアクションAPIをご利用ください。
記事につけられた「いいね」を作成日時の降順で返します。
tags:
- user
'/api/v2/items/{item_id}/stock':
parameters:
- schema:
type: string
name: item_id
in: path
required: true
description: Article ID
put:
summary: Create item stock
operationId: create-item-stock
responses:
'204':
description: No Content
'403':
description: Forbidden
description: 記事をストックします。
tags:
- user
- team
delete:
summary: Delete item stock
operationId: delete-item-stock
responses:
'204':
description: No Content
'404':
description: Not Found
description: 記事をストックから取り除きます。
tags:
- user
- team
get:
summary: Is item stock
operationId: is-item-stock
responses:
'204':
description: No Content
'404':
description: Not Found
description: 記事をストックしているかどうかを調べます。
tags:
- user
- team
'/api/v2/items/{item_id}/stockers':
parameters:
- schema:
type: string
name: item_id
in: path
required: true
description: Article ID
get:
summary: Get item stockers
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetItemStockersResponse'
examples: {}
operationId: get-item-stockers
description: 記事をストックしているユーザー一覧を、ストックした日時の降順で返します。
tags:
- team
- user
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
'/api/v2/items/{item_id}/comments':
parameters:
- schema:
type: string
name: item_id
in: path
required: true
description: Article ID
get:
summary: Get item comments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetItemCommentsResponse'
examples: {}
operationId: get-item-comments
description: 投稿に付けられたコメント一覧を投稿日時の降順で取得します。
parameters: []
tags:
- team
- user
post:
summary: Create comment
operationId: create-comment
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCommentResponse'
description: 記事に対してコメントを投稿します。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCommentRequest'
tags:
- team
- user
'/api/v2/items/{item_id}/imported_comments':
parameters:
- schema:
type: string
name: item_id
in: path
required: true
description: Article ID
post:
summary: Create imported comment
operationId: create-imported-comment
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CreateImportedCommentResponse'
description: ユーザー名を指定して記事に対するコメントを作成します(Qiita Teamでのみ有効。管理者権限が必要)。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateImportedCommentRequest'
tags:
- team
'/api/v2/items/{item_id}':
parameters:
- schema:
type: string
name: item_id
in: path
required: true
description: Article ID
delete:
summary: Get item stockers
responses:
'204':
description: No Content
content: {}
'404':
description: Not Found
operationId: delete-item
description: 記事を削除します。
parameters: []
tags:
- team
- user
get:
summary: Get item
operationId: get-item
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetItemResponse'
description: 記事を取得します。
tags:
- team
- user
patch:
summary: ''
operationId: update-item
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateItemResponse'
description: 記事を更新します。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateItemRequest'
tags:
- team
- user
/api/v2/users:
get:
summary: Get users
tags:
- user
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetUsersResponse'
operationId: get-users
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
description: 全てのユーザーの一覧を作成日時の降順で取得します。
'/api/v2/users/{user_id}':
get:
summary: Get user
tags:
- user
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserResponse'
operationId: get-user
description: ユーザーを取得します。
parameters:
- schema:
type: string
name: user_id
in: path
required: true
description: ユーザーID
'/api/v2/users/{user_id}/followees':
get:
summary: Get user followees
tags:
- user
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserFolloweesResponse'
operationId: get-user-followees
description: ユーザーがフォローしているユーザー一覧を取得します。
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
parameters:
- schema:
type: string
name: user_id
in: path
required: true
description: ユーザーID
'/api/v2/users/{user_id}/followers':
get:
summary: Get user followers
tags:
- user
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserFolloweesResponse'
operationId: get-user-followers
description: ユーザーをフォローしているユーザー一覧を取得します。
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
parameters:
- schema:
type: string
name: user_id
in: path
required: true
description: ユーザーID
'/api/v2/users/{user_id}/following':
delete:
summary: Unfollow
tags:
- user
responses:
'204':
description: No Content
'403':
description: Forbidden
operationId: unfollow
description: ユーザーへのフォローを外します。
parameters:
- schema:
type: string
name: user_id
in: path
required: true
description: ユーザーID
get:
summary: Is user following
operationId: is-user-following
responses:
'204':
description: No Content
'404':
description: Not Found
description: ユーザーをフォローしている場合に204を返します。
tags:
- user
put:
summary: Follow
operationId: follow
responses:
'200':
description: OK
'403':
description: Forbidden
description: ユーザーをフォローします。
tags:
- user
/api/v2/authenticated_user:
get:
summary: Get authenticated user
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetAuthenticatedUserResponse'
operationId: get-authenticated-user
description: アクセストークンに紐付いたユーザーを返します。
tags:
- user
- team
/api/v2/authenticated_user/items:
get:
summary: Get authenticated user items
tags:
- user
- team
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetItemResponse'
operationId: get-authenticated-user-items
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
description: 認証中のユーザーの記事の一覧を作成日時の降順で返します。
'/api/v2/comments/{comment_id}':
parameters:
- schema:
type: string
example: 3391f50c35f953abfc4f
name: comment_id
in: path
required: true
description: コメントの一意なID
get:
summary: Get comment
tags:
- user
- team
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetCommentResponse'
operationId: get-comment
description: コメントを取得します。
patch:
summary: Update comment
operationId: update-comment
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCommentResponse'
description: コメントを更新します。
tags:
- team
- user
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCommentRequest'
delete:
summary: Delete comment
operationId: delete-comment
responses:
'204':
description: No Content
description: コメントを削除します。
tags:
- team
- user
components:
securitySchemes:
Bearer:
type: http
scheme: bearer
description: Personal access token
schemas:
User:
type: object
x-examples:
Example 1:
description: 'Hello, world.'
facebook_id: qiita
followees_count: 100
followers_count: 200
github_login_name: qiitan
id: qiita
items_count: 300
linkedin_id: qiita
location: 'Tokyo, Japan'
name: Qiita キータ
organization: Qiita Inc.
permanent_id: 1
profile_image_url: 'https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439'
team_only: false
twitter_screen_name: qiita
website_url: 'https://qiita.com'
properties:
description:
type: string
description: 自己紹介文
example: 'Hello, world.'
nullable: true
facebook_id:
type: string
description: Facebook ID
example: qiita
nullable: true
followees_count:
type: integer
description: このユーザーがフォローしているユーザーの数
example: 100
followers_count:
type: integer
description: このユーザーをフォローしているユーザーの数
example: 200
github_login_name:
type: string
description: GitHub ID
example: qiitan
nullable: true
id:
type: string
description: ユーザーID
example: qiita
items_count:
type: integer
description: このユーザーが qiita.com 上で公開している記事の数 (Qiita Teamでの記事数は含まれません)
example: 300
linkedin_id:
type: string
description: LinkedIn ID
example: qiita
nullable: true
location:
type: string
description: 居住地
example: 'Tokyo, Japan'
nullable: true
name:
type: string
description: 設定している名前
example: Qiita キータ
nullable: true
organization:
type: string
description: 所属している組織
example: Qiita Inc.
nullable: true
permanent_id:
type: integer
description: ユーザーごとに割り当てられる整数のID
example: 1
profile_image_url:
type: string
description: 設定しているプロフィール画像のURL
example: 'https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439'
team_only:
type: boolean
description: Qiita Team専用モードに設定されているかどうか
twitter_screen_name:
type: string
description: Twitterのスクリーンネーム
example: qiita
nullable: true
website_url:
type: string
description: 設定しているWebサイトのURL
example: 'https://qiita.com'
nullable: true
required:
- description
- facebook_id
- followees_count
- followers_count
- github_login_name
- id
- items_count
- linkedin_id
- location
- name
- organization
- permanent_id
- profile_image_url
- team_only
- twitter_screen_name
- website_url
AuthenticatedUser:
x-examples:
Example 1:
description: 'Hello, world.'
facebook_id: qiita
followees_count: 100
followers_count: 200
github_login_name: qiitan
id: qiita
items_count: 300
linkedin_id: qiita
location: 'Tokyo, Japan'
name: Qiita キータ
organization: Qiita Inc.
permanent_id: 1
profile_image_url: 'https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439'
team_only: false
twitter_screen_name: qiita
website_url: 'https://qiita.com'
image_monthly_upload_limit: 1048576
image_monthly_upload_remaining: 524288
allOf:
- $ref: '#/components/schemas/User'
- type: object
properties:
image_monthly_upload_limit:
type: integer
description: 1ヶ月あたりにQiitaにアップロードできる画像の総容量
image_monthly_upload_remaining:
type: integer
description: その月にQiitaにアップロードできる画像の残りの容量
required:
- image_monthly_upload_limit
- image_monthly_upload_remaining
Group:
type: object