| 1 | { |
| 2 | "_copyright": "Copyright (C) 2013, Digium, Inc.", |
| 3 | "_author": "Jonathan Rose <[email protected]>", |
| 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 | "since": [ |
| 10 | "12.1.0" |
| 11 | ], |
| 12 | "requiresModules": [ |
| 13 | "res_stasis_mailbox" |
| 14 | ], |
| 15 | "apis": [ |
| 16 | { |
| 17 | "path": "/mailboxes", |
| 18 | "description": "Mailboxes", |
| 19 | "operations": [ |
| 20 | { |
| 21 | "httpMethod": "GET", |
| 22 | "since": [ |
| 23 | "12.1.0" |
| 24 | ], |
| 25 | "summary": "List all mailboxes.", |
| 26 | "nickname": "list", |
| 27 | "responseClass": "List[Mailbox]" |
| 28 | } |
| 29 | ] |
| 30 | }, |
| 31 | { |
| 32 | "path": "/mailboxes/{mailboxName}", |
| 33 | "description": "Mailbox state", |
| 34 | "operations": [ |
| 35 | { |
| 36 | "httpMethod": "GET", |
| 37 | "since": [ |
| 38 | "12.1.0" |
| 39 | ], |
| 40 | "summary": "Retrieve the current state of a mailbox.", |
| 41 | "nickname": "get", |
| 42 | "responseClass": "Mailbox", |
| 43 | "parameters": [ |
| 44 | { |
| 45 | "name": "mailboxName", |
| 46 | "description": "Name of the mailbox", |
| 47 | "paramType": "path", |
| 48 | "required": true, |
| 49 | "allowMultiple": false, |
| 50 | "dataType": "string" |
| 51 | } |
| 52 | ], |
| 53 | "errorResponses": [ |
| 54 | { |
| 55 | "code": 404, |
| 56 | "reason": "Mailbox not found" |
| 57 | } |
| 58 | ] |
| 59 | }, |
| 60 | { |
| 61 | "httpMethod": "PUT", |
| 62 | "since": [ |
| 63 | "12.1.0" |
| 64 | ], |
| 65 | "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", |
| 66 | "nickname": "update", |
| 67 | "responseClass": "void", |
| 68 | "parameters": [ |
| 69 | { |
| 70 | "name": "mailboxName", |
| 71 | "description": "Name of the mailbox", |
| 72 | "paramType": "path", |
| 73 | "required": true, |
| 74 | "allowMultiple": false, |
| 75 | "dataType": "string" |
| 76 | }, |
| 77 | { |
| 78 | "name": "oldMessages", |
| 79 | "description": "Count of old messages in the mailbox", |
| 80 | "paramType": "query", |
| 81 | "required": true, |
| 82 | "allowMultiple": false, |
| 83 | "dataType": "int" |
| 84 | }, |
| 85 | { |
| 86 | "name": "newMessages", |
| 87 | "description": "Count of new messages in the mailbox", |
| 88 | "paramType": "query", |
| 89 | "required": true, |
| 90 | "allowMultiple": false, |
| 91 | "dataType": "int" |
| 92 | } |
| 93 | ], |
| 94 | "errorResponses": [ |
| 95 | { |
| 96 | "code": 404, |
| 97 | "reason": "Mailbox not found" |
| 98 | } |
| 99 | ] |
| 100 | }, |
| 101 | { |
| 102 | "httpMethod": "DELETE", |
| 103 | "since": [ |
| 104 | "12.1.0" |
| 105 | ], |
| 106 | "summary": "Destroy a mailbox.", |
| 107 | "nickname": "delete", |
| 108 | "responseClass": "void", |
| 109 | "parameters": [ |
| 110 | { |
| 111 | "name": "mailboxName", |
| 112 | "description": "Name of the mailbox", |
| 113 | "paramType": "path", |
| 114 | "required": true, |
| 115 | "allowMultiple": false, |
| 116 | "dataType": "string" |
| 117 | } |
| 118 | ], |
| 119 | "errorResponses": [ |
| 120 | { |
| 121 | "code": 404, |
| 122 | "reason": "Mailbox not found" |
| 123 | } |
| 124 | ] |
| 125 | } |
| 126 | ] |
| 127 | } |
| 128 | ], |
| 129 | "models": { |
| 130 | "Mailbox": { |
| 131 | "id": "Mailbox", |
| 132 | "description": "Represents the state of a mailbox.", |
| 133 | "properties": { |
| 134 | "name": { |
| 135 | "type": "string", |
| 136 | "description": "Name of the mailbox.", |
| 137 | "required": true |
| 138 | }, |
| 139 | "old_messages": { |
| 140 | "type": "int", |
| 141 | "description": "Count of old messages in the mailbox.", |
| 142 | "required": true |
| 143 | }, |
| 144 | "new_messages": { |
| 145 | "type": "int", |
| 146 | "description": "Count of new messages in the mailbox.", |
| 147 | "required": true |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | } |