asterisk/rest-api/api-docs/deviceStates.json
Corey Farrell 679fa5fb34 Add missing OPTIONAL_API and ARI dependences.
I've audited all modules that include any header which includes
asterisk/optional_api.h.  All modules which use OPTIONAL_API now declare
those dependencies in AST_MODULE_INFO using requires or optional_modules
as appropriate.

In addition ARI dependency declarations have been reworked.  Instead of
declaring additional required modules in res/ari/resource_*.c we now add
them to an optional array "requiresModules" in api-docs for each module.
This allows the AST_MODULE_INFO dependencies to include those missing
modules.

Change-Id: Ia0c70571f5566784f63605e78e1ceccb4f79c606
2018-01-22 12:16:58 -05:00

155 lines
3.4 KiB
JSON

{
"_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
"_author": "Kevin Harwell <kharwell@digium.com>",
"_svn_revision": "$Revision$",
"apiVersion": "2.0.0",
"swaggerVersion": "1.1",
"basePath": "http://localhost:8088/ari",
"resourcePath": "/api-docs/deviceStates.{format}",
"requiresModules": [
"res_stasis_device_state"
],
"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"
]
}
}
}
}
}
}