summaryrefslogtreecommitdiff
path: root/rest-api
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-08-02 14:46:21 +0000
committerDavid M. Lee <dlee@digium.com>2013-08-02 14:46:21 +0000
commit5114e4fc0ba896c91344c1c766740e8f7c661813 (patch)
tree9a2c49a909bc217232ef657b976f90293f6de7b3 /rest-api
parent537ecebd2dc27120144498598f32dec97db6808d (diff)
ARI - GET /ari/asterisk/info
This patch adds basic system information access to ARI. The results are roughly what you get from 'core show settings', with a few minor differences. * Data is structured, with 'build', 'system', 'config' and 'status' sub-objects. * Each sub-object is selectable, using the ?only= parameter. A comma separated list can be provided to select multiple sections. * A few config options are numeric, for which 0 means 'unlimited'. Instead of having a special interpretation of those fields, they are simply omitted if they're 0. * The information is limited to what might be useful to building external applications. (closes issue ASTERISK-21575) Review: https://reviewboard.asterisk.org/r/2702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rest-api')
-rw-r--r--rest-api/api-docs/asterisk.json143
1 files changed, 142 insertions, 1 deletions
diff --git a/rest-api/api-docs/asterisk.json b/rest-api/api-docs/asterisk.json
index 8bc887485..cbed1895c 100644
--- a/rest-api/api-docs/asterisk.json
+++ b/rest-api/api-docs/asterisk.json
@@ -85,10 +85,151 @@
}
],
"models": {
+ "BuildInfo": {
+ "id": "BuildInfo",
+ "description": "Info about how Asterisk was built",
+ "properties": {
+ "os": {
+ "required": true,
+ "type": "string",
+ "description": "OS Asterisk was built on."
+ },
+ "kernel": {
+ "required": true,
+ "type": "string",
+ "description": "Kernel version Asterisk was built on."
+ },
+ "options": {
+ "required": true,
+ "type": "string",
+ "description": "Compile time options, or empty string if default."
+ },
+ "machine": {
+ "required": true,
+ "type": "string",
+ "description": "Machine architecture (x86_64, i686, ppc, etc.)"
+ },
+ "date": {
+ "required": true,
+ "type": "string",
+ "description": "Date and time when Asterisk was built."
+ },
+ "user": {
+ "required": true,
+ "type": "string",
+ "description": "Username that build Asterisk"
+ }
+ }
+ },
+ "SystemInfo": {
+ "id": "SystemInfo",
+ "description": "Info about Asterisk",
+ "properties": {
+ "version": {
+ "required": true,
+ "type": "string",
+ "description": "Asterisk version."
+ },
+ "entity_id": {
+ "required": true,
+ "type": "string",
+ "description": ""
+ }
+ }
+ },
+ "SetId": {
+ "id": "SetId",
+ "description": "Effective user/group id",
+ "properties": {
+ "user": {
+ "required": true,
+ "type": "string",
+ "description": "Effective user id."
+ },
+ "group": {
+ "required": true,
+ "type": "string",
+ "description": "Effective group id."
+ }
+ }
+ },
+ "ConfigInfo": {
+ "id": "ConfigInfo",
+ "description": "Info about Asterisk configuration",
+ "properties": {
+ "name": {
+ "required": true,
+ "type": "string",
+ "description": "Asterisk system name."
+ },
+ "default_language": {
+ "required": true,
+ "type": "string",
+ "description": "Default language for media playback."
+ },
+ "max_channels": {
+ "required": false,
+ "type": "int",
+ "description": "Maximum number of simultaneous channels."
+ },
+ "max_open_files": {
+ "required": false,
+ "type": "int",
+ "description": "Maximum number of open file handles (files, sockets)."
+ },
+ "max_load": {
+ "required": false,
+ "type": "double",
+ "description": "Maximum load avg on system."
+ },
+ "setid": {
+ "required": true,
+ "type": "SetId",
+ "description": "Effective user/group id for running Asterisk."
+ }
+ }
+ },
+ "StatusInfo": {
+ "id": "StatusInfo",
+ "description": "Info about Asterisk status",
+ "properties": {
+ "startup_time": {
+ "required": true,
+ "type": "Date",
+ "description": "Time when Asterisk was started."
+ },
+ "last_reload_time": {
+ "required": true,
+ "type": "Date",
+ "description": "Time when Asterisk was last reloaded."
+ }
+ }
+ },
"AsteriskInfo": {
"id": "AsteriskInfo",
"description": "Asterisk system information",
- "properties": {}
+ "properties": {
+ "build": {
+ "required": false,
+ "type": "BuildInfo",
+ "description": "Info about how Asterisk was built"
+ },
+ "system": {
+ "required": false,
+ "type": "SystemInfo",
+ "description": "Info about the system running Asterisk"
+ },
+ "config": {
+ "required": false,
+ "type": "ConfigInfo",
+ "description": "Info about Asterisk configuration"
+ },
+ "status": {
+ "required": false,
+ "type": "StatusInfo",
+ "description": "Info about Asterisk status"
+ }
+ }
},
"Variable": {
"id": "Variable",