ARI: Rotate log channels.
[asterisk/asterisk.git] / rest-api / api-docs / asterisk.json
index 2705f45..5109419 100644 (file)
                        ]
                },
                {
+                       "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",
                        "operations": [
                                }
                        }
                },
+               "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",