Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
IoT Platform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
IoT
IoT Platform
Commits
232b75f7
Commit
232b75f7
authored
5 months ago
by
Guilherme Arthur Gerônimo
Browse files
Options
Downloads
Patches
Plain Diff
API@root
parent
04a224aa
Branches
main
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/openapi.yml
+287
-0
287 additions, 0 deletions
api/openapi.yml
docker/web/index.html
+25
-3
25 additions, 3 deletions
docker/web/index.html
with
312 additions
and
3 deletions
api/openapi.yml
0 → 100644
+
287
−
0
View file @
232b75f7
openapi
:
3.0.3
info
:
title
:
IoT@UFSC
description
:
|-
Documentação da API da plataforma IoT da UFSC
contact
:
email
:
servicos.ti+iot@sistemas.ufsc.br
license
:
name
:
Apache
2.0
url
:
http://www.apache.org/licenses/LICENSE-2.0.html
version
:
1.0.11
externalDocs
:
description
:
Mais sobre o serviços
url
:
https://iot.lisha.ufsc.br
servers
:
-
url
:
/
tags
:
-
name
:
series
description
:
|-
Gerenciamento das series temporais
externalDocs
:
description
:
Mais informações
url
:
https://epos.lisha.ufsc.br/IoT+Platform#SmartData_Series
-
name
:
dados
description
:
Entrada e saida de dados
externalDocs
:
description
:
Mais informações
url
:
https://epos.lisha.ufsc.br/IoT+Platform#SmartData
paths
:
/api/create
:
post
:
tags
:
-
series
summary
:
Criar uma serie temporal
description
:
Criar uma serie temporal
#operationId: updatePet
requestBody
:
description
:
Requisição para criar serie
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/series'
required
:
true
responses
:
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/series'
'
401'
:
description
:
Credenciais erradas
/api/put
:
post
:
tags
:
-
dados
summary
:
Entrar com dados na plataforma
description
:
Criar uma serie temporal
#operationId: updatePet
requestBody
:
description
:
Requisição para criar serie
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/smartdata'
required
:
true
responses
:
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/series'
'
401'
:
description
:
Credenciais erradas
/api/get
:
post
:
tags
:
-
dados
summary
:
Entrar com dados na plataforma
description
:
Criar uma serie temporal
requestBody
:
description
:
Requisição para criar serie
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/query'
required
:
true
responses
:
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/query-response-v12'
'
401'
:
description
:
Credenciais erradas
components
:
schemas
:
series
:
type
:
object
properties
:
version
:
$ref
:
'
#/components/schemas/version'
unit
:
$ref
:
'
#/components/schemas/unit'
x
:
$ref
:
'
#/components/schemas/ponto'
y
:
$ref
:
'
#/components/schemas/ponto'
z
:
$ref
:
'
#/components/schemas/ponto'
r
:
type
:
integer
description
:
Raio
example
:
10
t0
:
$ref
:
'
#/components/schemas/tempo'
t1
:
$ref
:
'
#/components/schemas/tempo'
dev
:
type
:
integer
example
:
10
signature
:
type
:
string
example
:
10
workflow
:
type
:
integer
example
:
0
smartdata
:
type
:
object
properties
:
version
:
$ref
:
'
#/components/schemas/version'
unit
:
$ref
:
'
#/components/schemas/unit'
value
:
type
:
number
format
:
double
error
:
type
:
integer
format
:
int64
default
:
0
confidence
:
type
:
integer
format
:
int64
default
:
1
x
:
$ref
:
'
#/components/schemas/ponto'
y
:
$ref
:
'
#/components/schemas/ponto'
z
:
$ref
:
'
#/components/schemas/ponto'
r
:
type
:
integer
description
:
Raio
example
:
10
t
:
$ref
:
'
#/components/schemas/tempo'
dev
:
type
:
integer
example
:
10
signature
:
type
:
string
example
:
10
workflow
:
type
:
integer
example
:
0
query
:
type
:
object
required
:
-
version
-
unit
-
dev
-
x
-
y
-
z
properties
:
version
:
$ref
:
'
#/components/schemas/version'
unit
:
$ref
:
'
#/components/schemas/unit'
dev
:
type
:
integer
example
:
10
signature
:
type
:
string
example
:
10
x
:
$ref
:
'
#/components/schemas/ponto'
y
:
$ref
:
'
#/components/schemas/ponto'
z
:
$ref
:
'
#/components/schemas/ponto'
r
:
type
:
integer
description
:
Raio
example
:
10
t0
:
$ref
:
'
#/components/schemas/tempo'
tf
:
$ref
:
'
#/components/schemas/tempo'
query-response-v12
:
type
:
object
properties
:
version
:
$ref
:
'
#/components/schemas/version'
unit
:
$ref
:
'
#/components/schemas/unit'
timestamp
:
$ref
:
'
#/components/schemas/tempo'
value
:
type
:
number
format
:
double
error
:
type
:
integer
format
:
int64
default
:
0
confidence
:
type
:
integer
format
:
int64
default
:
1
gateway
:
type
:
integer
example
:
10
type
:
type
:
string
example
:
10
period
:
type
:
integer
example
:
10
dev
:
type
:
integer
example
:
10
signature
:
type
:
string
example
:
10
x
:
$ref
:
'
#/components/schemas/ponto'
y
:
$ref
:
'
#/components/schemas/ponto'
z
:
$ref
:
'
#/components/schemas/ponto'
tempo
:
type
:
integer
format
:
int64
description
:
|-
- Microsegundos
- UNIX Time * 1.000.000
- Ex.: time.time() * 1000000
ponto
:
type
:
integer
format
:
int32
description
:
|-
- Coordenada absoluta (ECEF) da localização do dado.
- Não é Latitude/Longitude (LLH).
- [Converter LLH para ECEF](https://www.oc.nps.edu/oc2902w/coord/llhxyz.htm)
```python
#Python
import pyproj
transformer = pyproj.Transformer.from_crs({"proj":'latlong', "ellps":'WGS84', "datum":'WGS84'},{"proj":'geocent', "ellps":'WGS84', "datum":'WGS84'})
x, y, z = transformer.transform( lng, lat, alt)
```
version
:
type
:
string
enum
:
-
"
1.1"
-
"
1.2"
description
:
|-
- A lista de versoes pode se encontrada em:
- https://epos.lisha.ufsc.br/IoT+Platform#SmartData
unit
:
type
:
integer
format
:
int32
example
:
66571993184
description
:
|-
- A lista de unidades pode se encontrada em:
- https://epos.lisha.ufsc.br/Usefull+SmartData+Units
- https://epos.lisha.ufsc.br/EPOS+2+User+Guide#Unit
This diff is collapsed.
Click to expand it.
docker/web/index.html
+
25
−
3
View file @
232b75f7
<html>
<h3>
API: /api
</h3>
<a
href=
'/api'
>
API
</>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Plataforma IoT
</title>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui.css"
/>
</head>
<body>
<div
id=
"swagger-ui"
></div>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui-bundle.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui-standalone-preset.js"
></script>
<script>
const
ui
=
SwaggerUIBundle
({
url
:
'
/api/openapi.yml
'
,
dom_id
:
'
#swagger-ui
'
,
presets
:
[
SwaggerUIStandalonePreset
,
SwaggerUIBundle
.
presets
.
apis
,
],
layout
:
"
StandaloneLayout
"
,
});
</script>
</body>
</html>
This diff is collapsed.
Click to expand it.
Guilherme Arthur Gerônimo
@arthur
mentioned in issue
#53 (closed)
·
5 months ago
mentioned in issue
#53 (closed)
mentioned in issue #53
Toggle commit list
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