mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 14:53:24 +02:00
add rest API for update Device note (#222)
* add rest API for update Device note Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com> * improve failure message Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com> Co-authored-by: Karol Wrótniak <karol.wrotniak@droidsonroids.pl>
This commit is contained in:
committed by
GitHub
parent
38cb66b1bd
commit
3370f679bc
@@ -1877,6 +1877,45 @@ paths:
|
||||
$ref: "#/definitions/UnexpectedErrorResponse"
|
||||
security:
|
||||
- accessTokenAuth: []
|
||||
put:
|
||||
summary: Adds device informatin
|
||||
description: Adds device information
|
||||
operationId: putDeviceBySerial
|
||||
consumes:
|
||||
- application/json
|
||||
tags:
|
||||
- admin
|
||||
parameters:
|
||||
- name: serial
|
||||
in: path
|
||||
description: Device identifier (serial)
|
||||
required: true
|
||||
type: string
|
||||
- name: device
|
||||
in: body
|
||||
description: >
|
||||
Information to add for device. Supports only notes -field.
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/DevicePayload"
|
||||
responses:
|
||||
"200":
|
||||
description: Storing success
|
||||
schema:
|
||||
$ref: "#/definitions/Response"
|
||||
default:
|
||||
description: >
|
||||
Unexpected Error:
|
||||
* 400: Bad Request => invalid request
|
||||
* 401: Unauthorized => bad credentials
|
||||
* 404: Not Found => unknown device
|
||||
* 500: Internal Server Error
|
||||
* 503: Service Unavailable => server too busy or a lock on a resource is pending
|
||||
* 504: Gateway Time-out => server is not responding
|
||||
schema:
|
||||
$ref: "#/definitions/UnexpectedErrorResponse"
|
||||
security:
|
||||
- accessTokenAuth: [ ]
|
||||
/devices/groups/{id}:
|
||||
x-swagger-router-controller: devices
|
||||
put:
|
||||
@@ -2380,6 +2419,12 @@ definitions:
|
||||
emails:
|
||||
description: Comma-separated list of emails
|
||||
type: string
|
||||
DevicePayload:
|
||||
description: payload object for adding device information
|
||||
properties:
|
||||
note:
|
||||
description: Device Note
|
||||
type: string
|
||||
DevicesPayload:
|
||||
description: Payload object for adding/removing devices
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user