feat(openapi): refactor into indiv. files to match API & tpl routing

This commit is contained in:
psychobunny
2020-09-29 11:49:17 -04:00
parent 9c5b690799
commit 84f5e4cf3d
119 changed files with 7934 additions and 8224 deletions

View File

@@ -0,0 +1,91 @@
get:
tags:
- admin
summary: Get system cache info
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
postCache:
type: object
properties:
length:
type: number
max:
type: number
nullable: true
itemCount:
type: number
percentFull:
type: number
avgPostSize:
type: number
hits:
type: string
misses:
type: string
hitRatio:
type: string
groupCache:
type: object
properties:
length:
type: number
max:
type: number
itemCount:
type: number
percentFull:
type: number
hits:
type: string
misses:
type: string
hitRatio:
type: string
localCache:
type: object
properties:
length:
type: number
max:
type: number
itemCount:
type: number
percentFull:
type: number
dump:
type: boolean
hits:
type: string
misses:
type: string
hitRatio:
type: string
objectCache:
type: object
properties:
length:
type: number
max:
type: number
itemCount:
type: number
percentFull:
type: number
hits:
type: string
misses:
type: string
hitRatio:
type: string
required:
- postCache
- groupCache
- localCache
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,14 @@
get:
tags:
- admin
summary: Get database information
responses:
"200":
description: "A JSON object with database status information"
content:
application/json:
schema:
properties: {}
additionalProperties:
type: object
description: Each database configured will have an entry here with information about its runtime status

View File

@@ -0,0 +1,38 @@
get:
tags:
- admin
summary: Get server-side errors
responses:
"200":
description: "A JSON object containing server-side errors"
content:
application/json:
schema:
allOf:
- type: object
properties:
not-found:
type: array
items:
type: object
properties:
value:
type: string
description: Path to the requested URL that returned a 404
score:
type: number
description: The number of times that URL was requested
analytics:
type: object
properties:
not-found:
type: array
description: 404 responses groups by day, from 6 days ago, to present day
items:
type: number
toobusy:
type: array
description: 503 responses groups by day, from 6 days ago, to present day
items:
type: number
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,12 @@
get:
tags:
- admin
summary: Export errors (.csv)
responses:
"200":
description: "A CSV file containing server-side errors"
content:
text/csv:
schema:
type: string
format: binary

View File

@@ -0,0 +1,65 @@
get:
tags:
- admin
summary: Get event log
parameters:
- in: query
name: type
schema:
type: string
description: Event name to filter by
example: config-change
- in: query
name: start
schema:
type: string
description: Start date to filter by
example: ''
- in: query
name: end
schema:
type: string
description: End date to filter by
example: ''
- in: query
name: perPage
schema:
type: string
description: Limit the number of events returned per page
example: 20
responses:
"200":
description: "A JSON object containing "
content:
application/json:
schema:
allOf:
- type: object
properties:
events:
type: array
items:
type: object
properties:
type:
type: string
additionalProperties:
description: Each individual event as added by core/plugins can append their own metadata related to the event
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- type: object
properties:
types:
type: array
items:
type: object
properties:
value:
type: string
name:
type: string
selected:
type: boolean
query:
additionalProperties:
description: An object containing the query string parameters, if any
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,45 @@
get:
tags:
- admin
summary: Get active plugin hooks
responses:
"200":
description: "A JSON object containing all hooks with active listeners"
content:
application/json:
schema:
allOf:
- type: object
properties:
hooks:
type: array
items:
type: object
properties:
hookName:
type: string
description: The name of the hook (also the name used in code)
methods:
type: array
items:
type: object
properties:
id:
type: string
description: Plugin listening to this hook
priority:
type: number
description: Priority level, lower priorities are executed earlier
method:
type: string
description: Stringified method for examination
index:
type: string
description: Internal counter used for DOM element ids
index:
type: string
description: Internal counter used for DOM element ids
count:
type: number
description: The number of listeners subscribed to this hook
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,17 @@
get:
tags:
- admin
summary: Get server-side log output
responses:
"200":
description: "A JSON object containing the server-side log"
content:
application/json:
schema:
allOf:
- type: object
properties:
data:
type: string
description: Output of the server-side log file
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,58 @@
get:
tags:
- admin
summary: Get site analytics
parameters:
- in: query
name: units
schema:
type: string
enum: [hours, days]
description: Whether to display dashboard data segmented daily or hourly
example: days
- in: query
name: until
schema:
type: number
description: A UNIX timestamp denoting the end of the analytics reporting period
example: ''
- in: query
name: count
schema:
type: number
description: The number of entries to return (e.g. if `units` is `hourly`, and `count` is `24`, the result set will contain 24 hours' worth of analytics)
example: 20
responses:
"200":
description: "A JSON object containing analytics data"
content:
application/json:
schema:
type: object
properties:
query:
additionalProperties:
description: The query string passed in
result:
type: object
properties:
uniquevisitors:
type: array
items:
type: number
pageviews:
type: array
items:
type: number
pageviews:registered:
type: array
items:
type: number
pageviews:bot:
type: array
items:
type: number
pageviews:guest:
type: array
items:
type: number

View File

@@ -0,0 +1,18 @@
get:
tags:
- admin
summary: Get appearance settings
parameters:
- name: term
in: path
required: true
schema:
type: string
example: themes
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: ../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,37 @@
post:
tags:
- admin
summary: Update category picture (via image upload)
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
cid:
type: number
description: Category identifier whose picture will be set after successful upload
example: 1
files:
type: array
items:
type: string
format: binary
required:
- cid
- 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

View File

@@ -0,0 +1,96 @@
get:
tags:
- admin
summary: Get administrative dashboard
responses:
"200":
description: A JSON object containing dashboard data
content:
application/json:
schema:
allOf:
- type: object
properties:
version:
type: string
lookupFailed:
type: boolean
latestVersion:
type: string
nullable: true
upgradeAvailable:
type: boolean
nullable: true
currentPrerelease:
type: boolean
notices:
type: array
items:
type: object
properties:
done:
type: boolean
doneText:
type: string
notDoneText:
type: string
tooltip:
type: string
link:
type: string
required:
- done
stats:
type: array
items:
type: object
properties:
yesterday:
type: number
today:
type: number
lastweek:
type: number
thisweek:
type: number
lastmonth:
type: number
thismonth:
type: number
alltime:
type: number
dayIncrease:
type: string
dayTextClass:
type: string
weekIncrease:
type: string
weekTextClass:
type: string
monthIncrease:
type: string
monthTextClass:
type: string
name:
type: string
canRestart:
type: boolean
lastrestart:
nullable: true
type: object
properties:
uid:
type: number
description: A user identifier
ip:
type: string
timestamp:
type: number
user:
$ref: ../../components/schemas/UserObject.yaml#/UserObject
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
showSystemControls:
type: boolean
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,160 @@
get:
tags:
- admin
summary: Get process/system information
responses:
"200":
description: "A JSON object containing process and system information"
content:
application/json:
schema:
allOf:
- type: object
properties:
info:
type: array
items:
type: object
properties:
process:
type: object
properties:
port:
description: An array containing the port numbers configured to be used by NodeBB processes
oneOf:
- type: array
items:
oneOf:
- type: string
- type: number
- type: string
- type: number
pid:
type: number
description: Process id
title:
type: number
description: Executable
version:
type: number
description: NodeBB version
memoryUsage:
type: object
properties:
rss:
type: number
heapTotal:
type: number
heapUsed:
type: number
external:
type: number
arrayBuffers:
type: number
humanReadable:
type: number
required:
- rss
- heapTotal
- heapUsed
- external
- humanReadable
uptime:
type: number
cpuUsage:
type: object
properties:
user:
type: string
system:
type: string
os:
type: object
properties:
hostname:
type: string
type:
type: string
platform:
type: string
arch:
type: string
release:
type: string
load:
type: string
description: CPU load
nodebb:
type: object
properties:
isPrimary:
type: boolean
isCluster:
type: boolean
runJobs:
type: boolean
jobsDisabled:
type: boolean
git:
type: object
properties:
hash:
type: string
hashShort:
type: string
branch:
type: string
stats:
type: object
properties:
onlineGuestCount:
type: number
onlineRegisteredCount:
type: number
socketCount:
type: number
users:
type: object
properties:
categories:
type: number
recent:
type: number
unread:
type: number
topics:
type: number
category:
type: number
topics:
type: array
id:
type: string
infoJSON:
type: string
description: "`info`, but stringified"
host:
type: string
description: Server hostname
port:
description: An array containing the port numbers configured to be used by NodeBB processes
oneOf:
- type: array
items:
oneOf:
- type: string
- type: number
- type: string
- type: number
nodeCount:
type: number
description: The number of NodeBB application processes currently running
timeout:
type: number
ip:
type: string
loggedIn:
type: boolean
relative_path:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,11 @@
get:
tags:
- admin
summary: Get system logger settings
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,204 @@
get:
tags:
- admin
summary: Get system plugin settings
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
installed:
type: array
items:
type: object
properties:
latest:
type: string
description:
type: string
name:
type: string
updated:
type: string
url:
type: string
numInstalls:
type: number
isCompatible:
type: boolean
id:
type: string
installed:
type: boolean
active:
type: boolean
isTheme:
type: boolean
error:
type: boolean
version:
type: string
license:
type: object
properties:
name:
type: string
text:
type: string
nullable: true
outdated:
type: boolean
settingsRoute:
type: string
required:
- latest
- description
- name
- id
- installed
- active
- isTheme
- error
- version
- license
- outdated
installedCount:
type: number
activeCount:
type: number
inactiveCount:
type: number
upgradeCount:
type: number
download:
type: array
items:
type: object
properties:
name:
type: string
updated:
type: string
description:
type: string
latest:
type: string
url:
type: string
numInstalls:
type: number
isCompatible:
type: boolean
id:
type: string
installed:
type: boolean
active:
type: boolean
required:
- name
- updated
- latest
- url
- numInstalls
- isCompatible
- id
- installed
- active
incompatible:
type: array
items:
type: object
properties:
latest:
type: string
description:
type: string
name:
type: string
updated:
type: string
url:
type: string
numInstalls:
type: number
isCompatible:
type: boolean
id:
type: string
installed:
type: boolean
active:
type: boolean
required:
- name
- updated
- latest
- url
- numInstalls
- isCompatible
- id
- installed
- active
trending:
type: array
items:
type: object
properties:
latest:
type: string
description:
type: string
name:
type: string
updated:
type: string
url:
type: string
numInstalls:
type: number
isCompatible:
type: boolean
id:
type: string
installed:
type: boolean
active:
type: boolean
isTheme:
type: boolean
error:
type: boolean
version:
type: string
license:
type: object
properties:
name:
type: string
text:
type: string
nullable: true
outdated:
type: boolean
settingsRoute:
type: string
downloads:
type: number
required:
- latest
- description
- name
- id
- installed
- active
- downloads
submitPluginUsage:
type: number
version:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,85 @@
get:
tags:
- admin
summary: Get rewards settings
responses:
"200":
description: "A JSON object containing rewards and their settings"
content:
application/json:
schema:
allOf:
- type: object
properties:
active:
type: array
items:
type: object
properties:
condition:
type: string
conditional:
type: string
value:
type: number
rid:
type: string
claimable:
type: string
id:
type: string
disabled:
type: boolean
rewards:
type: array
items:
additionalProperties: {}
description: Reward-specific properties
conditions:
type: array
items:
type: object
properties:
name:
type: string
condition:
type: string
conditionals:
type: array
items:
type: object
properties:
name:
type: string
conditional:
type: string
rewards:
type: array
items:
type: object
properties:
rid:
type: string
name:
type: string
inputs:
type: array
items:
type: object
properties:
type:
type: string
name:
type: string
label:
type: string
values:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,90 @@
get:
tags:
- admin
summary: Get widget settings
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
templates:
type: array
items:
type: object
properties:
template:
type: string
areas:
type: array
items:
type: object
properties:
name:
type: string
location:
type: string
areas:
type: array
items:
type: object
properties:
name:
type: string
template:
type: string
location:
type: string
data:
type: array
items:
type: object
properties:
widget:
type: string
data:
type: object
properties:
html:
type: string
cid:
type: string
title:
type: string
container:
type: string
groups:
type: array
items: {}
groupsHideFrom:
type: array
items: {}
hide-mobile:
type: string
numTags:
type: string
numUsers:
type: string
text:
type: string
parseAsPost:
type: string
numTopics:
type: string
availableWidgets:
type: array
items:
type: object
properties:
widget:
type: string
name:
type: string
description:
type: string
content:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,19 @@
get:
tags:
- admin
summary: Get members of a group (.csv)
parameters:
- in: header
name: referer
schema:
type: string
required: true
example: /admin/manage/groups
responses:
"200":
description: "A CSV file containing all users in the group"
content:
text/csv:
schema:
type: string
format: binary

View File

@@ -0,0 +1,56 @@
get:
tags:
- admin
summary: Get administrators and moderators
responses:
"200":
description: "A JSON object containing administrators and moderators globally and per-category"
content:
application/json:
schema:
allOf:
- type: object
properties:
admins:
$ref: ../../../components/schemas/GroupObject.yaml#/GroupFullObject
globalMods:
$ref: ../../../components/schemas/GroupObject.yaml#/GroupFullObject
categories:
type: array
items:
type: object
properties:
cid:
type: number
name:
type: string
level:
type: number
example: 0
icon:
type: string
description: A FontAwesome icon string
parentCid:
type: number
description: The parent category's identifier
color:
type: string
description: A six-character hexadecimal colour code
bgColor:
type: string
description: A six-character hexadecimal colour code
imageClass:
type: string
depth:
type: number
description: The depth of the category relative to the forum root (`0` is root level)
moderators:
type: array
items:
$ref: ../../../components/schemas/UserObject.yaml#/UserObjectSlim
allPrivileges:
type: array
items:
type: string
description: A simple array containing user privilege names (used client-side when giving mod privilege)
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,92 @@
get:
tags:
- admin
summary: Get category settings
parameters:
- name: category_id
in: path
required: true
schema:
type: string
example: 1
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
category:
allOf:
- $ref: ../../../components/schemas/CategoryObject.yaml#/CategoryObject
- type: object
properties:
tagWhitelist:
type: array
items:
type: string
unread-class:
type: string
parent:
$ref: ../../../components/schemas/CategoryObject.yaml#/CategoryObject
categories:
type: array
items:
type: object
properties:
cid:
type: number
description: A category identifier
name:
type: string
icon:
type: string
selected:
type: boolean
level:
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
imageClass:
type: string
required:
- cid
- name
- icon
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
imageClass:
type: string
selected:
type: boolean
customClasses:
type: array
items:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,42 @@
get:
tags:
- admin
summary: Get category anayltics
parameters:
- name: category_id
in: path
required: true
schema:
type: string
example: 1
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
name:
type: string
analytics:
type: object
properties:
pageviews:hourly:
type: array
items:
type: number
pageviews:daily:
type: array
items:
type: number
topics:daily:
type: array
items:
type: number
posts:daily:
type: array
items:
type: number
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,51 @@
get:
tags:
- admin
summary: Get system digest info/settings
responses:
"200":
description: "A JSON object containing recent digest sends and settings"
content:
application/json:
schema:
allOf:
- type: object
properties:
title:
type: string
delivery:
type: array
items:
type: object
properties:
username:
type: string
description: A friendly name for a given user account
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"
lastDelivery:
type: string
setting:
type: boolean
default:
type: string
required:
- title
- delivery
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,70 @@
get:
tags:
- admin
summary: Get user group details
parameters:
- name: name
in: path
required: true
schema:
type: string
example: administrators
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
group:
$ref: ../../../components/schemas/GroupObject.yaml#/GroupFullObject
groupNames:
type: array
items:
type: object
properties:
encodedName:
type: string
displayName:
type: string
selected:
type: boolean
categories:
type: array
items:
type: object
properties:
cid:
type: number
description: A category identifier
name:
type: string
icon:
type: string
selected:
type: boolean
level:
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
imageClass:
type: string
required:
- cid
- name
- icon
allowPrivateGroups:
type: number
maximumGroupNameLength:
type: number
maximumGroupTitleLength:
type: number
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,150 @@
get:
tags:
- admin
summary: Get category privileges
parameters:
- name: cid
in: path
required: true
schema:
type: string
example: 1
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
privileges:
type: object
properties:
labels:
type: object
properties:
users:
type: array
items:
type: object
properties:
name:
type: string
groups:
type: array
items:
type: object
properties:
name:
type: string
keys:
type: object
properties:
users:
type: array
items:
type: string
groups:
type: array
items:
type: string
users:
type: array
items:
type: object
properties:
name:
type: string
nameEscaped:
type: string
privileges:
type: object
additionalProperties:
type: boolean
description: Each privilege will have a key in this object
groups:
type: array
items:
type: object
properties:
name:
type: string
nameEscaped:
type: string
privileges:
type: object
additionalProperties:
type: boolean
description: Each privilege will have a key in this object
isPrivate:
type: boolean
columnCountUser:
type: number
columnCountUserOther:
type: number
columnCountGroup:
type: number
columnCountGroupOther:
type: number
categories:
type: array
items:
type: object
properties:
cid:
type: number
description: A category identifier
name:
type: string
icon:
type: string
selected:
type: boolean
level:
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
imageClass:
type: string
required:
- cid
- name
- icon
- selected
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
imageClass:
type: string
selected:
type: boolean
cid:
type: number
description: A category identifier
group:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,90 @@
get:
tags:
- admin
summary: Get registration queue/invites
responses:
"200":
description: "A JSON object containing the registration queue and invites"
content:
application/json:
schema:
allOf:
- type: object
properties:
registrationQueueCount:
type: number
users:
type: array
items:
type: object
properties:
username:
type: string
email:
type: string
ip:
type: string
timestampISO:
type: string
usernameEscaped:
type: string
ipMatch:
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"
customActions:
type: array
items:
type: object
properties:
title:
type: string
id:
type: string
class:
type: string
icon:
type: string
customHeaders:
type: array
invites:
type: array
items:
type: object
properties:
uid:
type: number
invitations:
type: array
items:
type: object
properties:
email:
type: string
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,35 @@
get:
tags:
- admin
summary: Get tag settings
responses:
"200":
description: "A JSON object containing tag settings"
content:
application/json:
schema:
allOf:
- type: object
properties:
tags:
type: array
items:
type: object
properties:
value:
type: string
description: The tag name
score:
type: number
description: The number of topics containing this tag
valueEscaped:
type: string
color:
type: string
description: Six-character hexadecimal string (with `#` prepended)
example: "#ff0000"
bgColor:
type: string
description: Six-character hexadecimal string (with `#` prepended)
example: "#ff0000"
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,57 @@
get:
tags:
- admin
summary: Get uploaded files
parameters:
- in: query
name: dir
schema:
type: string
description: Path of the folder, relative to `public/uploads/`
example: /
responses:
"200":
description: "A JSON object containing uploaded files"
content:
application/json:
schema:
allOf:
- type: object
properties:
currentFolder:
type: string
description: Path of the folder, relative to `public/uploads/`
showPids:
type: boolean
description: Whether or not the post identifiers should be shown (this is `true` only for `public/uploads/files/`, as that is where post uploads go)
files:
type: array
items:
type: object
properties:
name:
type: string
path:
type: string
description: Path relative to `currentFolder`
url:
type: string
description: Relative URL ready to be combined with `config.relative_path` on the client-side or templates
fileCount:
type: number
description: For directories, the number of files inside
size:
type: number
description: The size of the file/directory
sizeHumanReadable:
type: string
isDirectory:
type: boolean
isFile:
type: boolean
mtime:
type: number
description: Last modified time of the file, down to the microsecond (expressed as a UNIX timestamp)
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,35 @@
get:
tags:
- admin
summary: Get users
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
users:
type: array
items:
$ref: ../../../components/schemas/UserObject.yaml#/UserObjectACP
page:
type: number
pageCount:
type: number
resultsPerPage:
type: number
latest:
type: boolean
search_display:
type: string
requireEmailConfirmation:
type: number
inviteOnly:
type: boolean
adminInviteOnly:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get banned users
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get flagged users
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get inactive users
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get latest users
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get users with the most reputation
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get users with no posts
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get non-verified users
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,39 @@
get:
tags:
- admin
summary: Get users via search term
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
search_display:
type: string
matchCount:
type: number
query:
type: string
uidQuery:
type: string
usernameQuery:
type: string
emailQuery:
type: string
ipQuery:
type: string
pageCount:
type: number
resultsPerPage:
type: number
timing:
type: number
users:
type: array
items:
$ref: ../../../../components/schemas/UserObject.yaml#/UserObjectACP
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps
- $ref: ../../../../components/schemas/Pagination.yaml#/Pagination

View File

@@ -0,0 +1,7 @@
get:
tags:
- admin
summary: Get users with the most posts
responses:
"418":
description: "TODO: A proper response needs to be added. It is not really a teapot | Replace this responses block with the block from /manage/users/latest"

View File

@@ -0,0 +1,24 @@
get:
tags:
- admin
summary: Get system settings
parameters:
- name: term
in: path
required: true
schema:
type: string
example: general
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties: {}
additionalProperties:
type: object
description: Most of the settings pages have their values loaded on the client-side, so the settings are not exposed server-side.
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,23 @@
get:
tags:
- admin
summary: Get homepage settings
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
routes:
type: array
items:
type: object
properties:
route:
type: string
name:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,35 @@
get:
tags:
- admin
summary: Get language settings
responses:
"200":
description: A JSON object containing available languages and settings
content:
application/json:
schema:
allOf:
- type: object
properties:
languages:
type: array
items:
type: object
properties:
name:
type: string
description: Localised name of the language
code:
type: string
description: A language code (similar to ISO-639)
dir:
type: string
description: Directionality of the language
enum: [ltr, rtl]
selected:
type: boolean
description: Denotes the currently selected default system language on the forum
autoDetectLang:
type: integer
description: Whether the forum will attempt to guess language based on browser's `Accept-Language` header
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,107 @@
get:
tags:
- admin
summary: Get navigation bar settings
responses:
"200":
description: A JSON object containing navigation settings
content:
application/json:
schema:
allOf:
- type: object
properties:
enabled:
type: array
items:
type: object
properties:
route:
type: string
description: Relative URL to the page the navigation item goes to
title:
type: string
description: Tooltip text
enabled:
type: boolean
iconClass:
type: string
description: A FontAwesome icon string
textClass:
type: string
description: HTML class applied to the text label for this navigation item
text:
type: string
description: Label text for this navigation item
order:
type: integer
description: Ordinality of this item, lower value appears earlier
groups:
type: array
items:
type: object
properties:
displayName:
type: string
selected:
type: boolean
index:
type: integer
description: Seemingly identical to order, but an integer instead of a string
selected:
type: boolean
available:
type: array
items:
type: object
properties:
id:
type: string
description: Unique ID that will be added to the navigation element's `id` property in the DOM
route:
type: string
description: Relative URL to the page the navigation item goes to
title:
type: string
description: Tooltip text
enabled:
type: boolean
iconClass:
type: string
description: A FontAwesome icon string
textClass:
type: string
description: HTML class applied to the text label for this navigation item
text:
type: string
description: Label text for this navigation item
core:
type: boolean
description: Whether the navigation item is provided by core or not (a plugin)
groups:
type: array
items:
type: object
properties:
name:
type: string
displayName:
type: string
properties:
type: object
properties:
targetBlank:
type: boolean
groups:
type: array
items:
type: object
properties:
name:
type: string
displayName:
type: string
navigation:
type: array
description: A clone of `enabled`
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,28 @@
get:
tags:
- admin
summary: Get post social sharing settings
responses:
"200":
description: "A JSON object containing post social sharing settings"
content:
application/json:
schema:
allOf:
- type: object
properties:
posts:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
class:
type: string
description: A FontAwesome icon string
activated:
type: boolean
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,35 @@
post:
tags:
- admin
summary: Upload a file
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
folder:
type: string
description: The folder to upload the files to (relative to `public/uploads/`)
files:
type: array
items:
type: string
format: binary
required:
- files
responses:
"200":
description: "File uploaded"
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The filename
url:
type: string
description: URL of the uploaded file for use client-side

View File

@@ -0,0 +1,32 @@
post:
tags:
- admin
summary: Upload default avatar
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

View File

@@ -0,0 +1,32 @@
post:
tags:
- admin
summary: Upload Maskable Icon
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 logo for the Maskable Icon entry for PWA / A2HS

View File

@@ -0,0 +1,32 @@
post:
tags:
- admin
summary: Upload site-wide Open Graph Image
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

View File

@@ -0,0 +1,32 @@
post:
tags:
- admin
summary: Upload Touch Icon
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 logo for the Homescreen/Touch Icon to enable PWA

View File

@@ -0,0 +1,32 @@
post:
tags:
- admin
summary: Upload favicon
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

View File

@@ -0,0 +1,32 @@
post:
tags:
- admin
summary: Upload site logo
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

View File

@@ -0,0 +1,19 @@
get:
tags:
- admin
summary: Get users export (.csv)
parameters:
- in: header
name: referer
schema:
type: string
required: true
example: /admin/manage/users
responses:
"200":
description: "A CSV file containing all registered users"
content:
text/csv:
schema:
type: string
format: binary