-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
5855 lines (5666 loc) · 176 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.0.3
info:
title: Forem API V1
description: |-
Access Forem articles, users and other resources via API.
For a real-world example of Forem in action, check out [DEV](https://www.dev.to).
All endpoints can be accessed with the 'api-key' header and a accept header, but
some of them are accessible publicly without authentication.
Dates and date times, unless otherwise specified, must be in
the [RFC 3339](https://tools.ietf.org/html/rfc3339) format.
version: 1.0.0
x-konfig-ignore:
object-with-no-properties: true
potential-incorrect-type: true
servers:
- description: Production server
url: https://dev.to/api
tags:
- name: users
- name: articles
- name: organizations
- name: segments
- name: billboards
- name: pages
- name: comments
- name: tags
- name: reactions
- name: followed_tags
- name: followers
- name: podcast_episodes
- name: profile images
- name: readinglist
- name: videos
paths:
/api/articles:
post:
tags:
- articles
summary: Publish article
operationId: Articles_createNewArticle
description: >-
This endpoint allows the client to create a new article.
"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.
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
responses:
'201':
description: An Article
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesCreateNewArticleResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesCreateNewArticle401Response'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesCreateNewArticle422Response'
get:
tags:
- articles
summary: Published articles
operationId: Articles_listPublishedArticles
security: []
description: |-
This endpoint allows the client to retrieve a list of articles.
"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.
By default it will return featured, published articles ordered
by descending popularity.
It supports pagination, each page will contain `30` articles by default.
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
- description: >-
Using this parameter will retrieve articles that contain the
requested tag. Articles
will be ordered by descending popularity.This parameter can be used
in conjuction with `top`.
name: tag
in: query
required: false
schema:
type: string
example: discuss
- description: >-
Using this parameter will retrieve articles with any of the
comma-separated tags.
Articles will be ordered by descending popularity.
name: tags
in: query
required: false
schema:
type: string
example: javascript, css
- description: >-
Using this parameter will retrieve articles that do _not_ contain
_any_
of comma-separated tags. Articles will be ordered by descending
popularity.
name: tags_exclude
in: query
required: false
schema:
type: string
example: node, java
- description: |-
Using this parameter will retrieve articles belonging
to a User or Organization ordered by descending publication date.
If `state=all` the number of items returned will be `1000` instead of the default `30`.
This parameter can be used in conjuction with `state`.
name: username
in: query
required: false
schema:
type: string
example: ben
- description: >-
Using this parameter will allow the client to check which articles
are fresh or rising.
If `state=fresh` the server will return fresh articles.
If `state=rising` the server will return rising articles.
This param can be used in conjuction with `username`, only if set to `all`.
name: state
in: query
required: false
schema:
type: string
enum:
- fresh
- rising
- all
example: fresh
- description: >-
Using this parameter will allow the client to return the most
popular articles
in the last `N` days.
`top` indicates the number of days since publication of the articles
returned.
This param can be used in conjuction with `tag`.
name: top
in: query
required: false
schema:
type: integer
format: int32
minimum: 1
example: 2
- description: >-
Adding this will allow the client to return the list of articles
belonging to the requested collection, ordered by ascending
publication date.
name: collection_id
in: query
required: false
schema:
type: integer
format: int32
example: 99
responses:
'200':
description: A List of Articles
content:
application/json:
example:
- tags: discuss
title: Let Us Now Praise Famous Men4
description: >-
Street yr raw denim master. Twee vice selvage neutra.
Single-origin coffee crucifix franzen lo-fi...
type_of: article
id: 5
readable_publish_date: Dec 15
slug: let-us-now-praise-famous-men4-1oj7
path: /username6/let-us-now-praise-famous-men4-1oj7
url: >-
http://forem.test/username6/let-us-now-praise-famous-men4-1oj7
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2023-12-15T00:15:28Z'
positive_reactions_count: 0
cover_image: >-
http://forem.test/assets/8-915172672c34364d29c3fce07afa413c1ac072beff54ddd79fc7e3ed633556a1.png
social_image: >-
http://forem.test/assets/8-915172672c34364d29c3fce07afa413c1ac072beff54ddd79fc7e3ed633556a1.png
canonical_url: >-
http://forem.test/username6/let-us-now-praise-famous-men4-1oj7
created_at: '2023-12-15T00:15:28Z'
edited_at: null
crossposted_at: null
published_at: '2023-12-15T00:15:28Z'
last_comment_at: '2023-12-15T00:15:28Z'
reading_time_minutes: 1
tag_list:
- discuss
user:
name: Lanette "Marine" \:/ Stanton
username: username6
twitter_username: twitter6
github_username: github6
user_id: 886
website_url: null
profile_image: >-
/uploads/user/profile_image/886/e13bee17-64f8-43d8-9cdb-ba17c28cbdb4.jpeg
profile_image_90: >-
/uploads/user/profile_image/886/e13bee17-64f8-43d8-9cdb-ba17c28cbdb4.jpeg
organization:
name: Spinka and Sons
username: org4
slug: org4
profile_image: >-
/uploads/organization/profile_image/4/f1003659-a58c-4019-89d1-24817528626a.png
profile_image_90: >-
/uploads/organization/profile_image/4/f1003659-a58c-4019-89d1-24817528626a.png
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
$ref: '#/components/schemas/ArticlesListPublishedArticlesResponse'
/api/articles/latest:
get:
tags:
- articles
summary: Published articles sorted by published date
operationId: Articles_listLatestPublished
security: []
description: >-
This endpoint allows the client to retrieve a list of articles. ordered
by descending publish date.
It supports pagination, each page will contain 30 articles by default.
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'200':
description: A List of Articles
content:
application/json:
example:
- tags: javascript, html, discuss
title: Precious Bane7
description: >-
Etsy green juice trust fund irony sriracha bushwick
flexitarian pickled. Blog kitsch...
type_of: article
id: 8
readable_publish_date: Dec 15
slug: precious-bane7-31i9
path: /username9/precious-bane7-31i9
url: http://forem.test/username9/precious-bane7-31i9
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2023-12-15T00:15:28Z'
positive_reactions_count: 0
cover_image: >-
http://forem.test/assets/29-62fdba2773105cf85b89a795a479be680d13a73e6b5406cacaa2458d403dda8c.png
social_image: >-
http://forem.test/assets/29-62fdba2773105cf85b89a795a479be680d13a73e6b5406cacaa2458d403dda8c.png
canonical_url: http://forem.test/username9/precious-bane7-31i9
created_at: '2023-12-15T00:15:28Z'
edited_at: null
crossposted_at: null
published_at: '2023-12-15T00:15:28Z'
last_comment_at: '2023-12-15T00:15:28Z'
reading_time_minutes: 1
tag_list:
- javascript
- html
- discuss
user:
name: Bobette "Ling" \:/ Kuvalis
username: username9
twitter_username: twitter9
github_username: github9
user_id: 889
website_url: null
profile_image: >-
/uploads/user/profile_image/889/114ac38d-7b97-41d5-9668-c44b27fa8fa1.jpeg
profile_image_90: >-
/uploads/user/profile_image/889/114ac38d-7b97-41d5-9668-c44b27fa8fa1.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
- tags: javascript, html, discuss
title: Cover Her Face6
description: >-
Park aesthetic tattooed godard post-ironic wolf beard
cold-pressed. Tumblr authentic roof readymade...
type_of: article
id: 7
readable_publish_date: Dec 15
slug: cover-her-face6-12p3
path: /username8/cover-her-face6-12p3
url: http://forem.test/username8/cover-her-face6-12p3
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2023-12-15T00:15:28Z'
positive_reactions_count: 0
cover_image: >-
http://forem.test/assets/25-b4bb206b62bee552880440f638594e41dcd649ed9bd821af2e8dfc671d1d6813.png
social_image: >-
http://forem.test/assets/25-b4bb206b62bee552880440f638594e41dcd649ed9bd821af2e8dfc671d1d6813.png
canonical_url: http://forem.test/username8/cover-her-face6-12p3
created_at: '2023-12-15T00:15:28Z'
edited_at: null
crossposted_at: null
published_at: '2023-12-15T00:15:28Z'
last_comment_at: '2023-12-15T00:15:28Z'
reading_time_minutes: 1
tag_list:
- javascript
- html
- discuss
user:
name: Karen "Nakia" \:/ Lockman
username: username8
twitter_username: twitter8
github_username: github8
user_id: 888
website_url: null
profile_image: >-
/uploads/user/profile_image/888/bb690b36-2309-455f-81f4-98b4ec247427.jpeg
profile_image_90: >-
/uploads/user/profile_image/888/bb690b36-2309-455f-81f4-98b4ec247427.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
- tags: javascript, html, discuss
title: I Know Why the Caged Bird Sings5
description: >-
Carry meh farm-to-table. Fanny pack before they sold out
normcore fingerstache disrupt church-key...
type_of: article
id: 6
readable_publish_date: Dec 15
slug: i-know-why-the-caged-bird-sings5-393f
path: /username7/i-know-why-the-caged-bird-sings5-393f
url: >-
http://forem.test/username7/i-know-why-the-caged-bird-sings5-393f
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2023-12-15T00:15:28Z'
positive_reactions_count: 0
cover_image: >-
http://forem.test/assets/7-7dc75c1a59875db65e2539f321090f6cb232c3dbffdbe4367b0d32b8f2797758.png
social_image: >-
http://forem.test/assets/7-7dc75c1a59875db65e2539f321090f6cb232c3dbffdbe4367b0d32b8f2797758.png
canonical_url: >-
http://forem.test/username7/i-know-why-the-caged-bird-sings5-393f
created_at: '2023-12-15T00:15:28Z'
edited_at: null
crossposted_at: null
published_at: '2023-12-15T00:15:28Z'
last_comment_at: '2023-12-15T00:15:28Z'
reading_time_minutes: 1
tag_list:
- javascript
- html
- discuss
user:
name: Darby "Damian" \:/ Quitzon
username: username7
twitter_username: twitter7
github_username: github7
user_id: 887
website_url: null
profile_image: >-
/uploads/user/profile_image/887/9e09ae0d-d45e-46e6-bcab-3b65ffef6c4d.jpeg
profile_image_90: >-
/uploads/user/profile_image/887/9e09ae0d-d45e-46e6-bcab-3b65ffef6c4d.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
$ref: '#/components/schemas/ArticlesListLatestPublishedResponse'
/api/articles/{id}:
get:
tags:
- articles
summary: Published article by id
operationId: Articles_getById
security: []
description: >-
This endpoint allows the client to retrieve a single published article
given its `id`.
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
'200':
description: An Article
content:
application/json:
example:
tags:
- discuss
title: It's a Battlefield8
description: >-
Venmo slow-carb vhs ugh cronut crucifix. Freegan hella hammock
helvetica you probably haven't heard...
type_of: article
id: 9
readable_publish_date: Dec 15
slug: its-a-battlefield8-2af
path: /username10/its-a-battlefield8-2af
url: http://forem.test/username10/its-a-battlefield8-2af
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2023-12-15T00:15:28Z'
positive_reactions_count: 0
cover_image: >-
http://forem.test/assets/14-5e64731cc7cd63e3b689647d9d3c3e4e1d907690c716d3dd1e356466726a2c2d.png
social_image: >-
http://forem.test/assets/14-5e64731cc7cd63e3b689647d9d3c3e4e1d907690c716d3dd1e356466726a2c2d.png
canonical_url: http://forem.test/username10/its-a-battlefield8-2af
created_at: '2023-12-15T00:15:28Z'
edited_at: null
crossposted_at: null
published_at: '2023-12-15T00:15:28Z'
last_comment_at: '2023-12-15T00:15:28Z'
reading_time_minutes: 1
tag_list: discuss
body_html: >+
<p>Venmo slow-carb vhs ugh cronut crucifix. Freegan hella
hammock helvetica you probably haven't heard of them try-hard.
Humblebrag iphone fashion axe small batch flexitarian
fixie.</p>
<p>Neutra cliche occupy trust fund actually. Heirloom vinyl
vice freegan. Pbr&b whatever organic dreamcatcher
kickstarter pork belly authentic.</p>
body_markdown: >+
---
title: It's a Battlefield8
published: true
tags: discuss
date:
series:
canonical_url:
---
Venmo slow-carb vhs ugh cronut crucifix. Freegan hella hammock
helvetica you probably haven't heard of them try-hard.
Humblebrag iphone fashion axe small batch flexitarian fixie.
Neutra cliche occupy trust fund actually. Heirloom vinyl vice
freegan. Pbr&b whatever organic dreamcatcher kickstarter pork
belly authentic.
user:
name: Raylene "Romana" \:/ Bailey
username: username10
twitter_username: twitter10
github_username: github10
user_id: 890
website_url: null
profile_image: >-
/uploads/user/profile_image/890/f6fe914d-9deb-461c-bb67-2f8af4957a89.jpeg
profile_image_90: >-
/uploads/user/profile_image/890/f6fe914d-9deb-461c-bb67-2f8af4957a89.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
$ref: '#/components/schemas/ArticlesGetByIdResponse'
'404':
description: Article Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesGetById404Response'
put:
tags:
- articles
summary: Update an article by id
operationId: Articles_updateById
description: >-
This endpoint allows the client to update an existing article.
"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.
parameters:
- description: The ID of the user to unpublish.
name: id
in: path
required: true
schema:
type: integer
format: int32
minimum: 1
example: 123
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
responses:
'200':
description: An Article
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesUpdateByIdResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesUpdateById401Response'
'404':
description: Article Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesUpdateById404Response'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesUpdateById422Response'
/api/articles/{username}/{slug}:
get:
tags:
- articles
summary: Published article by path
operationId: Articles_getByPath
security: []
description: >-
This endpoint allows the client to retrieve a single published article
given its `path`.
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:
tags:
- discuss
title: Far From the Madding Crowd12
description: >-
3 wolf moon asymmetrical mumblecore put a bird on it tilde
yolo mustache crucifix. Heirloom scenester...
type_of: article
id: 13
readable_publish_date: Dec 15
slug: far-from-the-madding-crowd12-1m5d
path: /username15/far-from-the-madding-crowd12-1m5d
url: http://forem.test/username15/far-from-the-madding-crowd12-1m5d
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2023-12-15T00:15:29Z'
positive_reactions_count: 0
cover_image: >-
http://forem.test/assets/2-1a96ae446ded018b65b215cce3aecc40a00e701642da521fdd6edd3c593ff6c1.png
social_image: >-
http://forem.test/assets/2-1a96ae446ded018b65b215cce3aecc40a00e701642da521fdd6edd3c593ff6c1.png
canonical_url: http://forem.test/username15/far-from-the-madding-crowd12-1m5d
created_at: '2023-12-15T00:15:29Z'
edited_at: null
crossposted_at: null
published_at: '2023-12-15T00:15:29Z'
last_comment_at: '2023-12-15T00:15:29Z'
reading_time_minutes: 1
tag_list: discuss
body_html: >+
<p>3 wolf moon asymmetrical mumblecore put a bird on it tilde
yolo mustache crucifix. Heirloom scenester crucifix pickled
skateboard. Synth 8-bit flexitarian typewriter banjo. Crucifix
synth wayfarers humblebrag locavore vice brooklyn organic.</p>
<p>Microdosing cronut muggle magic authentic carry. Occupy
kombucha synth celiac food truck you probably haven't heard of
them.</p>
body_markdown: >+
---
title: Far From the Madding Crowd12
published: true
tags: discuss
date:
series:
canonical_url:
---
3 wolf moon asymmetrical mumblecore put a bird on it tilde
yolo mustache crucifix. Heirloom scenester crucifix pickled
skateboard. Synth 8-bit flexitarian typewriter banjo. Crucifix
synth wayfarers humblebrag locavore vice brooklyn organic.
Microdosing cronut muggle magic authentic carry. Occupy
kombucha synth celiac food truck you probably haven't heard of
them.
user:
name: Noreen "Alvaro" \:/ Schinner
username: username15
twitter_username: twitter15
github_username: github15
user_id: 895
website_url: null
profile_image: >-
/uploads/user/profile_image/895/9e4706ef-d56d-4167-9355-1a3db85801e1.jpeg
profile_image_90: >-
/uploads/user/profile_image/895/9e4706ef-d56d-4167-9355-1a3db85801e1.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
$ref: '#/components/schemas/ArticlesGetByPathResponse'
'404':
description: Article Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesGetByPath404Response'
/api/articles/me:
get:
tags:
- articles
- users
summary: User's articles
operationId: Articles_getPublishedList
description: >-
This endpoint allows the client to retrieve a list of published articles
on behalf of an authenticated user.
"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.
Published articles will be in reverse chronological publication order.
It will return published articles with pagination. By default a page
will contain 30 articles.
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'200':
description: A List of the authenticated user's Articles
content:
application/json:
example: []
schema:
$ref: '#/components/schemas/ArticlesGetPublishedListResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesGetPublishedList401Response'
/api/articles/me/published:
get:
tags:
- articles
- users
summary: User's published articles
operationId: Articles_getPublishedList
description: >-
This endpoint allows the client to retrieve a list of published articles
on behalf of an authenticated user.
"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.
Published articles will be in reverse chronological publication order.
It will return published articles with pagination. By default a page
will contain 30 articles.
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'200':
description: A List of the authenticated user's Articles
content:
application/json:
example: []
schema:
$ref: '#/components/schemas/ArticlesGetPublishedList200Response'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesGetPublishedList401Response'
/api/articles/me/unpublished:
get:
tags:
- articles
- users
summary: User's unpublished articles
operationId: Articles_getUnpublishedList
description: >-
This endpoint allows the client to retrieve a list of unpublished
articles on behalf of an authenticated user.
"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.
Unpublished articles will be in reverse chronological creation order.
It will return unpublished articles with pagination. By default a page
will contain 30 articles.
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'200':
description: A List of the authenticated user's Articles
content:
application/json:
example: []
schema:
$ref: '#/components/schemas/ArticlesGetUnpublishedListResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesGetUnpublishedList401Response'
/api/articles/me/all:
get:
tags:
- articles
- users
summary: User's all articles
operationId: Articles_getAllUserArticles
description: >-
This endpoint allows the client to retrieve a list of all articles on
behalf of an authenticated user.
"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.
It will return both published and unpublished articles with pagination.
Unpublished articles will be at the top of the list in reverse
chronological creation order. Published articles will follow in reverse
chronological publication order.
By default a page will contain 30 articles.
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'200':
description: A List of the authenticated user's Articles
content:
application/json:
example: []
schema:
$ref: '#/components/schemas/ArticlesGetAllUserArticlesResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesGetAllUserArticles401Response'
/api/articles/{id}/unpublish:
put:
tags:
- articles
summary: Unpublish an article
operationId: Articles_unpublishById
description: >-
This endpoint allows the client to unpublish an article.
The user associated with the API key must have any 'admin' or
'moderator' role.
The article will be unpublished and will no longer be visible to the
public. It will remain
in the database and will set back to draft status on the author's posts
dashboard. Any
notifications associated with the article will be deleted. Any comments
on the article
will remain.
parameters:
- description: The ID of the article to unpublish.
name: id
in: path
required: true
schema:
type: integer
format: int32
minimum: 1
example: 1
- description: Content for the note that's created along with unpublishing
name: note
in: query
required: false
schema:
type: string
example: Admin requested unpublishing all articles via API
responses:
'204':
description: Article successfully unpublished
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesUnpublishByIdResponse'
'404':
description: Article Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ArticlesUnpublishById404Response'
/api/segments:
get:
tags:
- segments
summary: Manually managed audience segments
operationId: Segments_listAudienceSegments
description: >-
This endpoint allows the client to retrieve a list of audience segments.
An audience segment is a group of users that can be targeted by a
Billboard. This API only permits managing segments you create and
maintain yourself.
The endpoint supports pagination, and each page will contain `30`
segments by default.
parameters:
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'200':
description: A List of manually managed audience segments
content:
application/json:
example:
- id: 2
created_at: '2023-12-15T11:15:30.398+11:00'
type_of: manual
updated_at: '2023-12-15T11:15:30.398+11:00'
user_count: 1
- id: 1
created_at: '2023-12-15T11:15:30.308+11:00'
type_of: manual
updated_at: '2023-12-15T11:15:30.308+11:00'
user_count: 3
schema:
$ref: '#/components/schemas/SegmentsListAudienceSegmentsResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/SegmentsListAudienceSegments401Response'
post:
tags:
- segments
summary: Create a manually managed audience segment
operationId: Segments_createManuallyManagedSegment
description: >-
This endpoint allows the client to create a new audience segment.
An audience segment is a group of users that can be targeted by a
Billboard. This API only permits managing segments you create and
maintain yourself.
responses:
'201':
description: A manually managed audience segment
content:
application/json:
schema:
$ref: >-
#/components/schemas/SegmentsCreateManuallyManagedSegmentResponse
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: >-
#/components/schemas/SegmentsCreateManuallyManagedSegment401Response
/api/segments/{id}:
get:
tags:
- segments
summary: A manually managed audience segment
operationId: Segments_getById
description: >-
This endpoint allows the client to retrieve a single manually-managed
audience segment specified by ID.
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int32
minimum: 1