| 
									
										
										
										
											2014-01-14 23:44:57 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	"_copyright": "Copyright (C) 2013, Digium, Inc.", | 
					
						
							|  |  |  | 	"_author": "Jonathan Rose <jrose@digium.com>", | 
					
						
							|  |  |  | 	"_svn_revision": "$Revision$", | 
					
						
							| 
									
										
										
										
											2016-11-18 09:46:48 -06:00
										 |  |  | 	"apiVersion": "2.0.0", | 
					
						
							| 
									
										
										
										
											2014-01-14 23:44:57 +00:00
										 |  |  | 	"swaggerVersion": "1.1", | 
					
						
							| 
									
										
										
										
											2014-09-20 23:41:55 +00:00
										 |  |  | 	"basePath": "http://localhost:8088/ari", | 
					
						
							| 
									
										
										
										
											2014-01-14 23:44:57 +00:00
										 |  |  | 	"resourcePath": "/api-docs/mailboxes.{format}", | 
					
						
							| 
									
										
										
										
											2018-01-18 10:01:26 -05:00
										 |  |  | 	"requiresModules": [ | 
					
						
							|  |  |  | 		"res_stasis_mailbox" | 
					
						
							|  |  |  | 	], | 
					
						
							| 
									
										
										
										
											2014-01-14 23:44:57 +00:00
										 |  |  | 	"apis": [ | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			"path": "/mailboxes", | 
					
						
							|  |  |  | 			"description": "Mailboxes", | 
					
						
							|  |  |  | 			"operations": [ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					"httpMethod": "GET", | 
					
						
							|  |  |  | 					"summary": "List all mailboxes.", | 
					
						
							|  |  |  | 					"nickname": "list", | 
					
						
							|  |  |  | 					"responseClass": "List[Mailbox]" | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			] | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			"path": "/mailboxes/{mailboxName}", | 
					
						
							|  |  |  | 			"description": "Mailbox state", | 
					
						
							|  |  |  | 			"operations": [ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					"httpMethod": "GET", | 
					
						
							|  |  |  | 					"summary": "Retrieve the current state of a mailbox.", | 
					
						
							|  |  |  | 					"nickname": "get", | 
					
						
							|  |  |  | 					"responseClass": "Mailbox", | 
					
						
							|  |  |  | 					"parameters": [ | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"name": "mailboxName", | 
					
						
							|  |  |  | 							"description": "Name of the mailbox", | 
					
						
							|  |  |  | 							"paramType": "path", | 
					
						
							|  |  |  | 							"required": true, | 
					
						
							|  |  |  | 							"allowMultiple": false, | 
					
						
							|  |  |  | 							"dataType": "string" | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					], | 
					
						
							|  |  |  | 						"errorResponses": [ | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"code": 404, | 
					
						
							|  |  |  | 							"reason": "Mailbox not found" | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					] | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					"httpMethod": "PUT", | 
					
						
							|  |  |  | 					"summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", | 
					
						
							|  |  |  | 					"nickname": "update", | 
					
						
							|  |  |  | 					"responseClass": "void", | 
					
						
							|  |  |  | 					"parameters": [ | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"name": "mailboxName", | 
					
						
							|  |  |  | 							"description": "Name of the mailbox", | 
					
						
							|  |  |  | 							"paramType": "path", | 
					
						
							|  |  |  | 							"required": true, | 
					
						
							|  |  |  | 							"allowMultiple": false, | 
					
						
							|  |  |  | 							"dataType": "string" | 
					
						
							|  |  |  | 						}, | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"name": "oldMessages", | 
					
						
							|  |  |  | 							"description": "Count of old messages in the mailbox", | 
					
						
							|  |  |  | 							"paramType": "query", | 
					
						
							|  |  |  | 							"required": true, | 
					
						
							|  |  |  | 							"allowMultiple": false, | 
					
						
							|  |  |  | 							"dataType": "int" | 
					
						
							|  |  |  | 						}, | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"name": "newMessages", | 
					
						
							|  |  |  | 							"description": "Count of new messages in the mailbox", | 
					
						
							|  |  |  | 							"paramType": "query", | 
					
						
							|  |  |  | 							"required": true, | 
					
						
							|  |  |  | 							"allowMultiple": false, | 
					
						
							|  |  |  | 							"dataType": "int" | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					], | 
					
						
							|  |  |  | 				        "errorResponses": [ | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"code": 404, | 
					
						
							|  |  |  | 							"reason": "Mailbox not found" | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					] | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					"httpMethod": "DELETE", | 
					
						
							|  |  |  | 					"summary": "Destroy a mailbox.", | 
					
						
							|  |  |  | 					"nickname": "delete", | 
					
						
							|  |  |  | 					"responseClass": "void", | 
					
						
							|  |  |  | 					"parameters": [ | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"name": "mailboxName", | 
					
						
							|  |  |  | 							"description": "Name of the mailbox", | 
					
						
							|  |  |  | 							"paramType": "path", | 
					
						
							|  |  |  | 							"required": true, | 
					
						
							|  |  |  | 							"allowMultiple": false, | 
					
						
							|  |  |  | 							"dataType": "string" | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					], | 
					
						
							|  |  |  | 				        "errorResponses": [ | 
					
						
							|  |  |  | 						{ | 
					
						
							|  |  |  | 							"code": 404, | 
					
						
							|  |  |  | 							"reason": "Mailbox not found" | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					] | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			] | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | 	"models": { | 
					
						
							|  |  |  | 		"Mailbox": { | 
					
						
							|  |  |  | 			"id": "Mailbox", | 
					
						
							|  |  |  | 			"description": "Represents the state of a mailbox.", | 
					
						
							|  |  |  | 			"properties": { | 
					
						
							|  |  |  | 				"name": { | 
					
						
							|  |  |  | 					"type": "string", | 
					
						
							|  |  |  | 					"description": "Name of the mailbox.", | 
					
						
							|  |  |  | 					"required": true | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				"old_messages": { | 
					
						
							|  |  |  | 					"type": "int", | 
					
						
							|  |  |  | 					"description": "Count of old messages in the mailbox.", | 
					
						
							|  |  |  | 					"required": true | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				"new_messages": { | 
					
						
							|  |  |  | 					"type": "int", | 
					
						
							|  |  |  | 					"description": "Count of new messages in the mailbox.", | 
					
						
							|  |  |  | 					"required": true | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |