mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user