Files
asterisk/rest-api/api-docs/deviceStates.json
Matthew Jordan 6107712857 AMI/ARI: Update version numbers
Update the semantic versioning of ARI to 1.3.0 and AMI to 2.3.0 to account for
backwards compatible changes going from 12.2.0 to 12.3.0.
........

Merged revisions 414765 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 17:46:37 +00:00

152 lines
3.4 KiB
JSON

{
"_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
"_author": "Kevin Harwell <kharwell@digium.com>",
"_svn_revision": "$Revision$",
"apiVersion": "1.3.0",
"swaggerVersion": "1.1",
"basePath": "http://localhost:8088/stasis",
"resourcePath": "/api-docs/deviceStates.{format}",
"apis": [
{
"path": "/deviceStates",
"description": "Device states",
"operations": [
{
"httpMethod": "GET",
"summary": "List all ARI controlled device states.",
"nickname": "list",
"responseClass": "List[DeviceState]"
}
]
},
{
"path": "/deviceStates/{deviceName}",
"description": "Device state",
"operations": [
{
"httpMethod": "GET",
"summary": "Retrieve the current state of a device.",
"nickname": "get",
"responseClass": "DeviceState",
"parameters": [
{
"name": "deviceName",
"description": "Name of the device",
"paramType": "path",
"required": true,
"allowMultiple": false,
"dataType": "string"
}
]
},
{
"httpMethod": "PUT",
"summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).",
"nickname": "update",
"responseClass": "void",
"parameters": [
{
"name": "deviceName",
"description": "Name of the device",
"paramType": "path",
"required": true,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "deviceState",
"description": "Device state value",
"paramType": "query",
"required": true,
"allowMultiple": false,
"dataType": "string",
"allowableValues": {
"valueType": "LIST",
"values": [
"NOT_INUSE",
"INUSE",
"BUSY",
"INVALID",
"UNAVAILABLE",
"RINGING",
"RINGINUSE",
"ONHOLD"
]
}
}
],
"errorResponses": [
{
"code": 404,
"reason": "Device name is missing"
},
{
"code": 409,
"reason": "Uncontrolled device specified"
}
]
},
{
"httpMethod": "DELETE",
"summary": "Destroy a device-state controlled by ARI.",
"nickname": "delete",
"responseClass": "void",
"parameters": [
{
"name": "deviceName",
"description": "Name of the device",
"paramType": "path",
"required": true,
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Device name is missing"
},
{
"code": 409,
"reason": "Uncontrolled device specified"
}
]
}
]
}
],
"models": {
"DeviceState": {
"id": "DeviceState",
"description": "Represents the state of a device.",
"properties": {
"name": {
"type": "string",
"description": "Name of the device.",
"required": true
},
"state": {
"type": "string",
"description": "Device's state",
"required": true,
"allowableValues": {
"valueType": "LIST",
"values": [
"UNKNOWN",
"NOT_INUSE",
"INUSE",
"BUSY",
"INVALID",
"UNAVAILABLE",
"RINGING",
"RINGINUSE",
"ONHOLD"
]
}
}
}
}
}
}