Plantronics Developer Connection - realtime streams partner https://developer.plantronics.com/blog/realtime-streams-partner en Streams API https://developer.plantronics.com/article/streams-api <div class="field field-name-field-keywords field-type-taxonomy-term-reference field-label-above"> <div class="field-label">Keywords:&nbsp;</div> <div class="field-items"> <span class="field-item even label label-default keyword-label"><a href="/blog/realtime-streams-partner" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">realtime streams partner</a></span> </div> </div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">This article discusses how a partner using Plantronics(PLT) /Streams api can get events streams available for them at PLT tenant level and get metadata needed to listen for events streams from them as well as start and stop stream requests for a tenant. </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255); min-height: 8pt;"> </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">The following sequence of API calls will illustrate the API interactions needed to establish a real time stream:</p> <ol style="margin: 0px; padding: 0px 0px 0px 30px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"> <li style="margin: 0.2em 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; list-style-type: inherit;">Once a partner has registered using partner provisioning APIs on to PLT cloud entitlement, partners will be given a id similar to. All APIs calls to PLT with a partner_id header. (partner_id: &lt;ID)). This will be used by the APIs to identify the partner.</li> <li style="margin: 0.2em 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; list-style-type: inherit;"> On Swagger UI, the following APIs should show up (under 'streams'):</li> </ol> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"><a href="https://wave.plantronics.com/servlet/JiveServlet/showImage/38-5461-103850/Screen+Shot+2016-10-11+at+11.23.08+AM.png" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; color: rgb(94, 106, 113); fill: rgb(94, 106, 113); text-decoration-line: none; transition: color 0.1s linear;"><img alt="" class="image-1 jive-image j-img-original" height="606" src="https://wave.plantronics.com/servlet/JiveServlet/downloadImage/38-5461-103850/Screen+Shot+2016-10-11+at+11.23.08+AM.png" style="margin: 2px 0px 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; max-width: 100%; height: 349px; width: 620px;" width="1076" /></a></p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">3. Get access to all streams available by tenant will be as below:</p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline;">curl -X GET -H "Content-Type: application/json" -H "charset: UTF-8" -H "partner_id: e69130ce-64db-4d9d-805e-e3738bde4dd5" -H "Cache-Control: no-cache" -H "Postman-Token: 613bf921-02c9-83bb-3b53-3ae0a84ab0a3" "</span><a class="jive-link-external-small" href="http://localhost:8090/v1/realtime/streams" rel="nofollow" style="margin: 0px; padding: 0px calc(12px + 0.35ex) 0px 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; color: rgb(94, 106, 113); fill: rgb(94, 106, 113); text-decoration-line: none; transition: color 0.1s linear;">http://localhost:8090/v1/realtime/streams</a><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline;">"</span></p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">The reponse seen on Swagger UI here:</p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255); min-height: 8pt;"> </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">The above response contains the id for the subscription, the tenant name, id and stream name and id. </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">4. Next, the partner can get more metadata for requesting a start for a stream.  Header : partner id &amp; path paramter stream id obtained from the previous call. The response contains  </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"><em style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-family: inherit; vertical-align: baseline;"><span style="margin: 0px; padding: 0px; border: 0px; font-weight: 700; font-style: inherit; font-family: inherit; vertical-align: baseline;">Curl:</span></em></p> <pre style="margin-top: 5px; margin-bottom: 0px; padding: 10px; border: 1px solid rgb(229, 224, 198); font-size: 0.9em; vertical-align: baseline; overflow-x: auto; background-color: rgb(252, 246, 219);"> curl -X GET --header 'Accept: application/json' --header 'partner_id: e69130ce-64db-4d9d-805e-e3738bde4dd5' 'http://localhost:8090/v1/realtime/streams/<span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-size: 13.5px; font-family: inherit; vertical-align: baseline; color: rgb(255, 0, 0);">3e39258f-c888-4cfa-a6d1-63f4ccb77ac7</span>'</pre> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"><a href="https://wave.plantronics.com/servlet/JiveServlet/showImage/38-5461-103857/Screen+Shot+2016-10-11+at+1.32.23+PM.png" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; color: rgb(94, 106, 113); fill: rgb(94, 106, 113); text-decoration-line: none; transition: color 0.1s linear;"><img alt="" class="image-2 jive-image j-img-original" height="545" src="https://wave.plantronics.com/servlet/JiveServlet/downloadImage/38-5461-103857/Screen+Shot+2016-10-11+at+1.32.23+PM.png" style="margin: 2px 0px 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; max-width: 100%; height: 493px; width: 620px;" width="684" /></a></p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255); min-height: 8pt;"> </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">{<br /> "typeId": "3e39258f-c888-4cfa-a6d1-63f4ccb77ac7",<br /> "streamName": "QUICKDISCONNECT",<br /> "notificationType": "pubnub",<br /> "pubKey": null,<br /> "subKey": "sub-c-cf5b662a-0da9-11e6-996b-0619f8945a4f",<br /> "pubChannel": null,<br /> "subChannel": [<br /> "e69130ce-64db-4d9d-805e-e3738bde4dd5_sub1"<br /> ],<br /> "isPublishOnly": false,<br /> "isSubscribeOnly": false,<br /> "partnerId": "e69130ce-64db-4d9d-805e-e3738bde4dd5",<br /> "tenantId": "dc560b50-9e20-41b9-a76b-d32ebfbdcd7a"<br /> }</p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255); min-height: 8pt;"> </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">The above <span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline;">subKey</span> should be used by partner application for subscribing to a pub nub channel under <span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline;">subChannel list. </span></p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255); min-height: 8pt;"> </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">5. Next step, is to initiate starting the event stream ingestion to the PLT Cloud :</p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"><span style="margin: 0px; padding: 0px; border: 0px; font-weight: 700; font-style: inherit; font-family: inherit; vertical-align: baseline;"><a href="https://wave.plantronics.com/servlet/JiveServlet/showImage/38-5461-103858/Screen+Shot+2016-10-11+at+1.37.03+PM.png" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; color: rgb(94, 106, 113); fill: rgb(94, 106, 113); text-decoration-line: none; transition: color 0.1s linear;"><img alt="" class="image-3 jive-image j-img-original" height="409" src="https://wave.plantronics.com/servlet/JiveServlet/downloadImage/38-5461-103858/Screen+Shot+2016-10-11+at+1.37.03+PM.png" style="margin: 2px 0px 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; max-width: 100%; height: 387px; width: 620px;" width="656" /></a>Curl:</span></p> <pre style="margin-top: 5px; margin-bottom: 0px; padding: 10px; border: 1px solid rgb(229, 224, 198); font-size: 0.9em; vertical-align: baseline; overflow-x: auto; background-color: rgb(252, 246, 219);"> curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/xml' --header 'partner_id: e69130ce-64db-4d9d-805e-e3738bde4dd5' 'http://localhost:8090/v1/realtime/streams/3e39258f-c888-4cfa-a6d1-63f4ccb77ac7/start'</pre> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);">This will instantiate PLT cloud to signal Hub for the tenant to start ingesting in real time the specific stream id. A successful response 200 would signify the stream will be started. </p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline;">6. A stop would be close to start semantic. The following screen shot illustrates that:</span></p> <p style="margin: 0px; padding: 0px; border: 0px; font-size: 15px; font-family: &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; word-wrap: break-word; color: rgb(55, 66, 74); background-color: rgb(255, 255, 255);"><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline;"><a href="https://wave.plantronics.com/servlet/JiveServlet/showImage/38-5461-103859/Screen+Shot+2016-10-11+at+1.39.12+PM.png" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; color: rgb(240, 76, 36); fill: rgb(240, 76, 36); transition: color 0.1s linear; outline: none;"><img alt="" class="image-4 jive-image j-img-original" height="468" src="https://wave.plantronics.com/servlet/JiveServlet/downloadImage/38-5461-103859/Screen+Shot+2016-10-11+at+1.39.12+PM.png" style="margin: 2px 0px 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; max-width: 100%; height: 375px; width: 620px;" width="775" /></a></span></p> </div></div></div> Fri, 14 Apr 2017 18:21:33 +0000 mramakrishnan 432 at https://developer.plantronics.com https://developer.plantronics.com/article/streams-api#comments