|
| 1 | +{ |
| 2 | + "_copyright": "Copyright (C) 2013, Digium, Inc.", |
| 3 | + "_author": "David M. Lee, II <[email protected]>", |
| 4 | + "_svn_revision": "$Revision: 400552 $", |
| 5 | + "apiVersion": "0.0.1", |
| 6 | + "swaggerVersion": "1.1", |
| 7 | + "basePath": "http://localhost:8088/stasis", |
| 8 | + "resourcePath": "/api-docs/applications.{format}", |
| 9 | + "apis": [ |
| 10 | + { |
| 11 | + "path": "/applications", |
| 12 | + "description": "Stasis applications", |
| 13 | + "operations": [ |
| 14 | + { |
| 15 | + "httpMethod": "GET", |
| 16 | + "summary": "List all applications.", |
| 17 | + "nickname": "getApplications", |
| 18 | + "responseClass": "List[Application]" |
| 19 | + } |
| 20 | + ] |
| 21 | + }, |
| 22 | + { |
| 23 | + "path": "/applications/{applicationName}", |
| 24 | + "description": "Stasis application", |
| 25 | + "operations": [ |
| 26 | + { |
| 27 | + "httpMethod": "GET", |
| 28 | + "summary": "Get details of an application.", |
| 29 | + "nickname": "getApplication", |
| 30 | + "responseClass": "Application", |
| 31 | + "parameters": [ |
| 32 | + { |
| 33 | + "name": "applicationName", |
| 34 | + "description": "Application's name", |
| 35 | + "paramType": "path", |
| 36 | + "required": true, |
| 37 | + "allowMultiple": false, |
| 38 | + "dataType": "string" |
| 39 | + } |
| 40 | + ], |
| 41 | + "errorResponses": [ |
| 42 | + { |
| 43 | + "code": 404, |
| 44 | + "reason": "Application does not exist." |
| 45 | + } |
| 46 | + ] |
| 47 | + } |
| 48 | + ] |
| 49 | + }, |
| 50 | + { |
| 51 | + "path": "/applications/{applicationName}/subscription", |
| 52 | + "description": "Stasis application", |
| 53 | + "operations": [ |
| 54 | + { |
| 55 | + "httpMethod": "POST", |
| 56 | + "summary": "Subscribe an application to a event source.", |
| 57 | + "notes": "Returns the state of the application after the subscriptions have changed", |
| 58 | + "nickname": "applicationSubscribe", |
| 59 | + "responseClass": "Application", |
| 60 | + "parameters": [ |
| 61 | + { |
| 62 | + "name": "applicationName", |
| 63 | + "description": "Application's name", |
| 64 | + "paramType": "path", |
| 65 | + "required": true, |
| 66 | + "allowMultiple": false, |
| 67 | + "dataType": "string" |
| 68 | + }, |
| 69 | + { |
| 70 | + "name": "eventSource", |
| 71 | + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}", |
| 72 | + "paramType": "query", |
| 73 | + "required": true, |
| 74 | + "allowMultiple": true, |
| 75 | + "dataType": "string" |
| 76 | + } |
| 77 | + ], |
| 78 | + "errorResponses": [ |
| 79 | + { |
| 80 | + "code": 400, |
| 81 | + "reason": "Missing parameter." |
| 82 | + }, |
| 83 | + { |
| 84 | + "code": 404, |
| 85 | + "reason": "Application does not exist." |
| 86 | + }, |
| 87 | + { |
| 88 | + "code": 422, |
| 89 | + "reason": "Event source does not exist." |
| 90 | + } |
| 91 | + ] |
| 92 | + }, |
| 93 | + { |
| 94 | + "httpMethod": "DELETE", |
| 95 | + "summary": "Unsubscribe an application from an event source.", |
| 96 | + "notes": "Returns the state of the application after the subscriptions have changed", |
| 97 | + "nickname": "applicationUnsubscribe", |
| 98 | + "responseClass": "Application", |
| 99 | + "parameters": [ |
| 100 | + { |
| 101 | + "name": "applicationName", |
| 102 | + "description": "Application's name", |
| 103 | + "paramType": "path", |
| 104 | + "required": true, |
| 105 | + "allowMultiple": false, |
| 106 | + "dataType": "string" |
| 107 | + }, |
| 108 | + { |
| 109 | + "name": "eventSource", |
| 110 | + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}", |
| 111 | + "paramType": "query", |
| 112 | + "required": true, |
| 113 | + "allowMultiple": true, |
| 114 | + "dataType": "string" |
| 115 | + } |
| 116 | + ], |
| 117 | + "errorResponses": [ |
| 118 | + { |
| 119 | + "code": 400, |
| 120 | + "reason": "Missing parameter; event source scheme not recognized." |
| 121 | + }, |
| 122 | + { |
| 123 | + "code": 404, |
| 124 | + "reason": "Application does not exist." |
| 125 | + }, |
| 126 | + { |
| 127 | + "code": 409, |
| 128 | + "reason": "Application not subscribed to event source." |
| 129 | + }, |
| 130 | + { |
| 131 | + "code": 422, |
| 132 | + "reason": "Event source does not exist." |
| 133 | + } |
| 134 | + ] |
| 135 | + } |
| 136 | + ] |
| 137 | + } |
| 138 | + ], |
| 139 | + "models": { |
| 140 | + "Application": { |
| 141 | + "id": "Application", |
| 142 | + "description": "Details of a Stasis application", |
| 143 | + "properties": { |
| 144 | + "name": { |
| 145 | + "type": "string", |
| 146 | + "description": "Name of this application", |
| 147 | + "required": true |
| 148 | + }, |
| 149 | + "channel_ids": { |
| 150 | + "type": "List[string]", |
| 151 | + "description": "Id's for channels subscribed to.", |
| 152 | + "required": true |
| 153 | + }, |
| 154 | + "bridge_ids": { |
| 155 | + "type": "List[string]", |
| 156 | + "description": "Id's for bridges subscribed to.", |
| 157 | + "required": true |
| 158 | + }, |
| 159 | + "endpoint_ids": { |
| 160 | + "type": "List[string]", |
| 161 | + "description": "{tech}/{resource} for endpoints subscribed to.", |
| 162 | + "required": true |
| 163 | + } |
| 164 | + } |
| 165 | + } |
| 166 | + } |
| 167 | +} |
0 commit comments