Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lab05-shared-microservice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DevOps22FallPub
Lab05-shared-microservice
Commits
4bc469ac
Commit
4bc469ac
authored
2 years ago
by
poojara
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
c45a346f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swagger.yaml
+168
-0
168 additions, 0 deletions
swagger.yaml
with
168 additions
and
0 deletions
swagger.yaml
0 → 100644
+
168
−
0
View file @
4bc469ac
---
swagger
:
"
2.0"
info
:
description
:
"
This
is
documentation
for
Python
Flask
micro-service
endpoints"
version
:
"
1.0.0"
title
:
"
Swagger
IoT
data"
termsOfService
:
"
http://swagger.io/terms/"
contact
:
email
:
"
xxx@ut.ee"
license
:
name
:
"
Apache
2.0"
url
:
"
http://www.apache.org/licenses/LICENSE-2.0.html"
host
:
"
172.17.91.23:8081"
basePath
:
"
/v2"
schemes
:
-
"
http"
paths
:
/upload
:
post
:
tags
:
-
"
Upload
Sensor
Data"
summary
:
"
Uploads
a
file."
operationId
:
"
upload_post"
consumes
:
-
"
multipart/form-data"
parameters
:
-
name
:
"
upfile"
in
:
"
formData"
description
:
"
The
file
to
upload."
required
:
false
type
:
"
file"
responses
:
"
200"
:
description
:
"
File
uploaded"
"
400"
:
description
:
"
File
not
uploaded."
/modify
:
put
:
tags
:
-
"
Modify
Sensor
Data"
summary
:
"
Updated
Sensor
name"
operationId
:
"
update_sensor_data"
consumes
:
-
"
application/json"
-
"
application/xml"
produces
:
-
"
application/xml"
-
"
application/json"
parameters
:
-
in
:
"
body"
name
:
"
body"
description
:
"
device
object
that
needs
to
be
modified"
required
:
true
schema
:
$ref
:
"
#/definitions/device"
responses
:
"
200"
:
description
:
"
Data
modified"
"
400"
:
description
:
"
Data
not
modified"
/sensor_data/{host}
:
get
:
tags
:
-
"
Query
Sensor
Data"
summary
:
"
Find
sensor
data
by
host"
description
:
"
Returns
a
list
of
sensor
data"
operationId
:
"
get_sensor_by_id"
produces
:
-
"
application/xml"
-
"
application/json"
parameters
:
-
name
:
"
host"
in
:
"
path"
description
:
"
Device
id
to
search
in
the
data"
required
:
true
type
:
"
integer"
format
:
"
int64"
responses
:
"
200"
:
description
:
"
Successful
operation"
schema
:
$ref
:
"
#/definitions/device"
"
400"
:
description
:
"
Invalid
ID
supplied"
delete
:
tags
:
-
"
Delete
Sensor
Data"
summary
:
"
Delete
sensor
data"
operationId
:
"
delete_sensor_data"
produces
:
-
"
application/json"
parameters
:
-
name
:
"
host"
in
:
"
path"
description
:
"
Sensor
Id
that
need
to
be
updated"
required
:
true
type
:
"
integer"
format
:
"
int64"
responses
:
"
200"
:
description
:
"
Successful
operation"
"
400"
:
description
:
"
Invalid
device
id
supplied"
/minimum/{sensor}
:
get
:
tags
:
-
"
Query
Sensor
Data"
summary
:
"
Find
minimum
sensor
data
by
host"
description
:
"
Returns
a
list
of
sensor
data"
operationId
:
"
getminimum"
produces
:
-
"
application/xml"
-
"
application/json"
parameters
:
-
name
:
"
sensor"
in
:
"
path"
description
:
"
Host
to
search
in
the
data"
required
:
true
type
:
"
string"
responses
:
"
200"
:
description
:
"
Successful
with
response
containing
minimum
value"
schema
:
$ref
:
"
#/definitions/device"
"
400"
:
description
:
"
Invalid
host
supplied"
/maximum/{sensor}
:
get
:
tags
:
-
"
Query
Sensor
Data"
summary
:
"
Find
maximum
sensor
data
by
host"
description
:
"
Returns
a
list
of
sensor
data"
operationId
:
"
getmaximum"
produces
:
-
"
application/xml"
-
"
application/json"
parameters
:
-
name
:
"
sensor"
in
:
"
path"
description
:
"
host
to
search
in
the
data"
required
:
true
type
:
"
string"
responses
:
"
200"
:
description
:
"
Successful
with
response
containing
maximum
value"
schema
:
$ref
:
"
#/definitions/device"
"
400"
:
description
:
"
Invalid
ID
supplied"
definitions
:
device
:
type
:
"
object"
properties
:
host
:
type
:
"
integer"
format
:
"
int64"
unit
:
type
:
"
string"
example
:
"
kg"
example
:
host
:
"
13318"
unit
:
"
kg"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment