generated from SidingsMedia/service-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matthew <[email protected]>
- Loading branch information
1 parent
c90992f
commit a82fd61
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SPDX-FileCopyrightText: 2024 Sidings Media | ||
# SPDX-License-Identifier: MIT | ||
|
||
type: object | ||
properties: | ||
domain: | ||
type: string | ||
description: Domain of site | ||
name: | ||
type: string | ||
description: Name of event to log. | ||
url: | ||
type: string | ||
format: uri | ||
description: URL of page that triggered event | ||
referrer: | ||
type: string | ||
description: Referrer for this event | ||
props: | ||
type: object | ||
description: | | ||
Custom properties for the event. Note maximum of 30 key value | ||
pairs. If more than 30 are provided the exceeding keys will be | ||
ignored. | ||
required: | ||
- domain | ||
- name | ||
- url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# SPDX-FileCopyrightText: 2024 Sidings Media | ||
# SPDX-License-Identifier: MIT | ||
|
||
post: | ||
description: Log an analytics event | ||
summary: Log an event | ||
operationId: logEvent | ||
tags: | ||
- stats | ||
parameters: | ||
- in: header | ||
name: User-Agent | ||
schema: | ||
type: string | ||
example: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1 | ||
required: true | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../components/schemas/Event.yaml | ||
example: | ||
domain: sidingsmedia.com | ||
event: pageview | ||
url: https://sidingsmedia.com | ||
responses: | ||
'202': | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
example: | ||
value: ok | ||
'400': | ||
$ref: ../../components/responses/BadRequest.yaml | ||
'429': | ||
$ref: ../../components/responses/TooManyRequests.yaml | ||
5XX: | ||
$ref: ../../components/responses/ServerError.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# SPDX-FileCopyrightText: 2024 Sidings Media | ||
# SPDX-License-Identifier: MIT | ||
|
||
get: | ||
description: Stats service health check | ||
summary: Health check | ||
operationId: statsHealth | ||
tags: | ||
- stats | ||
responses: | ||
'200': | ||
$ref: ../../components/responses/HealthCheckOK.yaml | ||
'429': | ||
$ref: ../../components/responses/TooManyRequests.yaml | ||
5XX: | ||
$ref: ../../components/responses/ServerError.yaml |