Mainflux.mainflux/swagger.yaml

168 lines
3.8 KiB
YAML
Raw Normal View History

2015-07-07 04:32:02 +08:00
swagger: '2.0'
info:
version: 0.0.1
title: Mainflux
termsOfService: 'http://mainflux.com/tos'
contact:
name: Mainflux
url: 'http://wwww.mainflux.com'
email: info@mainflux.com
license:
name: Apache-2.0
url: 'http://opensource.org/licenses/Apache-2.0'
host: api.mainflux.com
basePath: /
schemes:
- http
- https
consumes:
- application/json
- text/xml
produces:
- application/json
- text/html
2015-07-07 04:32:02 +08:00
paths:
/status:
get:
description: |
2015-12-05 08:23:59 +08:00
Gets Mainflux server status.
tags:
- status
responses:
'200':
description: Server is running
schema:
title: Status
type: string
/devices:
get:
description: |
Gets all of the existing `Device` objects.
2015-12-05 08:23:59 +08:00
tags:
- devices
parameters:
- name: X-Auth-Token
in: header
description: authentification token
required: true
type: number
format: double
responses:
'200':
description: Successful response
schema:
title: ArrayOfDevices
type: array
items:
title: Device
type: object
properties:
uuid:
type: number
post:
description: |
Creates `Device` object.
Returns newly created Device object.
2015-12-05 08:23:59 +08:00
tags:
- devices
parameters:
- name: X-Auth-Token
in: header
description: authentification token
required: true
type: number
format: double
responses:
'200':
description: Successful response
schema:
title: Device
type: object
properties:
uuid:
type: number
'/devices/{device_id}':
get:
description: |
Gets `Device` object from the database by `deviceUuid`.
2015-12-05 08:23:59 +08:00
tags:
- devices
parameters:
- name: X-Auth-Token
in: header
description: authentification token
required: true
type: number
format: double
- name: device_id
in: path
description: Device UUID
required: true
type: string
responses:
'200':
description: Successful response
schema:
title: Thing
type: object
properties:
uuid:
type: number
put:
description: |
Updates Thing object from the database.
2015-12-05 08:23:59 +08:00
tags:
- devices
parameters:
- name: X-Auth-Token
in: header
description: authentification token
required: true
type: number
format: double
- name: device_id
in: path
description: Device UUID
required: true
type: string
- name: params
in: query
description: Device parameters
required: true
type: string
responses:
'200':
description: Successful response
schema:
title: Thing
type: object
properties:
uuid:
type: number
delete:
description: |
Deletes Thing object from the database.
2015-12-05 08:23:59 +08:00
tags:
- devices
parameters:
- name: X-Auth-Token
in: header
description: authentification token
required: true
type: number
format: double
- name: device_id
in: path
description: Device UUID
required: true
type: string
responses:
'200':
description: Successful response
schema:
title: Thing
type: object
properties:
uuid:
type: number