-
Notifications
You must be signed in to change notification settings - Fork 43
/
api_v1.json
3574 lines (3574 loc) · 125 KB
/
api_v1.json
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.3",
"info": {
"title": "Forem API V1",
"version": "1.0.0",
"description": "Access Forem articles, users and other resources via API.\n For a real-world example of Forem in action, check out [DEV](https://www.dev.to).\n All endpoints can be accessed with the 'api-key' header and a accept header, but\n some of them are accessible publicly without authentication.\n\n Dates and date times, unless otherwise specified, must be in\n the [RFC 3339](https://tools.ietf.org/html/rfc3339) format."
},
"paths": {
"/articles": {
"post": {
"summary": "Publish article",
"tags": ["articles"],
"description": "This endpoint allows the client to create a new article.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.",
"operationId": "createArticle",
"parameters": [],
"responses": {
"201": {
"description": "An Article",
"content": {
"application/json": {
"example": {
"type_of": "article",
"id": 251,
"title": "New article",
"description": "New post example",
"readable_publish_date": "Apr 14",
"slug": "new-article-4aca",
"path": "/username383/new-article-4aca",
"url": "http://localhost:3000/username383/new-article-4aca",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": 11,
"published_timestamp": "2023-04-14T14:45:32Z",
"positive_reactions_count": 0,
"cover_image": "https://thepracticaldev.s3.amazonaws.com/i/5wfo25724gzgk5e5j50g.jpg",
"social_image": "https://thepracticaldev.s3.amazonaws.com/i/5wfo25724gzgk5e5j50g.jpg",
"canonical_url": "https://dev.to/fdocr/headless-chrome-dual-mode-tests-for-ruby-on-rails-4p6g",
"created_at": "2023-04-14T14:45:32Z",
"edited_at": null,
"crossposted_at": null,
"published_at": "2023-04-14T14:45:32Z",
"last_comment_at": "2023-04-14T14:45:32Z",
"reading_time_minutes": 1,
"tag_list": "",
"tags": [],
"body_html": "<p><strong>New</strong> body for the article</p>\n\n",
"body_markdown": "**New** body for the article",
"user": {
"name": "Nu \"Otis\" \\:/ Stehr",
"username": "username383",
"twitter_username": "twitter383",
"github_username": "github383",
"user_id": 1304,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1304/ceaf627b-1551-4771-8d35-a93b40989584.jpeg",
"profile_image_90": "/uploads/user/profile_image/1304/ceaf627b-1551-4771-8d35-a93b40989584.jpeg"
}
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"example": {
"error": "unauthorized",
"status": 401
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json": {
"example": {
"error": "param is missing or the value is empty: article",
"status": 422
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Article"
}
}
}
}
},
"get": {
"summary": "Published articles",
"security": [],
"tags": ["articles"],
"description": "This endpoint allows the client to retrieve a list of articles.\n\n\"Articles\" are all the posts that users create on DEV that typically\nshow up in the feed. They can be a blog post, a discussion question,\na help thread etc. but is referred to as article within the code.\n\nBy default it will return featured, published articles ordered\nby descending popularity.\n\nIt supports pagination, each page will contain `30` articles by default.",
"operationId": "getArticles",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/perPageParam30to1000"
},
{
"name": "tag",
"in": "query",
"required": false,
"description": "Using this parameter will retrieve articles that contain the requested tag. Articles\nwill be ordered by descending popularity.This parameter can be used in conjuction with `top`.",
"schema": {
"type": "string"
},
"example": "discuss"
},
{
"name": "tags",
"in": "query",
"required": false,
"description": "Using this parameter will retrieve articles with any of the comma-separated tags.\nArticles will be ordered by descending popularity.",
"schema": {
"type": "string"
},
"example": "javascript, css"
},
{
"name": "tags_exclude",
"in": "query",
"required": false,
"description": "Using this parameter will retrieve articles that do _not_ contain _any_\nof comma-separated tags. Articles will be ordered by descending popularity.",
"schema": {
"type": "string"
},
"example": "node, java"
},
{
"name": "username",
"in": "query",
"required": false,
"description": "Using this parameter will retrieve articles belonging\n to a User or Organization ordered by descending publication date.\n If `state=all` the number of items returned will be `1000` instead of the default `30`.\n This parameter can be used in conjuction with `state`.",
"schema": {
"type": "string"
},
"example": "ben"
},
{
"name": "state",
"in": "query",
"required": false,
"description": "Using this parameter will allow the client to check which articles are fresh or rising.\n If `state=fresh` the server will return fresh articles.\n If `state=rising` the server will return rising articles.\n This param can be used in conjuction with `username`, only if set to `all`.",
"schema": {
"type": "string",
"enum": ["fresh", "rising", "all"]
},
"example": "fresh"
},
{
"name": "top",
"in": "query",
"required": false,
"description": "Using this parameter will allow the client to return the most popular articles\nin the last `N` days.\n`top` indicates the number of days since publication of the articles returned.\nThis param can be used in conjuction with `tag`.",
"schema": {
"type": "integer",
"format": "int32",
"minimum": 1
},
"example": 2
},
{
"name": "collection_id",
"in": "query",
"required": false,
"description": "Adding this will allow the client to return the list of articles\nbelonging to the requested collection, ordered by ascending publication date.",
"schema": {
"type": "integer",
"format": "int32"
},
"example": 99
}
],
"responses": {
"200": {
"description": "A List of Articles",
"content": {
"application/json": {
"example": [
{
"type_of": "article",
"id": 254,
"title": "All the King's Men175",
"description": "Typewriter crucifix forage. Pug put a bird on it art party taxidermy asymmetrical xoxo. Sustainable...",
"readable_publish_date": "Apr 14",
"slug": "all-the-kings-men175-794",
"path": "/username387/all-the-kings-men175-794",
"url": "http://localhost:3000/username387/all-the-kings-men175-794",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": null,
"published_timestamp": "2023-04-14T14:45:32Z",
"positive_reactions_count": 0,
"cover_image": "http://localhost:3000/assets/36-83d24fbff858b9dd4035d1e7d2df14090946ae4fed631055fc1d5862e7018348.png",
"social_image": "http://localhost:3000/assets/36-83d24fbff858b9dd4035d1e7d2df14090946ae4fed631055fc1d5862e7018348.png",
"canonical_url": "http://localhost:3000/username387/all-the-kings-men175-794",
"created_at": "2023-04-14T14:45:32Z",
"edited_at": null,
"crossposted_at": null,
"published_at": "2023-04-14T14:45:32Z",
"last_comment_at": "2023-04-14T14:45:32Z",
"reading_time_minutes": 1,
"tag_list": ["discuss"],
"tags": "discuss",
"user": {
"name": "Versie \"Luana\" \\:/ Runolfsson",
"username": "username387",
"twitter_username": "twitter387",
"github_username": "github387",
"user_id": 1308,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1308/dfa25219-dfea-4d9a-93ec-403a5f51a29e.jpeg",
"profile_image_90": "/uploads/user/profile_image/1308/dfa25219-dfea-4d9a-93ec-403a5f51a29e.jpeg"
},
"organization": {
"name": "Ledner, Jaskolski and Bednar",
"username": "org70",
"slug": "org70",
"profile_image": "/uploads/organization/profile_image/295/216d3fb5-bd3c-459a-a9d8-572e8332fd88.png",
"profile_image_90": "/uploads/organization/profile_image/295/216d3fb5-bd3c-459a-a9d8-572e8332fd88.png"
},
"flare_tag": {
"name": "discuss",
"bg_color_hex": "#000000",
"text_color_hex": "#ffffff"
}
}
],
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
}
}
}
},
"/articles/latest": {
"get": {
"summary": "Published articles sorted by published date",
"security": [],
"tags": ["articles"],
"description": "This endpoint allows the client to retrieve a list of articles. ordered by descending publish date.\n\nIt supports pagination, each page will contain 30 articles by default.",
"operationId": "getLatestArticles",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/perPageParam30to1000"
}
],
"responses": {
"200": {
"description": "A List of Articles",
"content": {
"application/json": {
"example": [
{
"type_of": "article",
"id": 257,
"title": "East of Eden178",
"description": "Readymade diy ennui humblebrag 8-bit. Brooklyn hoodie pickled art party vinyl small batch roof. 8-bit...",
"readable_publish_date": "Apr 14",
"slug": "east-of-eden178-3on4",
"path": "/username390/east-of-eden178-3on4",
"url": "http://localhost:3000/username390/east-of-eden178-3on4",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": null,
"published_timestamp": "2023-04-14T14:45:32Z",
"positive_reactions_count": 0,
"cover_image": "http://localhost:3000/assets/16-77521848e7b5fcc073ac3e0bb004826e97f737238194e4c79330f662cc946ab2.png",
"social_image": "http://localhost:3000/assets/16-77521848e7b5fcc073ac3e0bb004826e97f737238194e4c79330f662cc946ab2.png",
"canonical_url": "http://localhost:3000/username390/east-of-eden178-3on4",
"created_at": "2023-04-14T14:45:32Z",
"edited_at": null,
"crossposted_at": null,
"published_at": "2023-04-14T14:45:32Z",
"last_comment_at": "2023-04-14T14:45:32Z",
"reading_time_minutes": 1,
"tag_list": ["javascript", "html", "discuss"],
"tags": "javascript, html, discuss",
"user": {
"name": "Starla \"Eric\" \\:/ Kunde",
"username": "username390",
"twitter_username": "twitter390",
"github_username": "github390",
"user_id": 1311,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1311/11a4ee42-e02e-4b2f-87c1-6123579350b7.jpeg",
"profile_image_90": "/uploads/user/profile_image/1311/11a4ee42-e02e-4b2f-87c1-6123579350b7.jpeg"
},
"flare_tag": {
"name": "discuss",
"bg_color_hex": "#000000",
"text_color_hex": "#ffffff"
}
},
{
"type_of": "article",
"id": 256,
"title": "A Many-Splendoured Thing177",
"description": "Letterpress neutra vice raw denim mumblecore organic small batch. Bushwick viral freegan photo booth...",
"readable_publish_date": "Apr 14",
"slug": "a-many-splendoured-thing177-314b",
"path": "/username389/a-many-splendoured-thing177-314b",
"url": "http://localhost:3000/username389/a-many-splendoured-thing177-314b",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": null,
"published_timestamp": "2023-04-14T14:45:32Z",
"positive_reactions_count": 0,
"cover_image": "http://localhost:3000/assets/27-441873f471d98b5358beff7d47a211e58b9979c6453794f9a7abfd5709c33322.png",
"social_image": "http://localhost:3000/assets/27-441873f471d98b5358beff7d47a211e58b9979c6453794f9a7abfd5709c33322.png",
"canonical_url": "http://localhost:3000/username389/a-many-splendoured-thing177-314b",
"created_at": "2023-04-14T14:45:32Z",
"edited_at": null,
"crossposted_at": null,
"published_at": "2023-04-14T14:45:32Z",
"last_comment_at": "2023-04-14T14:45:32Z",
"reading_time_minutes": 1,
"tag_list": ["javascript", "html", "discuss"],
"tags": "javascript, html, discuss",
"user": {
"name": "Jeanne \"Donnette\" \\:/ Waelchi",
"username": "username389",
"twitter_username": "twitter389",
"github_username": "github389",
"user_id": 1310,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1310/67d345a8-f64b-407f-a802-6f5286b5c4a2.jpeg",
"profile_image_90": "/uploads/user/profile_image/1310/67d345a8-f64b-407f-a802-6f5286b5c4a2.jpeg"
},
"flare_tag": {
"name": "discuss",
"bg_color_hex": "#000000",
"text_color_hex": "#ffffff"
}
},
{
"type_of": "article",
"id": 255,
"title": "What's Become of Waring176",
"description": "Whatever church-key irony next level tacos banh mi. Brooklyn wayfarers occupy tacos austin marfa...",
"readable_publish_date": "Apr 14",
"slug": "whats-become-of-waring176-2lgk",
"path": "/username388/whats-become-of-waring176-2lgk",
"url": "http://localhost:3000/username388/whats-become-of-waring176-2lgk",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": null,
"published_timestamp": "2023-04-14T14:45:32Z",
"positive_reactions_count": 0,
"cover_image": "http://localhost:3000/assets/31-2a89a91581ce9080fed8d62dd9c70a3fd5f92472da8c023e7b29256e04811b2e.png",
"social_image": "http://localhost:3000/assets/31-2a89a91581ce9080fed8d62dd9c70a3fd5f92472da8c023e7b29256e04811b2e.png",
"canonical_url": "http://localhost:3000/username388/whats-become-of-waring176-2lgk",
"created_at": "2023-04-14T14:45:32Z",
"edited_at": null,
"crossposted_at": null,
"published_at": "2023-04-14T14:45:32Z",
"last_comment_at": "2023-04-14T14:45:32Z",
"reading_time_minutes": 1,
"tag_list": ["javascript", "html", "discuss"],
"tags": "javascript, html, discuss",
"user": {
"name": "Jerrell \"Essie\" \\:/ Runolfsdottir",
"username": "username388",
"twitter_username": "twitter388",
"github_username": "github388",
"user_id": 1309,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1309/eaae0231-0ff6-49da-960c-cd30e2486bed.jpeg",
"profile_image_90": "/uploads/user/profile_image/1309/eaae0231-0ff6-49da-960c-cd30e2486bed.jpeg"
},
"flare_tag": {
"name": "discuss",
"bg_color_hex": "#000000",
"text_color_hex": "#ffffff"
}
}
],
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
}
}
}
},
"/articles/{id}": {
"get": {
"summary": "Published article by id",
"security": [],
"tags": ["articles"],
"description": "This endpoint allows the client to retrieve a single published article given its `id`.",
"operationId": "getArticleById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "An Article",
"content": {
"application/json": {
"example": {
"type_of": "article",
"id": 258,
"title": "Pale Kings and Princes179",
"description": "Etsy you probably haven't heard of them carry humblebrag 90's try-hard. Distillery asymmetrical...",
"readable_publish_date": "Apr 14",
"slug": "pale-kings-and-princes179-381c",
"path": "/username391/pale-kings-and-princes179-381c",
"url": "http://localhost:3000/username391/pale-kings-and-princes179-381c",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": null,
"published_timestamp": "2023-04-14T14:45:32Z",
"positive_reactions_count": 0,
"cover_image": "http://localhost:3000/assets/19-ed58d3e8defcefc445020631589697a05e725243e834b5192aee4e6b91a3e927.png",
"social_image": "http://localhost:3000/assets/19-ed58d3e8defcefc445020631589697a05e725243e834b5192aee4e6b91a3e927.png",
"canonical_url": "http://localhost:3000/username391/pale-kings-and-princes179-381c",
"created_at": "2023-04-14T14:45:32Z",
"edited_at": null,
"crossposted_at": null,
"published_at": "2023-04-14T14:45:32Z",
"last_comment_at": "2023-04-14T14:45:32Z",
"reading_time_minutes": 1,
"tag_list": "discuss",
"tags": ["discuss"],
"body_html": "<p>Etsy you probably haven't heard of them carry humblebrag 90's try-hard. Distillery asymmetrical godard trust fund quinoa pug paleo. Letterpress green juice plaid.</p>\n\n<p>Organic +1 pour-over banh mi disrupt listicle. Cronut offal flexitarian twee health poutine cred. Hashtag godard church-key etsy put a bird on it.</p>\n\n",
"body_markdown": "---\ntitle: Pale Kings and Princes179\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nEtsy you probably haven't heard of them carry humblebrag 90's try-hard. Distillery asymmetrical godard trust fund quinoa pug paleo. Letterpress green juice plaid.\n\n\nOrganic +1 pour-over banh mi disrupt listicle. Cronut offal flexitarian twee health poutine cred. Hashtag godard church-key etsy put a bird on it.\n\n",
"user": {
"name": "Val \"Antonina\" \\:/ Gleichner",
"username": "username391",
"twitter_username": "twitter391",
"github_username": "github391",
"user_id": 1312,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1312/2eec3cd5-e7fe-42ac-bbfa-27c84d847596.jpeg",
"profile_image_90": "/uploads/user/profile_image/1312/2eec3cd5-e7fe-42ac-bbfa-27c84d847596.jpeg"
},
"flare_tag": {
"name": "discuss",
"bg_color_hex": "#000000",
"text_color_hex": "#ffffff"
}
},
"schema": {
"type": "object",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
},
"404": {
"description": "Article Not Found",
"content": {
"application/json": {
"example": {
"error": "not found",
"status": 404
}
}
}
}
}
},
"put": {
"summary": "Update an article by id",
"tags": ["articles"],
"description": "This endpoint allows the client to update an existing article.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.",
"operationId": "updateArticle",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The ID of the user to unpublish.",
"schema": {
"type": "integer",
"format": "int32",
"minimum": 1
},
"example": 123
}
],
"responses": {
"200": {
"description": "An Article",
"content": {
"application/json": {
"example": {
"type_of": "article",
"id": 259,
"title": "Noli Me Tangere180",
"description": "Hoodie meh knausgaard bespoke actually shabby chic polaroid. Tumblr ennui semiotics freegan diy...",
"readable_publish_date": "Apr 14",
"slug": "noli-me-tangere180-55bp",
"path": "/username392/noli-me-tangere180-55bp",
"url": "http://localhost:3000/username392/noli-me-tangere180-55bp",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": null,
"published_timestamp": "2023-04-14T14:45:33Z",
"positive_reactions_count": 0,
"cover_image": "http://localhost:3000/assets/3-93b6b57b5a6115cffe5d63d29a22825eb9e65f647bfef57a88244bc2b98186f0.png",
"social_image": "http://localhost:3000/assets/3-93b6b57b5a6115cffe5d63d29a22825eb9e65f647bfef57a88244bc2b98186f0.png",
"canonical_url": "http://localhost:3000/username392/noli-me-tangere180-55bp",
"created_at": "2023-04-14T14:45:33Z",
"edited_at": "2023-04-14T14:45:33Z",
"crossposted_at": null,
"published_at": "2023-04-14T14:45:33Z",
"last_comment_at": "2023-04-14T14:45:33Z",
"reading_time_minutes": 1,
"tag_list": "",
"tags": [],
"body_html": "<p><strong>New</strong> body for the article</p>\n\n",
"body_markdown": "**New** body for the article",
"user": {
"name": "Lai \"Aide\" \\:/ Will",
"username": "username392",
"twitter_username": "twitter392",
"github_username": "github392",
"user_id": 1313,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1313/731805e8-95f2-4260-89f1-489df0c9e945.jpeg",
"profile_image_90": "/uploads/user/profile_image/1313/731805e8-95f2-4260-89f1-489df0c9e945.jpeg"
}
}
}
}
},
"404": {
"description": "Article Not Found",
"content": {
"application/json": {
"example": {
"error": "not found",
"status": 404
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"example": {
"error": "unauthorized",
"status": 401
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json": {
"example": {
"error": "param is missing or the value is empty: article",
"status": 422
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Article"
}
}
}
}
}
},
"/articles/{username}/{slug}": {
"get": {
"summary": "Published article by path",
"security": [],
"tags": ["articles"],
"description": "This endpoint allows the client to retrieve a single published article given its `path`.",
"operationId": "getArticleByPath",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "slug",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "An Article",
"content": {
"application/json": {
"example": {
"type_of": "article",
"id": 262,
"title": "Noli Me Tangere183",
"description": "Normcore williamsburg try-hard artisan. Vinyl park shoreditch gastropub vegan knausgaard. Ethical...",
"readable_publish_date": "Apr 14",
"slug": "noli-me-tangere183-1lj5",
"path": "/username396/noli-me-tangere183-1lj5",
"url": "http://localhost:3000/username396/noli-me-tangere183-1lj5",
"comments_count": 0,
"public_reactions_count": 0,
"collection_id": null,
"published_timestamp": "2023-04-14T14:45:33Z",
"positive_reactions_count": 0,
"cover_image": "http://localhost:3000/assets/37-94b286825ffd9f2b47c9842cf4f262b7c89e789797eba40196bc14b5c2359e75.png",
"social_image": "http://localhost:3000/assets/37-94b286825ffd9f2b47c9842cf4f262b7c89e789797eba40196bc14b5c2359e75.png",
"canonical_url": "http://localhost:3000/username396/noli-me-tangere183-1lj5",
"created_at": "2023-04-14T14:45:33Z",
"edited_at": null,
"crossposted_at": null,
"published_at": "2023-04-14T14:45:33Z",
"last_comment_at": "2023-04-14T14:45:33Z",
"reading_time_minutes": 1,
"tag_list": "discuss",
"tags": ["discuss"],
"body_html": "<p>Normcore williamsburg try-hard artisan. Vinyl park shoreditch gastropub vegan knausgaard.</p>\n\n<p>Ethical trust fund intelligentsia pbr&b. Brunch seitan pug waistcoat farm-to-table flexitarian health. Tumblr banh mi goth retro diy.</p>\n\n",
"body_markdown": "---\ntitle: Noli Me Tangere183\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nNormcore williamsburg try-hard artisan. Vinyl park shoreditch gastropub vegan knausgaard.\n\n\nEthical trust fund intelligentsia pbr&b. Brunch seitan pug waistcoat farm-to-table flexitarian health. Tumblr banh mi goth retro diy.\n\n",
"user": {
"name": "Ashely \"Erich\" \\:/ Waters",
"username": "username396",
"twitter_username": "twitter396",
"github_username": "github396",
"user_id": 1317,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1317/e7282d93-954d-4b13-805e-9e5636ad9d63.jpeg",
"profile_image_90": "/uploads/user/profile_image/1317/e7282d93-954d-4b13-805e-9e5636ad9d63.jpeg"
},
"flare_tag": {
"name": "discuss",
"bg_color_hex": "#000000",
"text_color_hex": "#ffffff"
}
},
"schema": {
"type": "object",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
},
"404": {
"description": "Article Not Found",
"content": {
"application/json": {
"example": {
"error": "not found",
"status": 404
}
}
}
}
}
}
},
"/articles/me": {
"get": {
"summary": "User's articles",
"tags": ["articles", "users"],
"description": "This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nPublished articles will be in reverse chronological publication order.\n\nIt will return published articles with pagination. By default a page will contain 30 articles.",
"operationId": "getUserArticles",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/perPageParam30to1000"
}
],
"responses": {
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"example": {
"error": "unauthorized",
"status": 401
}
}
}
},
"200": {
"description": "A List of the authenticated user's Articles",
"content": {
"application/json": {
"example": [],
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
}
}
}
},
"/articles/me/published": {
"get": {
"summary": "User's published articles",
"tags": ["articles", "users"],
"description": "This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nPublished articles will be in reverse chronological publication order.\n\nIt will return published articles with pagination. By default a page will contain 30 articles.",
"operationId": "getUserPublishedArticles",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/perPageParam30to1000"
}
],
"responses": {
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"example": {
"error": "unauthorized",
"status": 401
}
}
}
},
"200": {
"description": "A List of the authenticated user's Articles",
"content": {
"application/json": {
"example": [],
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
}
}
}
},
"/articles/me/unpublished": {
"get": {
"summary": "User's unpublished articles",
"tags": ["articles", "users"],
"description": "This endpoint allows the client to retrieve a list of unpublished articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nUnpublished articles will be in reverse chronological creation order.\n\nIt will return unpublished articles with pagination. By default a page will contain 30 articles.",
"operationId": "getUserUnpublishedArticles",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/perPageParam30to1000"
}
],
"responses": {
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"example": {
"error": "unauthorized",
"status": 401
}
}
}
},
"200": {
"description": "A List of the authenticated user's Articles",
"content": {
"application/json": {
"example": [],
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
}
}
}
},
"/articles/me/all": {
"get": {
"summary": "User's all articles",
"tags": ["articles", "users"],
"description": "This endpoint allows the client to retrieve a list of all articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nIt will return both published and unpublished articles with pagination.\n\nUnpublished articles will be at the top of the list in reverse chronological creation order. Published articles will follow in reverse chronological publication order.\n\nBy default a page will contain 30 articles.",
"operationId": "getUserAllArticles",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/perPageParam30to1000"
}
],
"responses": {
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"example": {
"error": "unauthorized",
"status": 401
}
}
}
},
"200": {
"description": "A List of the authenticated user's Articles",
"content": {
"application/json": {
"example": [],
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ArticleIndex"
}
}
}
}
}
}
}
},
"/articles/{id}/unpublish": {
"put": {
"summary": "Unpublish an article",
"tags": ["articles"],
"description": "This endpoint allows the client to unpublish an article.\n\nThe user associated with the API key must have any 'admin' or 'moderator' role.\n\nThe article will be unpublished and will no longer be visible to the public. It will remain\nin the database and will set back to draft status on the author's posts dashboard. Any\nnotifications associated with the article will be deleted. Any comments on the article\nwill remain.",
"operationId": "unpublishArticle",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The ID of the article to unpublish.",
"schema": {
"type": "integer",
"format": "int32",
"minimum": 1
},
"example": 1
},
{
"name": "note",
"in": "query",
"required": false,
"description": "Content for the note that's created along with unpublishing",
"schema": {
"type": "string"
},
"example": "Admin requested unpublishing all articles via API"
}
],
"responses": {
"204": {
"description": "Article successfully unpublished"
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"example": {
"error": "unauthorized",
"status": 401
}
}
}
},
"404": {
"description": "Article Not Found",
"content": {
"application/json": {
"example": {
"error": "not found",
"status": 404
}
}
}
}
}
}
},
"/comments": {
"get": {
"summary": "Comments",
"security": [],
"tags": ["comments"],
"description": "This endpoint allows the client to retrieve all comments belonging to an article or podcast episode as threaded conversations.\n\nIt will return the all top level comments with their nested comments as threads. See the format specification for further details.",
"operationId": "getCommentsByArticleId",
"parameters": [
{
"name": "a_id",
"in": "query",
"required": false,
"description": "Article identifier.",
"schema": {
"type": "string"
},
"example": "321"
},
{
"name": "p_id",
"in": "query",
"required": false,
"description": "Podcast Episode identifier.",
"schema": {
"type": "string"
},
"example": "321"
}
],
"responses": {
"200": {
"description": "A List of Comments",
"content": {
"application/json": {
"example": [
{
"type_of": "comment",
"id_code": "52",
"created_at": "2023-04-14T14:45:34Z",
"body_html": "<p>Pop-up salvia vhs gluten-free tilde cleanse. Gastropub offal next level. Gluten-free health stumptown kale chips wolf.</p>\n\n",
"user": {
"name": "Luigi \"Ryann\" \\:/ Wuckert",
"username": "username410",
"twitter_username": "twitter410",
"github_username": "github410",
"user_id": 1332,
"website_url": null,
"profile_image": "/uploads/user/profile_image/1332/241b2d6f-ec6d-4590-b57f-3a2ce673f9de.jpeg",
"profile_image_90": "/uploads/user/profile_image/1332/241b2d6f-ec6d-4590-b57f-3a2ce673f9de.jpeg"
},
"children": []
}
],
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Comment"
}
}
}
}
},
"404": {
"description": "Resource Not Found",
"content": {
"application/json": {
"example": {
"error": "not found",
"status": 404
}