spec: schema docs for new ACP dashboard subpage routes
parent
2f89b0d791
commit
0804d54759
@ -0,0 +1,47 @@
|
||||
Stats:
|
||||
type: object
|
||||
properties:
|
||||
stats:
|
||||
type: array
|
||||
items:
|
||||
allOf:
|
||||
- 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
|
||||
- type: object
|
||||
description: Optional properties that may or may not be present (except for `cid`, which is always present, and is only here as a hack to pass validation)
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
href:
|
||||
type: string
|
||||
description: Relative path to dashboard analytics sub-page, if applicable.
|
||||
required:
|
||||
- name
|
@ -0,0 +1,55 @@
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
summary: Get detailed login analytics
|
||||
responses:
|
||||
"200":
|
||||
description: A JSON object containing more detailed analytics related to user login sessions.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
set:
|
||||
type: string
|
||||
description: The analytics set that is being queried
|
||||
query:
|
||||
additionalProperties:
|
||||
description: An object containing the query string parameters, if any
|
||||
summary:
|
||||
type: object
|
||||
properties:
|
||||
day:
|
||||
type: number
|
||||
week:
|
||||
type: number
|
||||
month:
|
||||
type: number
|
||||
sessions:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
ip:
|
||||
type: string
|
||||
uuid:
|
||||
type: string
|
||||
datetime:
|
||||
type: number
|
||||
platform:
|
||||
type: string
|
||||
browser:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
current:
|
||||
type: boolean
|
||||
datetimeISO:
|
||||
type: string
|
||||
user:
|
||||
$ref: ../../../components/schemas/UserObj.yaml#/UserObj
|
||||
loginDays:
|
||||
type: number
|
||||
- $ref: ../../../components/schemas/admin/dashboard.yaml#/Stats
|
||||
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps
|
@ -0,0 +1,34 @@
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
summary: Get detailed user registration analytics
|
||||
responses:
|
||||
"200":
|
||||
description: A JSON object containing more detailed analytics related to user registrations.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
set:
|
||||
type: string
|
||||
description: The analytics set that is being queried
|
||||
query:
|
||||
additionalProperties:
|
||||
description: An object containing the query string parameters, if any
|
||||
summary:
|
||||
type: object
|
||||
properties:
|
||||
day:
|
||||
type: number
|
||||
week:
|
||||
type: number
|
||||
month:
|
||||
type: number
|
||||
topics:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../components/schemas/TopicObject.yaml#/TopicObject
|
||||
- $ref: ../../../components/schemas/admin/dashboard.yaml#/Stats
|
||||
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps
|
@ -0,0 +1,34 @@
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
summary: Get detailed user registration analytics
|
||||
responses:
|
||||
"200":
|
||||
description: A JSON object containing more detailed analytics related to user registrations.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
set:
|
||||
type: string
|
||||
description: The analytics set that is being queried
|
||||
query:
|
||||
additionalProperties:
|
||||
description: An object containing the query string parameters, if any
|
||||
summary:
|
||||
type: object
|
||||
properties:
|
||||
day:
|
||||
type: number
|
||||
week:
|
||||
type: number
|
||||
month:
|
||||
type: number
|
||||
users:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../components/schemas/UserObject.yaml#/UserObject
|
||||
- $ref: ../../../components/schemas/admin/dashboard.yaml#/Stats
|
||||
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps
|
@ -0,0 +1,46 @@
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
summary: get analytics data
|
||||
description: This operation retrieves analytics data from NodeBB. It is only accessible to administrators.
|
||||
parameters:
|
||||
- in: path
|
||||
name: set
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: analytics set to retrieve
|
||||
example: topics
|
||||
- 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: Analytics set retrieved
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: array
|
||||
items:
|
||||
type: number
|
Loading…
Reference in New Issue