Skip to content

Commit

Permalink
Added new stats endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Nickson <[email protected]>
  • Loading branch information
Computroniks committed Oct 27, 2023
1 parent 110e2e1 commit 7182146
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ info:
title: Sidings Media API
description: |
General utility APIs for all Sidings Media web based services
version: 0.1.4
version: 0.2.0
x-logo:
url: https://cdn.sidingsmedia.com/logo/logo-white-horizontal-short.svg
backgroundColor: "#1976D2"
Expand Down Expand Up @@ -46,6 +46,16 @@ components:
- email
- subject
- message

View:
type: object
properties:
page:
type: string
description: Full URI of page
format: uri
required:
- "page"

GeneralError:
type: object
Expand Down Expand Up @@ -97,6 +107,16 @@ components:
- field: name
condition: required

UnrecognizedPage:
description: The page provided is not recognized
content:
application/json:
schema:
$ref: "#/components/schemas/GeneralError"
example:
code: 403
message: Unrecognized domain for page

TooManyRequests:
description: The rate limit has been exceeded
headers:
Expand Down Expand Up @@ -172,6 +192,21 @@ paths:
5XX:
$ref: "#/components/responses/ServerError"

/stats/views:
post:
description: Log a view for a given page
tags:
- stats
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/View"
responses:
201:
description: Created

/terms:
get:
description: API terms of use
Expand Down

0 comments on commit 7182146

Please sign in to comment.