Skip to content

Node.js based forum software built for the modern web

feat: write-api update, WIP

Julian Lam9fd5c439b2db
diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml
index 54033e2899..0373bde3b2 100644
--- a/public/openapi/read.yaml
+++ b/public/openapi/read.yaml
@@ -15,15 +15,17 @@ info:
## Authentication
+ There are a multitude of ways to authenticate with the Read API.
+
### Cookie Authentication
This default authentication behaviour of this API is via cookie jar to find a valid session. A valid login session is required for API calls that pertain to operations involving a logged-in user. For example, `/api/unread` is a route showing unread topics, and is not accessible by guest users.
- ### Bearer Authentcation
+ ### Bearer Authentication
- The Write API offers bearer authentication, as administered through the administration panel.
+ Both the Read API and Write API offers bearer authentication, as administered through the administration panel.
- * For NodeBB v1.x, this is provided by [`nodebb-plugin-write-api`](https://github.com/NodeBB/nodebb-plugin-write-api).
+ * For NodeBB v1.x, this is provided by [`nodebb-plugin-write-api`](https://github.com/NodeBB/nodebb-plugin-write-api). The Write API plugin needs to be installed before authentication via bearer token is enabled on routes provided by the Read API.
* For NodeBB v2.x+ (in development), the Write API is available in core, and bearer authentication is available out-of-the-box
### JSON Web Token (JWT)
@@ -2759,7 +2761,8 @@ paths:
get:
tags:
- home
- summary: /api/config
+ summary: Get forum settings
+ description: This route retrieves forum settings and user-specific settings for client-side options on the forum.
responses:
"200":
description: ""
@@ -2908,7 +2911,8 @@ paths:
get:
tags:
- users
- summary: /api/user/uid/{uid}
+ summary: Get user by uid
+ description: This route retrieves a user's public profile data. If the calling user is the same as the profile, then it will also return data the user elected to hide (e.g. email/fullname)
parameters:
- name: uid
in: path
@@ -2927,7 +2931,8 @@ paths:
get:
tags:
- users
- summary: /api/user/username/{username}
+ summary: Get user by username
+ description: This route retrieves a user's public profile data. If the calling user is the same as the profile, then it will also return data the user elected to hide (e.g. email/fullname)
parameters:
- name: username
in: path
@@ -2946,7 +2951,8 @@ paths:
get:
tags:
- users
- summary: /api/user/email/{email}
+ summary: Get user by email
+ description: This route retrieves a user's public profile data. If the calling user is the same as the profile, then it will also return data the user elected to hide (e.g. email/fullname)
parameters:
- name: email
in: path
@@ -2985,7 +2991,7 @@ paths:
get:
tags:
- users
- summary: /api/user/uid/{userslug}/export/uploads
+ summary: Export a user's uploads (.zip)
parameters:
- name: userslug
in: path
@@ -3005,7 +3011,7 @@ paths:
get:
tags:
- users
- summary: /api/user/uid/{userslug}/export/profile
+ summary: Export a user's profile data (.csv)
parameters:
- name: userslug
in: path
@@ -3434,175 +3440,32 @@ paths:
- 1
- 2
- 3
- "/api/recent/posts/{term?}":
+ "/api/topic/{topic_id}/{slug}/{post_index}":
get:
tags:
- topics
- summary: /api/recent/posts/{term?}
+ summary: Get topic data
parameters:
- - name: term?
+ - name: topic_id
in: path
required: true
schema:
type: string
- example: day
- responses:
- "200":
- description: ""
- content:
- application/json:
- schema:
- $ref: components/schemas/PostsObject.yaml#/PostsObject
- /api/unread/total:
- get:
- tags:
- - topics
- summary: Get number of unread topics
- responses:
- "200":
- description: "Success"
- content:
- text/plain:
- schema:
- type: number
- "/api/topic/teaser/{topic_id}":
- get:
- tags:
- - topics
- summary: Get a topic's teaser post
- parameters:
- - name: topic_id
+ example: 1
+ - name: slug
+ description: This parameter is not required. If omitted, the request will be automatically redirected with the proper topic slug.
in: path
required: true
schema:
type: string
- example: 1
- responses:
- "200":
- description: "A JSON object containing the teaser post for a topic"
- content:
- application/json:
- schema:
- $ref: components/schemas/PostsObject.yaml#/PostsObject
- "/api/topic/pagination/{topic_id}":
- get:
- tags:
- - topics
- summary: /api/topic/pagination/{topic_id}
- parameters:
- - name: topic_id
+ example: test-topic
+ - name: post_index
+ description: This parameter is not required. If omitted, the request will presume that you want the first post. The API response is largely unaffected by this parameter, it is used client-side (to send the user to the requested post), and changes the meta/link tags in the server-side generated HTML.
in: path
required: true
schema:
type: string
example: 1
- responses:
- "200":
- description: ""
- content:
- application/json:
- schema:
- $ref: components/schemas/Pagination.yaml#/Pagination
- /api/post/upload:
- post:
- tags:
- - posts
- summary: /api/post/upload
- responses:
- "200":
- description: ""
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- text/plain:
- schema:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- "403":
- description: ""
- content:
- application/json:
- schema:
- type: string
- example: Forbidden
- text/plain:
- schema:
- type: string
- example: Forbidden
- "500":
- description: ""
- content:
- application/json:
- schema:
- type: object
- properties:
- path:
- type: string
- error:
- type: string
- text/plain:
- schema:
- type: object
- properties:
- path:
- type: string
- error:
- type: string
- /api/topic/thumb/upload:
- post:
- tags:
- - topics
- summary: Upload topic thumb
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- files:
- type: array
- items:
- type: string
- format: binary
- required:
- - files
- responses:
- "200":
- description: "Image uploaded"
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- description: The filename
- url:
- type: string
- description: URL of the uploaded image for use client-side
- path:
- type: string
- description: Path to the file in the local file system
- /api/login:
- get:
- tags:
- - authentication
- summary: /api/login
responses:
"200":
description: ""
@@ -3612,408 +3475,617 @@ paths:
allOf:
- type: object
properties:
- loginFormEntry:
+ tid:
+ type: number
+ description: A topic identifier
+ uid:
+ type: number
+ description: A user identifier
+ cid:
+ type: number
+ description: A category identifier
+ title:
+ type: string
+ slug:
+ type: string
+ timestamp:
+ type: number
+ lastposttime:
+ type: number
+ postcount:
+ type: number
+ viewcount:
+ type: number
+ mainPid:
+ type: number
+ description: The post id of the first post in this topic (also called the
+ "original post")
+ teaserPid:
+ type: number
+ nullable: true
+ upvotes:
+ type: number
+ downvotes:
+ type: number
+ deleted:
+ type: number
+ locked:
+ type: number
+ pinned:
+ type: number
+ description: Whether or not this particular topic is pinned to the top of the
+ category
+ deleterUid:
+ type: number
+ titleRaw:
+ type: string
+ timestampISO:
+ type: string
+ description: An ISO 8601 formatted date string (complementing `timestamp`)
+ lastposttimeISO:
+ type: string
+ votes:
+ type: number
+ tags:
type: array
items:
type: object
properties:
- label:
+ value:
type: string
- description: A label for the added block
- html:
+ valueEscaped:
type: string
- description: HTML to render on the login page
- styleName:
+ color:
type: string
- description: Custom identifier (value is added to `input[id]` and `label[for]`)
- alternate_logins:
- type: boolean
- authentication:
+ bgColor:
+ type: string
+ score:
+ type: number
+ posts:
type: array
items:
type: object
properties:
- name:
- type: string
- url:
+ pid:
+ type: number
+ uid:
+ type: number
+ description: A user identifier
+ tid:
+ type: number
+ description: A topic identifier
+ content:
type: string
- callbackURL:
+ timestamp:
+ type: number
+ votes:
+ type: number
+ deleted:
+ type: number
+ upvotes:
+ type: number
+ downvotes:
+ type: number
+ deleterUid:
+ type: number
+ edited:
+ type: number
+ timestampISO:
type: string
- icon:
+ description: An ISO 8601 formatted date string (complementing `timestamp`)
+ editedISO:
type: string
- scope:
- type: string
- prompt:
- type: string
- allowRegistration:
- type: boolean
- allowLoginWith:
- type: string
- title:
- type: string
- allowPasswordReset:
- type: boolean
- allowLocalLogin:
- type: boolean
- - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- - $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/register:
- get:
- tags:
- - authentication
- summary: /api/register
- responses:
- "200":
- description: ""
- content:
- application/json:
- schema:
- allOf:
- - type: object
- properties:
- register_window:spansize:
- type: string
- alternate_logins:
- type: boolean
- authentication:
+ index:
+ type: number
+ user:
+ type: object
+ properties:
+ uid:
+ type: number
+ description: A user identifier
+ username:
+ type: string
+ description: A friendly name for a given user account
+ userslug:
+ type: string
+ description: An URL-safe variant of the username (i.e. lower-cased, spaces
+ removed, etc.)
+ reputation:
+ type: number
+ postcount:
+ type: number
+ topiccount:
+ type: number
+ picture:
+ type: string
+ nullable: true
+ signature:
+ type: string
+ banned:
+ type: number
+ banned:expire:
+ type: number
+ status:
+ type: string
+ lastonline:
+ type: number
+ groupTitle:
+ nullable: true
+ type: string
+ groupTitleArray:
+ type: array
+ items:
+ type: string
+ icon:text:
+ type: string
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users without
+ an avatar
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with
+ `icon:text` for the user's auto-generated
+ icon
+ example: "#f44336"
+ lastonlineISO:
+ type: string
+ banned_until:
+ type: number
+ banned_until_readable:
+ type: string
+ selectedGroups:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ slug:
+ type: string
+ labelColor:
+ type: string
+ textColor:
+ type: string
+ icon:
+ type: string
+ userTitle:
+ type: string
+ custom_profile_info:
+ type: array
+ items:
+ type: object
+ properties:
+ content:
+ type: string
+ description: HTML that is injected into `topic.tpl` of themes that support custom profile info
+ editor:
+ nullable: true
+ bookmarked:
+ type: boolean
+ upvoted:
+ type: boolean
+ downvoted:
+ type: boolean
+ replies:
+ type: object
+ properties:
+ hasMore:
+ type: boolean
+ users:
+ type: array
+ items:
+ type: object
+ properties:
+ username:
+ type: string
+ description: A friendly name for a given user account
+ userslug:
+ type: string
+ description: An URL-safe variant of the username (i.e. lower-cased, spaces
+ removed, etc.)
+ picture:
+ type: string
+ uid:
+ type: number
+ description: A user identifier
+ icon:text:
+ type: string
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users without
+ an avatar
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with
+ `icon:text` for the user's auto-generated
+ icon
+ example: "#f44336"
+ administrator:
+ type: boolean
+ text:
+ type: string
+ count:
+ type: number
+ selfPost:
+ type: boolean
+ display_edit_tools:
+ type: boolean
+ display_delete_tools:
+ type: boolean
+ display_moderator_tools:
+ type: boolean
+ display_move_tools:
+ type: boolean
+ display_post_menu:
+ type: boolean
+ category:
+ $ref: components/schemas/CategoryObject.yaml#/CategoryObject
+ tagWhitelist:
+ type: array
+ items:
+ type: string
+ thread_tools:
type: array
items:
type: object
properties:
- name:
- type: string
- url:
+ class:
type: string
- callbackURL:
+ title:
type: string
icon:
type: string
- scope:
- type: string
- prompt:
- type: string
- minimumUsernameLength:
- type: number
- maximumUsernameLength:
- type: number
- minimumPasswordLength:
- type: number
- minimumPasswordStrength:
- type: number
- regFormEntry:
+ isFollowing:
+ type: boolean
+ isNotFollowing:
+ type: boolean
+ isIgnoring:
+ type: boolean
+ bookmark:
+ nullable: true
+ postSharing:
type: array
items:
type: object
properties:
- label:
+ id:
type: string
- html:
+ name:
type: string
- styleName:
+ class:
type: string
- title:
- type: string
- - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- - $ref: components/schemas/CommonProps.yaml#/CommonProps
- # /api/register/complete:
- # get:
- # tags:
- # - authentication
- # summary: /api/register/complete
- # responses:
- # "200":
- # description: ""
- # content:
- # application/json:
- # schema:
- # allOf:
- # - type: object
- # properties:
- # title:
- # type: string
- # errors:
- # type: array
- # items: {}
- # sections:
- # type: array
- # items:
- # type: string
- # - $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/search:
- get:
- tags:
- - search
- summary: /api/search
- responses:
- "200":
- description: ""
- content:
- application/json:
- schema:
- allOf:
- - type: object
- properties:
- posts:
- $ref: components/schemas/PostsObject.yaml#/PostsObject
- matchCount:
- type: number
- pageCount:
- type: number
- time:
- type: string
- multiplePages:
+ activated:
+ type: boolean
+ deleter:
+ nullable: true
+ merger:
+ nullable: true
+ related:
+ type: array
+ items:
+ $ref: components/schemas/TopicObject.yaml#/TopicObject
+ unreplied:
type: boolean
- search_query:
- type: string
- term:
- type: string
- categories:
+ icons:
type: array
items:
- type: object
- properties:
- value:
- oneOf:
- - type: string
- - type: number
- text:
- type: string
- categoriesCount:
+ type: string
+ description: HTML that is rendered by the theme
+ privileges:
+ type: object
+ properties:
+ topics:reply:
+ type: boolean
+ topics:read:
+ type: boolean
+ topics:tag:
+ type: boolean
+ topics:delete:
+ type: boolean
+ posts:edit:
+ type: boolean
+ posts:history:
+ type: boolean
+ posts:delete:
+ type: boolean
+ posts:view_deleted:
+ type: boolean
+ read:
+ type: boolean
+ purge:
+ type: boolean
+ view_thread_tools:
+ type: boolean
+ editable:
+ type: boolean
+ deletable:
+ type: boolean
+ view_deleted:
+ type: boolean
+ isAdminOrMod:
+ type: boolean
+ disabled:
+ type: number
+ tid:
+ type: string
+ uid:
+ type: number
+ description: A user identifier
+ topicStaleDays:
type: number
- expandSearch:
+ reputation:disabled:
+ type: number
+ downvote:disabled:
+ type: number
+ feeds:disableRSS:
+ type: number
+ bookmarkThreshold:
+ type: number
+ necroThreshold:
+ type: number
+ postEditDuration:
+ type: number
+ postDeleteDuration:
+ type: number
+ scrollToMyPost:
type: boolean
- showAsPosts:
+ allowMultipleBadges:
type: boolean
- showAsTopics:
+ privateUploads:
type: boolean
- title:
- type: string
- searchDefaultSortBy:
+ rssFeedUrl:
type: string
- required:
- - posts
- - matchCount
- - pageCount
- - time
- - multiplePages
- - search_query
- - categories
- - categoriesCount
- - expandSearch
- - showAsPosts
- - showAsTopics
- - title
- - searchDefaultSortBy
+ postIndex:
+ type: number
+ loggedInUser:
+ $ref: components/schemas/UserObject.yaml#/UserObject
- $ref: components/schemas/Pagination.yaml#/Pagination
- $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: components/schemas/CommonProps.yaml#/CommonProps
- "/api/reset":
+ /api/recent:
get:
tags:
- - authentication
- summary: Get user password reset (step 1)
+ - topics
+ summary: Get recent topics
+ description: Returns a list of topics sorted by timestamp.
responses:
"200":
- description: "A JSON object containing the 1st step of the user password reset flow"
+ description: An array of topic objects sorted by timestamp.
content:
application/json:
schema:
allOf:
- type: object
properties:
- code:
+ nextStart:
+ type: number
+ topicCount:
+ type: number
+ topics:
+ type: array
+ items:
+ $ref: components/schemas/TopicObject.yaml#/TopicObject
+ tids:
+ type: array
+ items:
+ type: number
+ canPost:
+ type: boolean
+ categories:
+ type: array
+ items:
+ type: object
+ properties:
+ cid:
+ type: number
+ description: A category identifier
+ name:
+ type: string
+ level:
+ type: string
+ icon:
+ type: string
+ parentCid:
+ type: number
+ description: The category identifier for the category that is the immediate
+ ancestor of the current category
+ color:
+ type: string
+ bgColor:
+ type: string
+ selected:
+ type: boolean
+ imageClass:
+ type: string
+ allCategoriesUrl:
type: string
+ selectedCategory:
+ type: object
+ properties:
+ icon:
+ type: string
+ name:
+ type: string
+ bgColor:
+ type: string
nullable: true
+ selectedCids:
+ type: array
+ items:
+ type: number
+ feeds:disableRSS:
+ type: number
+ rssFeedUrl:
+ type: string
title:
type: string
+ filters:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ filter:
+ type: string
+ selectedFilter:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ filter:
+ type: string
+ terms:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ term:
+ type: string
+ selectedTerm:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ term:
+ type: string
+ - $ref: components/schemas/Pagination.yaml#/Pagination
- $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: components/schemas/CommonProps.yaml#/CommonProps
- "/api/reset/{code}":
+ "/api/recent/posts/{term}":
get:
tags:
- - authentication
- summary: Get user password reset (step 2)
+ - posts
+ summary: Get recent posts
parameters:
- - name: code
+ - name: term
in: path
required: true
schema:
type: string
- example: testCode
+ example: daily
responses:
"200":
- description: "A JSON object containing the 2nd step of the user password reset flow"
+ description: ""
content:
application/json:
schema:
- allOf:
- - type: object
- properties:
- valid:
- type: boolean
- code:
- type: string
- minimumPasswordLength:
- type: number
- minimumPasswordStrength:
- type: number
- title:
- type: string
- - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- - $ref: components/schemas/CommonProps.yaml#/CommonProps
- "/api/email/unsubscribe/{token}":
- # TODO: Need GET route here as well
- post:
- tags:
- - emails
- summary: /api/email/unsubscribe/{token}
- parameters:
- - name: token
- in: path
- required: true
- schema:
- type: string
- example: testToken
- responses:
- "200":
- description: "Successfully unsubscribed"
- "500":
- description: "Server-side error (likely token verification failure)"
- "/api/topic/{topic_id}/{slug}/{post_index}":
+ $ref: components/schemas/PostsObject.yaml#/PostsObject
+ /api/unread:
get:
tags:
- topics
- summary: /api/topic/{topic_id}/{slug}/{post_index}
- parameters:
- - name: topic_id
- in: path
- required: true
- schema:
- type: string
- example: 1
- - name: slug
- in: path
- required: true
- schema:
- type: string
- example: test-topic
- - name: post_index
- in: path
- required: true
- schema:
- type: string
- example: 1
+ summary: Get unread topics
+ description: Returns a list of the current user's unread topics, sorted by the
+ last post's timestamp.
responses:
"200":
- description: ""
+ description: An array of unread topic objects sorted by the last post's timestamp.
content:
application/json:
schema:
allOf:
- type: object
properties:
- tid:
- type: number
- description: A topic identifier
- uid:
- type: number
- description: A user identifier
- cid:
- type: number
- description: A category identifier
- title:
- type: string
- slug:
- type: string
- timestamp:
- type: number
- lastposttime:
- type: number
- postcount:
- type: number
- viewcount:
- type: number
- mainPid:
- type: number
- description: The post id of the first post in this topic (also called the
- "original post")
- teaserPid:
- type: number
- nullable: true
- upvotes:
- type: number
- downvotes:
- type: number
- deleted:
- type: number
- locked:
- type: number
- pinned:
- type: number
- description: Whether or not this particular topic is pinned to the top of the
- category
- deleterUid:
- type: number
- titleRaw:
- type: string
- timestampISO:
- type: string
- description: An ISO 8601 formatted date string (complementing `timestamp`)
- lastposttimeISO:
- type: string
- votes:
+ showSelect:
+ type: boolean
+ nextStart:
type: number
- tags:
- type: array
- items:
- type: object
- properties:
- value:
- type: string
- valueEscaped:
- type: string
- color:
- type: string
- bgColor:
- type: string
- score:
- type: number
- posts:
+ topics:
type: array
items:
type: object
properties:
- pid:
+ tid:
type: number
+ description: A topic identifier
uid:
type: number
description: A user identifier
- tid:
+ cid:
type: number
- description: A topic identifier
- content:
+ description: A category identifier
+ mainPid:
+ type: number
+ description: The post id of the first post in this topic (also called the
+ "original post")
+ title:
+ type: string
+ slug:
type: string
timestamp:
type: number
- votes:
+ lastposttime:
type: number
- deleted:
+ postcount:
+ type: number
+ viewcount:
+ type: number
+ teaserPid:
type: number
upvotes:
type: number
downvotes:
type: number
- deleterUid:
+ deleted:
type: number
- edited:
+ locked:
+ type: number
+ pinned:
type: number
+ description: Whether or not this particular topic is pinned to the top of the
+ category
+ titleRaw:
+ type: string
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
- editedISO:
+ lastposttimeISO:
type: string
- index:
+ votes:
type: number
+ category:
+ type: object
+ properties:
+ cid:
+ type: number
+ description: A category identifier
+ name:
+ type: string
+ slug:
+ type: string
+ icon:
+ type: string
+ image:
+ nullable: true
+ imageClass:
+ nullable: true
+ type: string
+ bgColor:
+ type: string
+ color:
+ type: string
+ disabled:
+ type: number
user:
type: object
properties:
@@ -4023,6 +4095,8 @@ paths:
username:
type: string
description: A friendly name for a given user account
+ fullname:
+ type: string
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
@@ -4031,28 +4105,16 @@ paths:
type: number
postcount:
type: number
- topiccount:
- type: number
picture:
- type: string
nullable: true
+ type: string
signature:
+ nullable: true
type: string
banned:
type: number
- banned:expire:
- type: number
status:
type: string
- lastonline:
- type: number
- groupTitle:
- nullable: true
- type: string
- groupTitleArray:
- type: array
- items:
- type: string
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
@@ -4065,226 +4127,171 @@ paths:
`icon:text` for the user's auto-generated
icon
example: "#f44336"
- lastonlineISO:
- type: string
- banned_until:
- type: number
banned_until_readable:
type: string
- selectedGroups:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- slug:
- type: string
- labelColor:
- type: string
- textColor:
- type: string
- icon:
- type: string
- userTitle:
- type: string
- custom_profile_info:
- type: array
- items:
- type: object
- properties:
- content:
- type: string
- description: HTML that is injected into `topic.tpl` of themes that support custom profile info
- editor:
- nullable: true
- bookmarked:
- type: boolean
- upvoted:
- type: boolean
- downvoted:
- type: boolean
- replies:
+ teaser:
type: object
properties:
- hasMore:
- type: boolean
- users:
- type: array
- items:
- type: object
- properties:
- username:
- type: string
- description: A friendly name for a given user account
- userslug:
- type: string
- description: An URL-safe variant of the username (i.e. lower-cased, spaces
- removed, etc.)
- picture:
- type: string
- uid:
- type: number
- description: A user identifier
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users without
- an avatar
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with
- `icon:text` for the user's auto-generated
- icon
- example: "#f44336"
- administrator:
- type: boolean
- text:
+ pid:
+ type: number
+ uid:
+ type: number
+ description: A user identifier
+ timestamp:
+ type: number
+ tid:
+ type: number
+ description: A topic identifier
+ content:
type: string
- count:
+ timestampISO:
+ type: string
+ description: An ISO 8601 formatted date string (complementing `timestamp`)
+ user:
+ type: object
+ properties:
+ uid:
+ type: number
+ description: A user identifier
+ username:
+ type: string
+ description: A friendly name for a given user account
+ userslug:
+ type: string
+ description: An URL-safe variant of the username (i.e. lower-cased, spaces
+ removed, etc.)
+ picture:
+ nullable: true
+ type: string
+ icon:text:
+ type: string
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users
+ without an avatar
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with
+ `icon:text` for the user's
+ auto-generated icon
+ example: "#f44336"
+ index:
type: number
- selfPost:
- type: boolean
- display_edit_tools:
- type: boolean
- display_delete_tools:
+ tags:
+ type: array
+ items:
+ type: object
+ properties:
+ value:
+ type: string
+ valueEscaped:
+ type: string
+ color:
+ type: string
+ bgColor:
+ type: string
+ score:
+ type: number
+ isOwner:
type: boolean
- display_moderator_tools:
+ ignored:
type: boolean
- display_move_tools:
+ unread:
type: boolean
- display_post_menu:
+ bookmark:
+ nullable: true
+ unreplied:
type: boolean
- category:
- $ref: components/schemas/CategoryObject.yaml#/CategoryObject
- tagWhitelist:
- type: array
- items:
- type: string
- thread_tools:
+ icons:
+ type: array
+ items:
+ type: string
+ index:
+ type: number
+ isQuestion:
+ nullable: true
+ topicCount:
+ type: number
+ title:
+ type: string
+ pageCount:
+ type: number
+ categories:
type: array
items:
type: object
properties:
- class:
+ cid:
+ type: number
+ description: A category identifier
+ name:
type: string
- title:
+ level:
type: string
icon:
type: string
- isFollowing:
- type: boolean
- isNotFollowing:
- type: boolean
- isIgnoring:
- type: boolean
- bookmark:
- nullable: true
- postSharing:
+ parentCid:
+ type: number
+ description: The category identifier for the category that is the immediate
+ ancestor of the current category
+ color:
+ type: string
+ bgColor:
+ type: string
+ selected:
+ type: boolean
+ imageClass:
+ type: string
+ allCategoriesUrl:
+ type: string
+ selectedCids:
+ type: array
+ items:
+ type: number
+ filters:
type: array
items:
type: object
properties:
- id:
- type: string
name:
type: string
- class:
+ url:
type: string
- activated:
+ selected:
type: boolean
- deleter:
- nullable: true
- merger:
- nullable: true
- related:
- type: array
- items:
- $ref: components/schemas/TopicObject.yaml#/TopicObject
- unreplied:
- type: boolean
- icons:
- type: array
- items:
- type: string
- description: HTML that is rendered by the theme
- privileges:
+ filter:
+ type: string
+ selectedFilter:
type: object
properties:
- topics:reply:
- type: boolean
- topics:read:
- type: boolean
- topics:tag:
- type: boolean
- topics:delete:
- type: boolean
- posts:edit:
- type: boolean
- posts:history:
- type: boolean
- posts:delete:
- type: boolean
- posts:view_deleted:
- type: boolean
- read:
- type: boolean
- purge:
- type: boolean
- view_thread_tools:
- type: boolean
- editable:
- type: boolean
- deletable:
- type: boolean
- view_deleted:
- type: boolean
- isAdminOrMod:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
type: boolean
- disabled:
- type: number
- tid:
+ filter:
type: string
- uid:
- type: number
- description: A user identifier
- topicStaleDays:
- type: number
- reputation:disabled:
- type: number
- downvote:disabled:
- type: number
- feeds:disableRSS:
- type: number
- bookmarkThreshold:
- type: number
- necroThreshold:
- type: number
- postEditDuration:
- type: number
- postDeleteDuration:
- type: number
- scrollToMyPost:
- type: boolean
- allowMultipleBadges:
- type: boolean
- privateUploads:
- type: boolean
- rssFeedUrl:
- type: string
- postIndex:
- type: number
- loggedInUser:
- $ref: components/schemas/UserObject.yaml#/UserObject
- $ref: components/schemas/Pagination.yaml#/Pagination
- $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: components/schemas/CommonProps.yaml#/CommonProps
- "/api/topic/{topic_id}/{slug}":
+ /api/unread/total:
+ get:
+ tags:
+ - topics
+ summary: Get number of unread topics
+ responses:
+ "200":
+ description: "Success"
+ content:
+ text/plain:
+ schema:
+ type: number
+ "/api/topic/teaser/{topic_id}":
get:
tags:
- topics
- summary: /api/topic/{topic_id}/{slug}
+ summary: Get a topic's teaser post
parameters:
- name: topic_id
in: path
@@ -4292,23 +4299,21 @@ paths:
schema:
type: string
example: 1
- - name: slug
- in: path
- required: true
- schema:
- type: string
- example: ''
responses:
- "418":
- description: "TODO: A proper response needs to be added. It is not really a teapot | Copy response from the route w/o post_index"
- "/api/post/{pid}":
+ "200":
+ description: "A JSON object containing the teaser post for a topic"
+ content:
+ application/json:
+ schema:
+ $ref: components/schemas/PostsObject.yaml#/PostsObject
+ "/api/topic/pagination/{topic_id}":
get:
tags:
- - shorthand
- summary: Access a specific post
- description: This route comes in handy when all you have is the `pid`, and you want to redirect users to the canonical URL for the topic, with the appropriate topic slug and post index.
+ - topics
+ summary: Get topic pagination data
+ description: This route retrieves pagination data for a given topic. It is used mainly client-side, as it return data necessary to update a pagination block client-side.
parameters:
- - name: pid
+ - name: topic_id
in: path
required: true
schema:
@@ -4316,16 +4321,112 @@ paths:
example: 1
responses:
"200":
- description: "Canonical URL of topic"
+ description: ""
+ content:
+ application/json:
+ schema:
+ $ref: components/schemas/Pagination.yaml#/Pagination
+ /api/post/upload:
+ post:
+ tags:
+ - posts
+ summary: Upload a file to a specific post
+ description: Provided by NodeBB core and used mainly by the composer, this route allows you to upload an image or file to a post.
+ responses:
+ "200":
+ description: ""
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ text/plain:
+ schema:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ "403":
+ description: ""
content:
+ application/json:
+ schema:
+ type: string
+ example: Forbidden
text/plain:
schema:
type: string
- /api/flags:
+ example: Forbidden
+ "500":
+ description: ""
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ path:
+ type: string
+ error:
+ type: string
+ text/plain:
+ schema:
+ type: object
+ properties:
+ path:
+ type: string
+ error:
+ type: string
+ /api/topic/thumb/upload:
+ post:
+ tags:
+ - topics
+ summary: Upload topic thumb
+ requestBody:
+ required: true
+ content:
+ multipart/form-data:
+ schema:
+ type: object
+ properties:
+ files:
+ type: array
+ items:
+ type: string
+ format: binary
+ required:
+ - files
+ responses:
+ "200":
+ description: "Image uploaded"
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ name:
+ type: string
+ description: The filename
+ url:
+ type: string
+ description: URL of the uploaded image for use client-side
+ path:
+ type: string
+ description: Path to the file in the local file system
+ /api/login:
get:
tags:
- - flags
- summary: /api/flags
+ - authentication
+ summary: /api/login
responses:
"200":
description: ""
@@ -4335,458 +4436,56 @@ paths:
allOf:
- type: object
properties:
- flags:
+ loginFormEntry:
type: array
items:
type: object
properties:
- state:
- type: string
- flagId:
- type: number
- type:
- type: string
- targetId:
- oneOf:
- - type: string
- - type: number
- description:
- type: string
- uid:
- type: number
- description: A user identifier
- datetime:
- type: number
- reporter:
- type: object
- properties:
- username:
- type: string
- description: A friendly name for a given user account
- picture:
- nullable: true
- type: string
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with
- `icon:text` for the user's auto-generated
- icon
- example: "#f44336"
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users without
- an avatar
- labelClass:
- type: string
- target_readable:
+ label:
type: string
- datetimeISO:
+ description: A label for the added block
+ html:
type: string
- assignee:
+ description: HTML to render on the login page
+ styleName:
type: string
- nullable: true
- analytics:
- type: array
- items:
- type: number
- categories:
- type: object
- properties: {}
- additionalProperties:
- type: string
- description: All categories will be listed here, with the `cid` as the key, and the category name as the value
- hasFilter:
+ description: Custom identifier (value is added to `input[id]` and `label[for]`)
+ alternate_logins:
type: boolean
- filters:
- type: object
- properties:
- page:
- type: number
- perPage:
- type: number
- title:
- type: string
- - $ref: components/schemas/Pagination.yaml#/Pagination
- - $ref: components/schemas/CommonProps.yaml#/CommonProps
- "/api/flags/{flagId}":
- get:
- tags:
- - flags
- summary: /api/flags/{flagId}
- parameters:
- - name: flagId
- in: path
- required: true
- schema:
- type: string
- example: 1
- responses:
- "200":
- description: ""
- content:
- application/json:
- schema:
- allOf:
- - type: object
- properties:
- state:
- type: string
- flagId:
- type: number
- type:
- type: string
- targetId:
- type: number
- description:
- type: string
- uid:
- type: number
- description: A user identifier
- datetime:
- type: number
- datetimeISO:
- type: string
- target_readable:
- type: string
- target:
- type: object
- properties: {}
- additionalProperties:
- description: Properties change depending on the target type (user, post, etc.)
- assignee:
- type: number
- nullable: true
- filters:
- type: object
- properties:
- page:
- type: number
- perPage:
- type: number
- history:
+ authentication:
type: array
items:
type: object
properties:
- uid:
- type: number
- description: A user identifier
- fields:
- type: object
- properties:
- state:
- type: string
- datetime:
- type: number
- datetimeISO:
+ name:
type: string
- user:
- type: object
- properties:
- username:
- type: string
- description: A friendly name for a given user account
- userslug:
- type: string
- description: An URL-safe variant of the username (i.e. lower-cased, spaces
- removed, etc.)
- picture:
- nullable: true
- uid:
- type: number
- description: A user identifier
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users without
- an avatar
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with
- `icon:text` for the user's auto-generated
- icon
- example: "#f44336"
- notes:
- type: array
- items:
- type: object
- properties:
- uid:
- type: number
- content:
+ url:
type: string
- datetime:
- type: number
- datetimeISO:
+ callbackURL:
type: string
- user:
- type: object
- properties:
- username:
- type: string
- description: A friendly name for a given user account
- userslug:
- type: string
- description: An URL-safe variant of the username (i.e. lower-cased, spaces
- removed, etc.)
- picture:
- type: string
- uid:
- type: number
- description: A user identifier
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users without
- an avatar
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with
- `icon:text` for the user's auto-generated
- icon
- example: "#f44336"
- reporter:
- type: object
- properties:
- username:
- type: string
- description: A friendly name for a given user account
- userslug:
- type: string
- description: An URL-safe variant of the username (i.e. lower-cased, spaces
- removed, etc.)
- picture:
- nullable: true
- reputation:
- type: number
- uid:
- type: number
- description: A user identifier
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users without an
- avatar
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with `icon:text` for
- the user's auto-generated icon
- example: "#f44336"
- type_path:
- type: string
- assignees:
- type: array
- items:
- $ref: components/schemas/UserObject.yaml#/UserObject
- type_bool:
- type: object
- properties:
- post:
- type: boolean
- user:
- type: boolean
- empty:
- type: boolean
- title:
- type: string
- categories:
- type: object
- additionalProperties:
- type: string
- - $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/post-queue:
- get:
- tags:
- - admin
- summary: /api/post-queue
- responses:
- "200":
- description: ""
- content:
- application/json:
- schema:
- allOf:
- - type: object
- properties:
- title:
- type: string
- posts:
- type: array
- items:
- allOf:
- - type: object
- properties:
- id:
- type: string
- uid:
- type: number
- description: A user identifier
- type:
- type: string
- data:
- type: object
- properties:
- title:
- type: string
- content:
- type: string
- thumb:
- type: string
- cid:
- oneOf:
- - type: number
- - type: string
- tags:
- type: array
- items: {}
- uid:
- type: number
- description: A user identifier
- req:
- type: object
- properties:
- uid:
- type: number
- description: A user identifier
- ip:
- type: string
- host:
- type: string
- protocol:
- type: string
- secure:
- type: boolean
- url:
- type: string
- path:
- type: string
- headers:
- type: object
- properties:
- x-real-ip:
- type: string
- x-forwarded-for:
- type: string
- x-forwarded-proto:
- type: string
- host:
- type: string
- x-nginx-proxy:
- type: string
- connection:
- type: string
- accept:
- type: string
- user-agent:
- type: string
- sec-fetch-site:
- type: string
- sec-fetch-mode:
- type: string
- referer:
- type: string
- accept-encoding:
- type: string
- accept-language:
- type: string
- cookie:
- type: string
- timestamp:
- type: number
- fromQueue:
- type: boolean
- timestampISO:
- type: string
- description: An ISO 8601 formatted date string (complementing `timestamp`)
- rawContent:
- type: string
- tid:
- type: number
- description: A topic identifier
- toPid:
- nullable: true
- user:
- type: object
- properties:
- username:
- type: string
- description: A friendly name for a given user account
- userslug:
- type: string
- description: An URL-safe variant of the username (i.e. lower-cased, spaces
- removed, etc.)
- picture:
- nullable: true
- type: string
- uid:
- type: number
- description: A user identifier
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users without
- an avatar
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with
- `icon:text` for the user's auto-generated
- icon
- example: "#f44336"
- topic:
- type: object
- properties:
- cid:
- type: number
- title:
- type: string
- titleRaw:
- type: string
- - $ref: components/schemas/CategoryObject.yaml#/CategoryObject
- - $ref: components/schemas/Pagination.yaml#/Pagination
- - $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/ip-blacklist:
- get:
- tags:
- - admin
- summary: /api/ip-blacklist
- responses:
- "418":
- description: "TODO: A proper response needs to be added. It is not really a teapot | Copy response from corresponding admin route"
- /api/registration-queue:
- get:
- tags:
- - admin
- summary: /api/registration-queue
- responses:
- "418":
- description: "TODO: A proper response needs to be added. It is not really a teapot | Copy response from corresponding admin route"
- "/api/tags/{tag}":
+ icon:
+ type: string
+ scope:
+ type: string
+ prompt:
+ type: string
+ allowRegistration:
+ type: boolean
+ allowLoginWith:
+ type: string
+ title:
+ type: string
+ allowPasswordReset:
+ type: boolean
+ allowLocalLogin:
+ type: boolean
+ - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ /api/register:
get:
tags:
- - tags
- summary: /api/tags/{tag}
- description: Returns a list of topics that are tagged with {tag}
- parameters:
- - name: tag
- description: The tag used to retrieve the topics
- in: path
- required: true
- schema:
- type: string
- example: test
- - name: page
- description: Page number used in pagination
- in: query
- required: false
- schema:
- type: number
- example: ''
+ - authentication
+ summary: /api/register
responses:
"200":
description: ""
@@ -4796,259 +4495,239 @@ paths:
allOf:
- type: object
properties:
- topics:
+ register_window:spansize:
+ type: string
+ alternate_logins:
+ type: boolean
+ authentication:
type: array
- description: An array of topics that are all tagged with {tag}
items:
type: object
properties:
- tid:
- type: number
- description: A topic identifier
- uid:
- type: number
- description: A user identifier
- cid:
- type: number
- description: A category identifier
- mainPid:
- type: number
- description: The post id of the first post in this topic (also called the
- "original post")
- title:
+ name:
type: string
- slug:
+ url:
type: string
- timestamp:
- type: number
- lastposttime:
- type: number
- postcount:
- type: number
- viewcount:
- type: number
- teaserPid:
- oneOf:
- - type: number
- - type: string
- deleted:
- type: number
- locked:
- type: number
- pinned:
- type: number
- description: Whether or not this particular topic is pinned to the top of the
- category
- upvotes:
- type: number
- downvotes:
- type: number
- titleRaw:
+ callbackURL:
type: string
- timestampISO:
+ icon:
type: string
- description: An ISO 8601 formatted date string (complementing `timestamp`)
- lastposttimeISO:
+ scope:
type: string
- votes:
- type: number
- category:
- type: object
- properties:
- cid:
- type: number
- description: A category identifier
- name:
- type: string
- slug:
- type: string
- icon:
- type: string
- image:
- nullable: true
- imageClass:
- nullable: true
- type: string
- bgColor:
- type: string
- color:
- type: string
- disabled:
- type: number
- user:
- type: object
- properties:
- uid:
- type: number
- description: A user identifier
- username:
- type: string
- description: A friendly name for a given user account
- userslug:
- type: string
- description: An URL-safe variant of the username (i.e. lower-cased, spaces
- removed, etc.)
- reputation:
- type: number
- postcount:
- type: number
- picture:
- nullable: true
- type: string
- signature:
- nullable: true
- type: string
- banned:
- type: number
- status:
- type: string
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users without
- an avatar
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with
- `icon:text` for the user's auto-generated
- icon
- example: "#f44336"
- banned_until_readable:
- type: string
- fullname:
- type: string
- teaser:
- type: object
- properties:
- pid:
- type: number
- uid:
- type: number
- description: A user identifier
- timestamp:
- type: number
- tid:
- type: number
- description: A topic identifier
- content:
- type: string
- timestampISO:
- type: string
- description: An ISO 8601 formatted date string (complementing `timestamp`)
- user:
- type: object
- properties:
- uid:
- type: number
- description: A user identifier
- username:
- type: string
- description: A friendly name for a given user account
- userslug:
- type: string
- description: An URL-safe variant of the username (i.e. lower-cased, spaces
- removed, etc.)
- picture:
- nullable: true
- type: string
- icon:text:
- type: string
- description: A single-letter representation of a username. This is used in the
- auto-generated icon given to users
- without an avatar
- icon:bgColor:
- type: string
- description: A six-character hexadecimal colour code assigned to the user. This
- value is used in conjunction with
- `icon:text` for the user's
- auto-generated icon
- example: "#f44336"
- index:
- type: number
- tags:
- type: array
- items:
- type: object
- properties:
- value:
- type: string
- valueEscaped:
- type: string
- color:
- type: string
- bgColor:
- type: string
- score:
- type: number
- isOwner:
- type: boolean
- ignored:
- type: boolean
- unread:
- type: boolean
- bookmark:
- nullable: true
- unreplied:
- type: boolean
- icons:
- type: array
- items: {}
- index:
- type: number
- thumb:
+ prompt:
+ type: string
+ minimumUsernameLength:
+ type: number
+ maximumUsernameLength:
+ type: number
+ minimumPasswordLength:
+ type: number
+ minimumPasswordStrength:
+ type: number
+ regFormEntry:
+ type: array
+ items:
+ type: object
+ properties:
+ label:
+ type: string
+ html:
+ type: string
+ styleName:
type: string
- isQuestion:
- nullable: true
- type: number
- isSolved:
- type: number
- tag:
- type: string
title:
type: string
+ - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ # /api/register/complete:
+ # get:
+ # tags:
+ # - authentication
+ # summary: /api/register/complete
+ # responses:
+ # "200":
+ # description: ""
+ # content:
+ # application/json:
+ # schema:
+ # allOf:
+ # - type: object
+ # properties:
+ # title:
+ # type: string
+ # errors:
+ # type: array
+ # items: {}
+ # sections:
+ # type: array
+ # items:
+ # type: string
+ # - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ /api/search:
+ get:
+ tags:
+ - search
+ summary: /api/search
+ responses:
+ "200":
+ description: ""
+ content:
+ application/json:
+ schema:
+ allOf:
+ - type: object
+ properties:
+ posts:
+ $ref: components/schemas/PostsObject.yaml#/PostsObject
+ matchCount:
+ type: number
+ pageCount:
+ type: number
+ time:
+ type: string
+ multiplePages:
+ type: boolean
+ search_query:
+ type: string
+ term:
+ type: string
categories:
type: array
items:
type: object
properties:
- cid:
- type: number
- description: A category identifier
- name:
- type: string
- level:
- type: string
- icon:
- type: string
- parentCid:
- type: number
- description: The category identifier for the category that is the immediate
- ancestor of the current category
- color:
- type: string
- bgColor:
- type: string
- selected:
- type: boolean
- imageClass:
+ value:
+ oneOf:
+ - type: string
+ - type: number
+ text:
type: string
- rssFeedUrl:
+ categoriesCount:
+ type: number
+ expandSearch:
+ type: boolean
+ showAsPosts:
+ type: boolean
+ showAsTopics:
+ type: boolean
+ title:
+ type: string
+ searchDefaultSortBy:
type: string
required:
- - topics
- - tag
- - title
+ - posts
+ - matchCount
+ - pageCount
+ - time
+ - multiplePages
+ - search_query
- categories
+ - categoriesCount
+ - expandSearch
+ - showAsPosts
+ - showAsTopics
+ - title
+ - searchDefaultSortBy
- $ref: components/schemas/Pagination.yaml#/Pagination
- $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/tags:
+ "/api/reset":
get:
tags:
- - tags
- summary: /api/tags
- description: Returns a list of tags sorted by the most topics
+ - authentication
+ summary: Get user password reset (step 1)
+ responses:
+ "200":
+ description: "A JSON object containing the 1st step of the user password reset flow"
+ content:
+ application/json:
+ schema:
+ allOf:
+ - type: object
+ properties:
+ code:
+ type: string
+ nullable: true
+ title:
+ type: string
+ - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ "/api/reset/{code}":
+ get:
+ tags:
+ - authentication
+ summary: Get user password reset (step 2)
+ parameters:
+ - name: code
+ in: path
+ required: true
+ schema:
+ type: string
+ example: testCode
+ responses:
+ "200":
+ description: "A JSON object containing the 2nd step of the user password reset flow"
+ content:
+ application/json:
+ schema:
+ allOf:
+ - type: object
+ properties:
+ valid:
+ type: boolean
+ code:
+ type: string
+ minimumPasswordLength:
+ type: number
+ minimumPasswordStrength:
+ type: number
+ title:
+ type: string
+ - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ "/api/email/unsubscribe/{token}":
+ # TODO: Need GET route here as well
+ post:
+ tags:
+ - emails
+ summary: /api/email/unsubscribe/{token}
+ parameters:
+ - name: token
+ in: path
+ required: true
+ schema:
+ type: string
+ example: testToken
+ responses:
+ "200":
+ description: "Successfully unsubscribed"
+ "500":
+ description: "Server-side error (likely token verification failure)"
+ "/api/post/{pid}":
+ get:
+ tags:
+ - shorthand
+ summary: Access a specific post
+ description: This route comes in handy when all you have is the `pid`, and you want to redirect users to the canonical URL for the topic, with the appropriate topic slug and post index.
+ parameters:
+ - name: pid
+ in: path
+ required: true
+ schema:
+ type: string
+ example: 1
+ responses:
+ "200":
+ description: "Canonical URL of topic"
+ content:
+ text/plain:
+ schema:
+ type: string
+ /api/flags:
+ get:
+ tags:
+ - flags
+ summary: /api/flags
responses:
"200":
description: ""
@@ -5058,454 +4737,470 @@ paths:
allOf:
- type: object
properties:
- tags:
+ flags:
type: array
- description: An array of tags sorted by the most topics
items:
type: object
properties:
- value:
+ state:
type: string
- description: The raw tag
- score:
+ flagId:
type: number
- description: Number of topics tagged by this tag
- valueEscaped:
+ type:
+ type: string
+ targetId:
+ oneOf:
+ - type: string
+ - type: number
+ description:
+ type: string
+ uid:
+ type: number
+ description: A user identifier
+ datetime:
+ type: number
+ reporter:
+ type: object
+ properties:
+ username:
+ type: string
+ description: A friendly name for a given user account
+ picture:
+ nullable: true
+ type: string
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with
+ `icon:text` for the user's auto-generated
+ icon
+ example: "#f44336"
+ icon:text:
+ type: string
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users without
+ an avatar
+ labelClass:
type: string
- description: This is the escaped tag value, equal to validator.escape(value)
- color:
+ target_readable:
type: string
- bgColor:
+ datetimeISO:
type: string
- displayTagSearch:
+ assignee:
+ type: string
+ nullable: true
+ analytics:
+ type: array
+ items:
+ type: number
+ categories:
+ type: object
+ properties: {}
+ additionalProperties:
+ type: string
+ description: All categories will be listed here, with the `cid` as the key, and the category name as the value
+ hasFilter:
type: boolean
- nextStart:
- type: number
+ filters:
+ type: object
+ properties:
+ page:
+ type: number
+ perPage:
+ type: number
title:
type: string
- - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/Pagination.yaml#/Pagination
- $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/popular:
+ "/api/flags/{flagId}":
get:
tags:
- - topics
- summary: Get Popular Topics
- description: Returns a list of topics sorted by most replies. In an event of a
- tie breaker, the topic with the most views. Can be filtered by All Time,
- Day, Week, or Month.
+ - flags
+ summary: /api/flags/{flagId}
+ parameters:
+ - name: flagId
+ in: path
+ required: true
+ schema:
+ type: string
+ example: 1
responses:
"200":
- description: An array of topic objects sorted by most replies and views.
+ description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
- nextStart:
+ state:
+ type: string
+ flagId:
type: number
- topicCount:
+ type:
+ type: string
+ targetId:
type: number
- topics:
- type: array
- items:
- $ref: components/schemas/TopicObject.yaml#/TopicObject
- tids:
- type: array
- items:
- type: number
- canPost:
- type: boolean
- categories:
+ description:
+ type: string
+ uid:
+ type: number
+ description: A user identifier
+ datetime:
+ type: number
+ datetimeISO:
+ type: string
+ target_readable:
+ type: string
+ target:
+ type: object
+ properties: {}
+ additionalProperties:
+ description: Properties change depending on the target type (user, post, etc.)
+ assignee:
+ type: number
+ nullable: true
+ filters:
+ type: object
+ properties:
+ page:
+ type: number
+ perPage:
+ type: number
+ history:
type: array
items:
type: object
properties:
- cid:
+ uid:
type: number
- description: A category identifier
- name:
- type: string
- level:
- type: string
- icon:
- type: string
- parentCid:
+ description: A user identifier
+ fields:
+ type: object
+ properties:
+ state:
+ type: string
+ datetime:
type: number
- description: The category identifier for the category that is the immediate
- ancestor of the current category
- color:
- type: string
- bgColor:
- type: string
- selected:
- type: boolean
- imageClass:
+ datetimeISO:
type: string
- allCategoriesUrl:
- type: string
- selectedCategory:
- type: object
- properties:
- icon:
- type: string
- name:
- type: string
- bgColor:
- type: string
- nullable: true
- selectedCids:
- type: array
- items:
- type: number
- feeds:disableRSS:
- type: number
- rssFeedUrl:
- type: string
- title:
- type: string
- filters:
+ user:
+ type: object
+ properties:
+ username:
+ type: string
+ description: A friendly name for a given user account
+ userslug:
+ type: string
+ description: An URL-safe variant of the username (i.e. lower-cased, spaces
+ removed, etc.)
+ picture:
+ nullable: true
+ uid:
+ type: number
+ description: A user identifier
+ icon:text:
+ type: string
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users without
+ an avatar
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with
+ `icon:text` for the user's auto-generated
+ icon
+ example: "#f44336"
+ notes:
type: array
items:
type: object
properties:
- name:
- type: string
- url:
+ uid:
+ type: number
+ content:
type: string
- selected:
- type: boolean
- filter:
+ datetime:
+ type: number
+ datetimeISO:
type: string
- selectedFilter:
+ user:
+ type: object
+ properties:
+ username:
+ type: string
+ description: A friendly name for a given user account
+ userslug:
+ type: string
+ description: An URL-safe variant of the username (i.e. lower-cased, spaces
+ removed, etc.)
+ picture:
+ type: string
+ uid:
+ type: number
+ description: A user identifier
+ icon:text:
+ type: string
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users without
+ an avatar
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with
+ `icon:text` for the user's auto-generated
+ icon
+ example: "#f44336"
+ reporter:
type: object
properties:
- name:
+ username:
type: string
- url:
+ description: A friendly name for a given user account
+ userslug:
type: string
- selected:
- type: boolean
- filter:
+ description: An URL-safe variant of the username (i.e. lower-cased, spaces
+ removed, etc.)
+ picture:
+ nullable: true
+ reputation:
+ type: number
+ uid:
+ type: number
+ description: A user identifier
+ icon:text:
type: string
- terms:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- term:
- type: string
- selectedTerm:
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users without an
+ avatar
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with `icon:text` for
+ the user's auto-generated icon
+ example: "#f44336"
+ type_path:
+ type: string
+ assignees:
+ type: array
+ items:
+ $ref: components/schemas/UserObject.yaml#/UserObject
+ type_bool:
type: object
properties:
- name:
- type: string
- url:
- type: string
- selected:
+ post:
type: boolean
- term:
- type: string
- - $ref: components/schemas/Pagination.yaml#/Pagination
- - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ user:
+ type: boolean
+ empty:
+ type: boolean
+ title:
+ type: string
+ categories:
+ type: object
+ additionalProperties:
+ type: string
- $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/recent:
+ /api/post-queue:
get:
tags:
- - topics
- summary: Recent Topics
- description: Returns a list of topics sorted by timestamp.
+ - admin
+ summary: /api/post-queue
responses:
"200":
- description: An array of topic objects sorted by timestamp.
+ description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
- nextStart:
- type: number
- topicCount:
- type: number
- topics:
- type: array
- items:
- $ref: components/schemas/TopicObject.yaml#/TopicObject
- tids:
- type: array
- items:
- type: number
- canPost:
- type: boolean
- categories:
- type: array
- items:
- type: object
- properties:
- cid:
- type: number
- description: A category identifier
- name:
- type: string
- level:
- type: string
- icon:
- type: string
- parentCid:
- type: number
- description: The category identifier for the category that is the immediate
- ancestor of the current category
- color:
- type: string
- bgColor:
- type: string
- selected:
- type: boolean
- imageClass:
- type: string
- allCategoriesUrl:
- type: string
- selectedCategory:
- type: object
- properties:
- icon:
- type: string
- name:
- type: string
- bgColor:
- type: string
- nullable: true
- selectedCids:
- type: array
- items:
- type: number
- feeds:disableRSS:
- type: number
- rssFeedUrl:
- type: string
title:
type: string
- filters:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- filter:
- type: string
- selectedFilter:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- filter:
- type: string
- terms:
+ posts:
type: array
items:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- term:
- type: string
- selectedTerm:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- term:
- type: string
+ allOf:
+ - type: object
+ properties:
+ id:
+ type: string
+ uid:
+ type: number
+ description: A user identifier
+ type:
+ type: string
+ data:
+ type: object
+ properties:
+ title:
+ type: string
+ content:
+ type: string
+ thumb:
+ type: string
+ cid:
+ oneOf:
+ - type: number
+ - type: string
+ tags:
+ type: array
+ items: {}
+ uid:
+ type: number
+ description: A user identifier
+ req:
+ type: object
+ properties:
+ uid:
+ type: number
+ description: A user identifier
+ ip:
+ type: string
+ host:
+ type: string
+ protocol:
+ type: string
+ secure:
+ type: boolean
+ url:
+ type: string
+ path:
+ type: string
+ headers:
+ type: object
+ properties:
+ x-real-ip:
+ type: string
+ x-forwarded-for:
+ type: string
+ x-forwarded-proto:
+ type: string
+ host:
+ type: string
+ x-nginx-proxy:
+ type: string
+ connection:
+ type: string
+ accept:
+ type: string
+ user-agent:
+ type: string
+ sec-fetch-site:
+ type: string
+ sec-fetch-mode:
+ type: string
+ referer:
+ type: string
+ accept-encoding:
+ type: string
+ accept-language:
+ type: string
+ cookie:
+ type: string
+ timestamp:
+ type: number
+ fromQueue:
+ type: boolean
+ timestampISO:
+ type: string
+ description: An ISO 8601 formatted date string (complementing `timestamp`)
+ rawContent:
+ type: string
+ tid:
+ type: number
+ description: A topic identifier
+ toPid:
+ nullable: true
+ user:
+ type: object
+ properties:
+ username:
+ type: string
+ description: A friendly name for a given user account
+ userslug:
+ type: string
+ description: An URL-safe variant of the username (i.e. lower-cased, spaces
+ removed, etc.)
+ picture:
+ nullable: true
+ type: string
+ uid:
+ type: number
+ description: A user identifier
+ icon:text:
+ type: string
+ description: A single-letter representation of a username. This is used in the
+ auto-generated icon given to users without
+ an avatar
+ icon:bgColor:
+ type: string
+ description: A six-character hexadecimal colour code assigned to the user. This
+ value is used in conjunction with
+ `icon:text` for the user's auto-generated
+ icon
+ example: "#f44336"
+ topic:
+ type: object
+ properties:
+ cid:
+ type: number
+ title:
+ type: string
+ titleRaw:
+ type: string
+ - $ref: components/schemas/CategoryObject.yaml#/CategoryObject
- $ref: components/schemas/Pagination.yaml#/Pagination
- - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/top:
+ /api/ip-blacklist:
get:
tags:
- - topics
- summary: Top Topics
- description: Returns a list of topics sorted by most upvotes.
+ - admin
+ summary: /api/ip-blacklist
responses:
- "200":
- description: An array of topic objects sorted by most upvotes.
- content:
- application/json:
- schema:
- allOf:
- - type: object
- properties:
- nextStart:
- type: number
- topicCount:
- type: number
- topics:
- type: array
- items:
- $ref: components/schemas/TopicObject.yaml#/TopicObject
- tids:
- type: array
- items:
- type: number
- canPost:
- type: boolean
- categories:
- type: array
- items:
- type: object
- properties:
- cid:
- type: number
- description: A category identifier
- name:
- type: string
- level:
- type: string
- icon:
- type: string
- parentCid:
- type: number
- description: The category identifier for the category that is the immediate
- ancestor of the current category
- color:
- type: string
- bgColor:
- type: string
- selected:
- type: boolean
- imageClass:
- type: string
- allCategoriesUrl:
- type: string
- selectedCategory:
- type: object
- properties:
- cid:
- type: number
- description: A category identifier
- name:
- type: string
- level:
- type: string
- icon:
- type: string
- parentCid:
- type: number
- description: The category identifier for the category that is the immediate
- ancestor of the current category
- color:
- type: string
- bgColor:
- type: string
- selected:
- type: boolean
- nullable: true
- selectedCids:
- type: array
- items:
- type: number
- feeds:disableRSS:
- type: number
- rssFeedUrl:
- type: string
- title:
- type: string
- filters:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- filter:
- type: string
- selectedFilter:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- filter:
- type: string
- terms:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- term:
- type: string
- selectedTerm:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- selected:
- type: boolean
- term:
- type: string
- - $ref: components/schemas/Pagination.yaml#/Pagination
- - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- - $ref: components/schemas/CommonProps.yaml#/CommonProps
- /api/unread:
+ "418":
+ description: "TODO: A proper response needs to be added. It is not really a teapot | Copy response from corresponding admin route"
+ /api/registration-queue:
get:
tags:
- - topics
- summary: Unread Topics
- description: Returns a list of the current user's unread topics, sorted by the
- last post's timestamp.
+ - admin
+ summary: /api/registration-queue
+ responses:
+ "418":
+ description: "TODO: A proper response needs to be added. It is not really a teapot | Copy response from corresponding admin route"
+ "/api/tags/{tag}":
+ get:
+ tags:
+ - tags
+ summary: /api/tags/{tag}
+ description: Returns a list of topics that are tagged with {tag}
+ parameters:
+ - name: tag
+ description: The tag used to retrieve the topics
+ in: path
+ required: true
+ schema:
+ type: string
+ example: test
+ - name: page
+ description: Page number used in pagination
+ in: query
+ required: false
+ schema:
+ type: number
+ example: ''
responses:
"200":
- description: An array of unread topic objects sorted by the last post's timestamp.
+ description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
- showSelect:
- type: boolean
- nextStart:
- type: number
topics:
type: array
+ description: An array of topics that are all tagged with {tag}
items:
type: object
properties:
@@ -5535,11 +5230,9 @@ paths:
viewcount:
type: number
teaserPid:
- type: number
- upvotes:
- type: number
- downvotes:
- type: number
+ oneOf:
+ - type: number
+ - type: string
deleted:
type: number
locked:
@@ -5548,6 +5241,10 @@ paths:
type: number
description: Whether or not this particular topic is pinned to the top of the
category
+ upvotes:
+ type: number
+ downvotes:
+ type: number
titleRaw:
type: string
timestampISO:
@@ -5589,8 +5286,6 @@ paths:
username:
type: string
description: A friendly name for a given user account
- fullname:
- type: string
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
@@ -5623,6 +5318,8 @@ paths:
example: "#f44336"
banned_until_readable:
type: string
+ fullname:
+ type: string
teaser:
type: object
properties:
@@ -5698,18 +5395,257 @@ paths:
type: boolean
icons:
type: array
- items:
- type: string
+ items: {}
index:
type: number
- isQuestion:
- nullable: true
+ thumb:
+ type: string
+ isQuestion:
+ nullable: true
+ type: number
+ isSolved:
+ type: number
+ tag:
+ type: string
+ title:
+ type: string
+ categories:
+ type: array
+ items:
+ type: object
+ properties:
+ cid:
+ type: number
+ description: A category identifier
+ name:
+ type: string
+ level:
+ type: string
+ icon:
+ type: string
+ parentCid:
+ type: number
+ description: The category identifier for the category that is the immediate
+ ancestor of the current category
+ color:
+ type: string
+ bgColor:
+ type: string
+ selected:
+ type: boolean
+ imageClass:
+ type: string
+ rssFeedUrl:
+ type: string
+ required:
+ - topics
+ - tag
+ - title
+ - categories
+ - $ref: components/schemas/Pagination.yaml#/Pagination
+ - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ /api/tags:
+ get:
+ tags:
+ - tags
+ summary: /api/tags
+ description: Returns a list of tags sorted by the most topics
+ responses:
+ "200":
+ description: ""
+ content:
+ application/json:
+ schema:
+ allOf:
+ - type: object
+ properties:
+ tags:
+ type: array
+ description: An array of tags sorted by the most topics
+ items:
+ type: object
+ properties:
+ value:
+ type: string
+ description: The raw tag
+ score:
+ type: number
+ description: Number of topics tagged by this tag
+ valueEscaped:
+ type: string
+ description: This is the escaped tag value, equal to validator.escape(value)
+ color:
+ type: string
+ bgColor:
+ type: string
+ displayTagSearch:
+ type: boolean
+ nextStart:
+ type: number
+ title:
+ type: string
+ - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ /api/popular:
+ get:
+ tags:
+ - topics
+ summary: Get popular topics
+ description: Returns a list of topics sorted by most replies. In an event of a
+ tie breaker, the topic with the most views. Can be filtered by All Time,
+ Day, Week, or Month.
+ responses:
+ "200":
+ description: An array of topic objects sorted by most replies and views.
+ content:
+ application/json:
+ schema:
+ allOf:
+ - type: object
+ properties:
+ nextStart:
+ type: number
topicCount:
type: number
+ topics:
+ type: array
+ items:
+ $ref: components/schemas/TopicObject.yaml#/TopicObject
+ tids:
+ type: array
+ items:
+ type: number
+ canPost:
+ type: boolean
+ categories:
+ type: array
+ items:
+ type: object
+ properties:
+ cid:
+ type: number
+ description: A category identifier
+ name:
+ type: string
+ level:
+ type: string
+ icon:
+ type: string
+ parentCid:
+ type: number
+ description: The category identifier for the category that is the immediate
+ ancestor of the current category
+ color:
+ type: string
+ bgColor:
+ type: string
+ selected:
+ type: boolean
+ imageClass:
+ type: string
+ allCategoriesUrl:
+ type: string
+ selectedCategory:
+ type: object
+ properties:
+ icon:
+ type: string
+ name:
+ type: string
+ bgColor:
+ type: string
+ nullable: true
+ selectedCids:
+ type: array
+ items:
+ type: number
+ feeds:disableRSS:
+ type: number
+ rssFeedUrl:
+ type: string
title:
type: string
- pageCount:
+ filters:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ filter:
+ type: string
+ selectedFilter:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ filter:
+ type: string
+ terms:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ term:
+ type: string
+ selectedTerm:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ term:
+ type: string
+ - $ref: components/schemas/Pagination.yaml#/Pagination
+ - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: components/schemas/CommonProps.yaml#/CommonProps
+ /api/top:
+ get:
+ tags:
+ - topics
+ summary: Get top topics
+ description: Returns a list of topics sorted by most upvotes.
+ responses:
+ "200":
+ description: An array of topic objects sorted by most upvotes.
+ content:
+ application/json:
+ schema:
+ allOf:
+ - type: object
+ properties:
+ nextStart:
+ type: number
+ topicCount:
type: number
+ topics:
+ type: array
+ items:
+ $ref: components/schemas/TopicObject.yaml#/TopicObject
+ tids:
+ type: array
+ items:
+ type: number
+ canPost:
+ type: boolean
categories:
type: array
items:
@@ -5738,10 +5674,39 @@ paths:
type: string
allCategoriesUrl:
type: string
+ selectedCategory:
+ type: object
+ properties:
+ cid:
+ type: number
+ description: A category identifier
+ name:
+ type: string
+ level:
+ type: string
+ icon:
+ type: string
+ parentCid:
+ type: number
+ description: The category identifier for the category that is the immediate
+ ancestor of the current category
+ color:
+ type: string
+ bgColor:
+ type: string
+ selected:
+ type: boolean
+ nullable: true
selectedCids:
type: array
items:
type: number
+ feeds:disableRSS:
+ type: number
+ rssFeedUrl:
+ type: string
+ title:
+ type: string
filters:
type: array
items:
@@ -5766,6 +5731,30 @@ paths:
type: boolean
filter:
type: string
+ terms:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ term:
+ type: string
+ selectedTerm:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ selected:
+ type: boolean
+ term:
+ type: string
- $ref: components/schemas/Pagination.yaml#/Pagination
- $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: components/schemas/CommonProps.yaml#/CommonProps
@@ -5773,7 +5762,8 @@ paths:
get:
tags:
- categories
- summary: /api/category/{category_id}/{slug}/{topic_index}
+ summary: Get a single category
+ description: This route retrieves a single category's data, along with its children and the topics created inside of the category.
parameters:
- name: category_id
in: path
@@ -5782,12 +5772,14 @@ paths:
type: string
example: 1
- name: slug
+ description: This parameter is not required. If omitted, the request will be automatically redirected with the proper category slug.
in: path
required: true
schema:
type: string
example: test
- name: topic_index
+ description: This parameter is not required. If omitted, the request will presume that you want the first post. The API response is largely unaffected by this parameter, it is used client-side (to send the user to the requested post), and changes the meta/link tags in the server-side generated HTML.
in: path
required: true
schema:
@@ -6248,7 +6240,7 @@ paths:
get:
tags:
- users
- summary: /api/user/{userslug}/posts
+ summary: Get a user's posts
parameters:
- name: userslug
in: path
@@ -6294,7 +6286,7 @@ paths:
get:
tags:
- users
- summary: /api/user/{userslug}/topics
+ summary: Get a user's topics
parameters:
- name: userslug
in: path
@@ -6342,7 +6334,7 @@ paths:
get:
tags:
- users
- summary: /api/user/{userslug}/best
+ summary: Get a user's best performing topics
parameters:
- name: userslug
in: path
@@ -6388,7 +6380,7 @@ paths:
get:
tags:
- users
- summary: /api/user/{userslug}/groups
+ summary: Get user's groups
parameters:
- name: userslug
in: path