Asterisk-13-Events-REST-API_29394320.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Asterisk Project : Asterisk 13 Events REST API</title>
  5. <link rel="stylesheet" href="styles/site.css" type="text/css" />
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. </head>
  8. <body class="theme-default aui-theme-default">
  9. <div id="page">
  10. <div id="main" class="aui-page-panel">
  11. <div id="main-header">
  12. <div id="breadcrumb-section">
  13. <ol id="breadcrumbs">
  14. <li class="first">
  15. <span><a href="index.html">Asterisk Project</a></span>
  16. </li>
  17. <li>
  18. <span><a href="Asterisk-13-Command-Reference_29394274.html">Asterisk 13 Command Reference</a></span>
  19. </li>
  20. <li>
  21. <span><a href="Asterisk-13-ARI_29394283.html">Asterisk 13 ARI</a></span>
  22. </li>
  23. </ol>
  24. </div>
  25. <h1 id="title-heading" class="pagetitle">
  26. <span id="title-text">
  27. Asterisk Project : Asterisk 13 Events REST API
  28. </span>
  29. </h1>
  30. </div>
  31. <div id="content" class="view">
  32. <div class="page-metadata">
  33. Created by <span class='author'> wikibot</span> on Aug 08, 2014
  34. </div>
  35. <div id="main-content" class="wiki-content group">
  36. <h1 id="Asterisk13EventsRESTAPI-Events">Events</h1>
  37. <div class="table-wrap"><table class="confluenceTable"><tbody>
  38. <tr>
  39. <th class="confluenceTh"><p> Method </p></th>
  40. <th class="confluenceTh"><p> Path </p></th>
  41. <th class="confluenceTh"><p> Return Model </p></th>
  42. <th class="confluenceTh"><p> Summary </p></th>
  43. </tr>
  44. <tr>
  45. <td class="confluenceTd"><p> GET </p></td>
  46. <td class="confluenceTd"><p> <a href="Asterisk-13-Events-REST-API_29394320.html">/events</a> </p></td>
  47. <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Message">Message</a> </p></td>
  48. <td class="confluenceTd"><p> WebSocket connection for events. </p></td>
  49. </tr>
  50. <tr>
  51. <td class="confluenceTd"><p> POST </p></td>
  52. <td class="confluenceTd"><p> <a href="Asterisk-13-Events-REST-API_29394320.html">/events/user/{eventName}</a> </p></td>
  53. <td class="confluenceTd"><p> void </p></td>
  54. <td class="confluenceTd"><p> Generate a user event. </p></td>
  55. </tr>
  56. </tbody></table></div>
  57. <p><span class="confluence-anchor-link" id="Asterisk13EventsRESTAPI-eventWebsocket"></span></p>
  58. <h2 id="Asterisk13EventsRESTAPI-GET/events">GET /events</h2>
  59. <p>WebSocket connection for events.</p>
  60. <h3 id="Asterisk13EventsRESTAPI-Queryparameters">Query parameters</h3>
  61. <ul>
  62. <li>app: string - <strong>(required)</strong> Applications to subscribe to.
  63. <ul>
  64. <li>Allows comma separated values.</li>
  65. </ul>
  66. </li>
  67. </ul>
  68. <p><span class="confluence-anchor-link" id="Asterisk13EventsRESTAPI-userEvent"></span></p>
  69. <h2 id="Asterisk13EventsRESTAPI-POST/events/user/{eventName}">POST /events/user/{eventName}</h2>
  70. <p>Generate a user event.</p>
  71. <h3 id="Asterisk13EventsRESTAPI-Pathparameters">Path parameters</h3>
  72. <ul>
  73. <li>eventName: string - Event name</li>
  74. </ul>
  75. <h3 id="Asterisk13EventsRESTAPI-Queryparameters.1">Query parameters</h3>
  76. <ul>
  77. <li>application: string - <strong>(required)</strong> The name of the application that will receive this event</li>
  78. <li>source: string - URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}
  79. <ul>
  80. <li>Allows comma separated values.</li>
  81. </ul>
  82. </li>
  83. </ul>
  84. <h3 id="Asterisk13EventsRESTAPI-Bodyparameter">Body parameter</h3>
  85. <ul>
  86. <li>variables: containers - The &quot;variables&quot; key in the body object holds custom key/value pairs to add to the user event. Ex. { &quot;variables&quot;: { &quot;key&quot;: &quot;value&quot; } }</li>
  87. </ul>
  88. <h3 id="Asterisk13EventsRESTAPI-ErrorResponses">Error Responses</h3>
  89. <ul>
  90. <li>404 - Application does not exist.</li>
  91. <li>422 - Event source not found.</li>
  92. <li>400 - Invalid even tsource URI or userevent data.</li>
  93. </ul>
  94. </div>
  95. </div> </div>
  96. <div id="footer">
  97. <section class="footer-body">
  98. <p>Document generated by Confluence on Aug 11, 2014 13:41</p>
  99. </section>
  100. </div>
  101. </div> </body>
  102. </html>