mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
ARI: Rotate log channels.
An http request can be sent to rotate a specified log channel. If the channel does not exist, an error response will be returned. The command "curl -v -u user:pass -X PUT 'http://localhost:8088 /ari/asterisk/logging/logChannelName/rotate'" can be run in the terminal to access this new functionality. * Added the ability to rotate log files through ARI ASTERISK-25252 Change-Id: Iaefa21cbbc1b29effb33004ee3d89c977e76ab01
This commit is contained in:
committed by
Benjamin Keith Ford
parent
d61ea4bcc2
commit
1f02d20da4
@@ -296,6 +296,34 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/asterisk/logging/{logChannelName}/rotate",
|
||||
"description": "Asterisk log channel",
|
||||
"operations": [
|
||||
{
|
||||
"httpMethod": "PUT",
|
||||
"summary": "Rotates a log channel.",
|
||||
"nickname": "rotateLog",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "logChannelName",
|
||||
"description": "Log channel's name",
|
||||
"paramType": "path",
|
||||
"required": true,
|
||||
"allowMultiple": false,
|
||||
"dataType": "string"
|
||||
}
|
||||
],
|
||||
"errorResponses": [
|
||||
{
|
||||
"code": 404,
|
||||
"reason": "Log channel does not exist."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/asterisk/variable",
|
||||
"description": "Global variables",
|
||||
@@ -533,6 +561,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"LogChannel": {
|
||||
"id": "LogChannel",
|
||||
"description": "Details of an Asterisk log channel",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The log channel path",
|
||||
"required": true
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Types of logs for the log channel",
|
||||
"required": true
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "Whether or not a log type is enabled",
|
||||
"required": true
|
||||
},
|
||||
"configuration": {
|
||||
"type": "string",
|
||||
"description": "The various log levels",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"Variable": {
|
||||
"id": "Variable",
|
||||
"description": "The value of a channel variable",
|
||||
|
Reference in New Issue
Block a user