1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00
OpenSTF/lib/units/api/swagger/api_v1.yaml
2016-07-22 19:34:22 +05:30

99 lines
2.3 KiB
YAML

swagger: "2.0"
info:
version: "1.0.10"
title: Smartphone Test Farm
description: Control and manager real Smartphone devices from browser and apis
license:
name: Apache-2.0
url: http://www.apache.org/licenses/LICENSE-2.0
contact:
url: http://openstf.io/
email: contact@openstf.io
basePath: /api/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
/me:
x-swagger-router-controller: user
get:
summary: User Profile
description: The User Profile endpoint returns information about current authorized user.
operationId: getCurrentUser
responses:
"200":
description: Current User Profile information
schema:
$ref: "#/definitions/UserResponse"
default:
description: Unexpected Error
schema:
$ref: "#/definitions/ErrorResponse"
/devices:
x-swagger-router-controller: device
get:
summary: Device List
description: List of all the STF devices including Disconnected and Offline
operationId: getDevices
responses:
"200":
description: List of Devices
schema:
$ref: "#/definitions/DeviceListResponse"
default:
description: Unexpected Error
schema:
$ref: "#/definitions/ErrorResponse"
/devices/{serial}:
x-swagger-router-controller: device
get:
summary: Device Information
description: Device Information
operationId: getDeviceBySerial
parameters:
- name: serial
in: path
description: Device Serial
required: true
type: string
responses:
"200":
description: Device Information
schema:
$ref: "#/definitions/DeviceResponse"
default:
description: Unexpected Error
schema:
$ref: "#/definitions/ErrorResponse"
definitions:
UserResponse:
required:
- user
properties:
user:
type: object
DeviceListResponse:
required:
- devices
properties:
devices:
type: array
items:
type: object
DeviceResponse:
required:
- device
properties:
device:
type: object
ErrorResponse:
required:
- message
properties:
message:
type: string