Created
January 8, 2020 05:13
-
-
Save deefdragon/2a4adf4ce308782cef35b6ce2f2bdbe5 to your computer and use it in GitHub Desktop.
test
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
openapi: 3.0.0 | |
info: | |
version: "0.0.1" | |
title: StreemTech API | |
description: A Starter StreemTech API that contains different status codes etc. and the basics of the api as is created so far. | |
contact: | |
name: API Support | |
url: http://wiki.streem.tech/api | |
email: admin@streem.tech | |
license: | |
name: Apache 2.0 | |
url: http://www.apache.org/licenses/LICENSE-2.0.html | |
tags: | |
- name: /userdata/accounts | |
description: "Get current weather details" | |
- name: /userdata/modules | |
description: "Get current weather details" | |
- name: /userdata/sites | |
description: "Get current weather details" | |
- name: /userdata/tables | |
description: "Get current weather details" | |
servers: | |
- url: https://streem.tech/api/v1 | |
description: VERSION 1 STREEMTECH API | |
security: | |
- BasicAuth: [] | |
paths: | |
/userdata/accounts/connectedAccounts: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/accounts | |
delete: | |
parameters: | |
- in: query | |
name: test | |
schema: | |
type: string | |
required: true | |
description: random test string | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/accounts | |
/userdata/accounts/AccountSettings: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/accounts | |
patch: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/accounts | |
/userdata/modules/ModuleList: #for multiple modules only. | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/modules/UserModule: | |
get: #get module | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
post: #add module. | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
patch: #edit module | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
delete: #delete module | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/modules/ModuleStatistics: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/modules/ModuleStatus: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
post: #activate, deactivate, or invert | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/modules/ModuleSettings: | |
get: #get module | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
post: #add module. | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
patch: #edit module | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
delete: #delete module | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/modules/ModuleHistory: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/modules/ModuleSettingsHistory: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/modules/LoadHistoryModuleAsNewModule: | |
post: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/modules | |
/userdata/sites/Sites: | |
get: #get site | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/sites | |
post: #add Site | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/sites | |
patch: #edit Site | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/sites | |
delete: #delete Site | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/sites | |
/userdata/sites/SiteStatistics: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/sites | |
/userdata/tables/Colunms: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
/userdata/tables/Row: | |
get: #Read | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
post: #Create | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
patch: #update | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
delete: #Delete | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
/userdata/tables/ColunmNames: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
post: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
/userdata/tables/RowCount: | |
get: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
/userdata/tables/TableQuery: | |
post: | |
responses: | |
'200': | |
$ref: '#/components/responses/jsonStringResponse' | |
'4XX': | |
$ref: '#/components/responses/jsonStringResponse' | |
tags: | |
- /userdata/tables | |
components: | |
securitySchemes: | |
BasicAuth: | |
type: http | |
scheme: basic | |
UserLogin: #TODO replace this with oidc/updated data. | |
type: oauth2 | |
flows: | |
implicit: | |
authorizationUrl: https://example.com/api/oauth/dialog | |
scopes: | |
write:pets: modify pets in your account | |
read:pets: read your pets | |
schemas: | |
simpleStringObject: | |
type: object | |
properties: | |
message: | |
type: string | |
userLinkedAccount: | |
type: object | |
properties: | |
AccountID: | |
type: string | |
AccountType: | |
type: string | |
PlainTextUsername: | |
type: string | |
LinkedEmail: | |
type: string | |
Scopes: | |
type: array | |
items: | |
type: string | |
OtherData: | |
type: object | |
ServerMessage: #may be necessary if an account ecnounters an error when getting data. | |
type: string | |
userLinkedAccountsArray: | |
type: object | |
properties: | |
NumOfConnectedAccounts: | |
type: integer | |
rootAccount: | |
type: string | |
accounts: | |
type: array | |
items: | |
$ref: '#/components/schemas/userLinkedAccount' | |
removeAccountResponse: | |
type: object | |
properties: | |
AccountRemoved: | |
$ref: '#/components/schemas/userLinkedAccount' | |
NewRootAccount: | |
$ref: '#/components/schemas/userLinkedAccount' | |
RemovedStatus: | |
type: boolean | |
ServerMessage: | |
type: string | |
userAccountSettings: | |
type: object | |
properties: | |
CreatedOn: | |
type: string | |
Description: | |
type: string | |
Version: | |
type: integer | |
Settings: | |
type: object | |
userAccountSettingsRange: | |
type: object | |
properties: | |
Account: | |
type: string | |
StartDate: | |
type: string | |
EndDate: | |
type: string | |
StartVersion: | |
type: integer | |
EndVersion: | |
type: integer | |
NewestVersion: | |
type: integer | |
SettingsReturned: | |
type: integer | |
parameters: {} | |
responses: | |
jsonStringResponse: | |
description: Request OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
####################################################### | |
# # | |
# ███████╗████████╗ █████╗ ████████╗██╗ ██╗███████╗ # | |
# ██╔════╝╚══██╔══╝██╔══██╗╚══██╔══╝██║ ██║██╔════╝ # | |
# ███████╗ ██║ ███████║ ██║ ██║ ██║███████╗ # | |
# ╚════██║ ██║ ██╔══██║ ██║ ██║ ██║╚════██║ # | |
# ███████║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║ # | |
# ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ # | |
# ██████╗ ██████╗ ██████╗ ███████╗███████╗ # | |
# ██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔════╝ # | |
# ██║ ██║ ██║██║ ██║█████╗ ███████╗ # | |
# ██║ ██║ ██║██║ ██║██╔══╝ ╚════██║ # | |
# ╚██████╗╚██████╔╝██████╔╝███████╗███████║ # | |
# ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝ # | |
####################################################### | |
# | |
################################## | |
######## 100 series ########## | |
################################## | |
100Continue: | |
description: Continue the request, or ignore if alreadt finished. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
101SwitchProtocol: | |
description: Upgrade Sent from client. Protocol switch occuring. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
102Processing: | |
description: Server recieved request. Processing. No response Avaliable yet. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
103EarlyHints: | |
description: Let User Preload Content while server finishes processing | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
################################## | |
######## 200 series ########## | |
################################## | |
#200 OK above as there are more 200 than any other type of retrned value. | |
201Created: | |
description: Data has been created as requested. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
202Accepted: | |
description: Request Recieved, but not yet acted upon. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
203NonAuthoratitiveInfo: | |
description: Cached Response. Should be ok, but 200 would be perfered. Used for mirrored data. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
204NoContent: | |
description: No Content to send for this request. Use for empty json reuqests that were processed correctly. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
205ResetContent: | |
description: Reset the document that sent this request. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
206PartialContent: | |
description: Partial Content. Range Header sent. use to build full data. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
207MultiStatus: | |
description: Multiple Statuses. See data. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
208AlreadyReported: #May need to duplicate 200 responses for certain high-volume requests. | |
description: Already Reported. Avoid Repeatidly accessing. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
################################## | |
######## 300 series ########## | |
################################## | |
300MultipleChoice: | |
description: Multiple Choices are avaliable based on the reques. User should choose one. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
301MovedPermanently: | |
description: Resource Location has Moved Permanently. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
302Found: | |
description: The resource has been changed temporairly. The same uri should be used in the future. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
303SeeOther: | |
description: Client should reference another URI with GET request. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
304NotModified: | |
description: Data Not modified. Can use cached response. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
305UseProxy: | |
description: Use Proxy (Depricated) to access the data. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
# 306Unused: | |
# description: unused. | |
307TemporaryRedirect: | |
description: Temporairy redirect. Method must not change. URI It may change again. Still use this uri for future requests. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
308PermanentRedirect: | |
description: Permanent Redirect. The data has a new permanent location. Use that new URI. The new location must have the same method. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
################################## | |
######## 400 series ########## | |
################################## | |
400BadRequest: | |
description: The request is either missing data, or has arguments that are unknown. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
400BadData: | |
description: The arguments passed into the request do not meet the requirements of the api. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
401Unauthorized: | |
description: Client is unauthorized to perform the action | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
403Forbidden: | |
description: Client is unauthorized to perform the action. Client is known. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
404NotFound: | |
description: the resource was not found. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
404Hide: | |
description: Same as 403/401, with the exception that the existance of the endpoint is being hidden. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
405MethodNotAllowed: | |
description: the method called by the client is not allowed on that resource. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
409Conflict: | |
description: there is a data conflict between the current state of teh server and the request. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
410Gone: | |
description: The content has been removed from the server. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
418ImATeapot: | |
description: The server refuses the attempt to brew coffee with a teapot. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
420BlazeIt: | |
description: Something is on fire, and completely crazy dude | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
422Unprocessable: | |
description: Request well formated, but will not be processed due to semantic errors. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
423Locked: | |
description: the resource has been locked | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
424FailedDependency: | |
description: the request failed due to the failure of a previous request. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
425TooEarly: | |
description: Indicates that the request will not be processed as the request might not process correctly yet. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
429ToManyRequests: | |
description: the user has gone over their rate limit. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
451UnavaliableForLegal: | |
description: the request can not be responded to because of legal resons such as takedown or removal requests. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/simpleStringObject' | |
################################## | |
######## 500 series ########## | |
################################## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment