Merge "bridging: Add better support for adding/removing streams."
[asterisk/asterisk.git] / rest-api / api-docs / mailboxes.json
1 {
2         "_copyright": "Copyright (C) 2013, Digium, Inc.",
3         "_author": "Jonathan Rose <jrose@digium.com>",
4         "_svn_revision": "$Revision$",
5         "apiVersion": "2.0.0",
6         "swaggerVersion": "1.1",
7         "basePath": "http://localhost:8088/ari",
8         "resourcePath": "/api-docs/mailboxes.{format}",
9         "requiresModules": [
10                 "res_stasis_mailbox"
11         ],
12         "apis": [
13                 {
14                         "path": "/mailboxes",
15                         "description": "Mailboxes",
16                         "operations": [
17                                 {
18                                         "httpMethod": "GET",
19                                         "summary": "List all mailboxes.",
20                                         "nickname": "list",
21                                         "responseClass": "List[Mailbox]"
22                                 }
23                         ]
24                 },
25                 {
26                         "path": "/mailboxes/{mailboxName}",
27                         "description": "Mailbox state",
28                         "operations": [
29                                 {
30                                         "httpMethod": "GET",
31                                         "summary": "Retrieve the current state of a mailbox.",
32                                         "nickname": "get",
33                                         "responseClass": "Mailbox",
34                                         "parameters": [
35                                                 {
36                                                         "name": "mailboxName",
37                                                         "description": "Name of the mailbox",
38                                                         "paramType": "path",
39                                                         "required": true,
40                                                         "allowMultiple": false,
41                                                         "dataType": "string"
42                                                 }
43                                         ],
44                                                 "errorResponses": [
45                                                 {
46                                                         "code": 404,
47                                                         "reason": "Mailbox not found"
48                                                 }
49                                         ]
50                                 },
51                                 {
52                                         "httpMethod": "PUT",
53                                         "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).",
54                                         "nickname": "update",
55                                         "responseClass": "void",
56                                         "parameters": [
57                                                 {
58                                                         "name": "mailboxName",
59                                                         "description": "Name of the mailbox",
60                                                         "paramType": "path",
61                                                         "required": true,
62                                                         "allowMultiple": false,
63                                                         "dataType": "string"
64                                                 },
65                                                 {
66                                                         "name": "oldMessages",
67                                                         "description": "Count of old messages in the mailbox",
68                                                         "paramType": "query",
69                                                         "required": true,
70                                                         "allowMultiple": false,
71                                                         "dataType": "int"
72                                                 },
73                                                 {
74                                                         "name": "newMessages",
75                                                         "description": "Count of new messages in the mailbox",
76                                                         "paramType": "query",
77                                                         "required": true,
78                                                         "allowMultiple": false,
79                                                         "dataType": "int"
80                                                 }
81                                         ],
82                                         "errorResponses": [
83                                                 {
84                                                         "code": 404,
85                                                         "reason": "Mailbox not found"
86                                                 }
87                                         ]
88                                 },
89                                 {
90                                         "httpMethod": "DELETE",
91                                         "summary": "Destroy a mailbox.",
92                                         "nickname": "delete",
93                                         "responseClass": "void",
94                                         "parameters": [
95                                                 {
96                                                         "name": "mailboxName",
97                                                         "description": "Name of the mailbox",
98                                                         "paramType": "path",
99                                                         "required": true,
100                                                         "allowMultiple": false,
101                                                         "dataType": "string"
102                                                 }
103                                         ],
104                                         "errorResponses": [
105                                                 {
106                                                         "code": 404,
107                                                         "reason": "Mailbox not found"
108                                                 }
109                                         ]
110                                 }
111                         ]
112                 }
113         ],
114         "models": {
115                 "Mailbox": {
116                         "id": "Mailbox",
117                         "description": "Represents the state of a mailbox.",
118                         "properties": {
119                                 "name": {
120                                         "type": "string",
121                                         "description": "Name of the mailbox.",
122                                         "required": true
123                                 },
124                                 "old_messages": {
125                                         "type": "int",
126                                         "description": "Count of old messages in the mailbox.",
127                                         "required": true
128                                 },
129                                 "new_messages": {
130                                         "type": "int",
131                                         "description": "Count of new messages in the mailbox.",
132                                         "required": true
133                                 }
134                         }
135                 }
136         }
137 }