Core API vs HTTPS/SSL

  • 2
  • Question
  • Updated 4 years ago
  • Answered
I am trying to understand and properly implement the rise vision apis. I have been successful with the core api endpoint; but unsuccessful with the other api which use the https/ssl url GET/POST etc... 

For example: I was trying to make the following call but get a 404 response. I saw a similar post on this but unsure if there was ever a resolution. I believe this call would return information about the DISPLAYS.  I want to be able to call and reset or update a DISPLAY and PRESENTATION.  Do you authenticate these calls similar to core api?  

$.getJSON('https://rvaserver2.appspot.com/v2/company/04cd5409-4e1a-401a-a505-c82332f2e700/displays?callback=?',                      function(data) { 
                    var myJSONText = JSON.stringify(data);
                    alert(myJSONText)
});  

Thanks in advance for guidance. 
  
Photo of Glenn Reese

Glenn Reese

  • 838 Points 500 badge 2x thumb

Posted 4 years ago

  • 2
Photo of Blake Freeman

Blake Freeman, Official Rep

  • 36,116 Points 20k badge 2x thumb
Glenn,

Thanks for the question. I'll alert someone to this thread!
Photo of Alexey

Alexey, Employee

  • 550 Points 500 badge 2x thumb
Hi Glenn,

The "other API" is no longer functional, please use the endpoints to access displays and presentations: http://help.risevision.com/#/develope...
http://help.risevision.com/#/develope...

Regards,
Alexey
Photo of Glenn Reese

Glenn Reese

  • 838 Points 500 badge 2x thumb
That is great news. The endpoint apis seems like a cleaner solution. I am still new to the endpoints;  how would execute a restart on a display? Would this be the core.display.patch function... "Updates the existing Display".   Thanks
Photo of Glenn Reese

Glenn Reese

  • 838 Points 500 badge 2x thumb
Any update on this question? Thank you,

Glenn
Photo of Alexey

Alexey, Employee

  • 550 Points 500 badge 2x thumb
Hi Glenn,

Sorry for the delay in response.

When you say "execute a restart on a display" do you mean "make a display restart at a given time of day" (and have it continue to restart every day at that time until you disable the restart) or "make a display restart once, right now"?

Currently you can do the former (via core.display.patch by setting the value of restartTime to the desired time and restartEnabled to true) but not the latter.

Regards,
Alexey
Photo of Glenn Reese

Glenn Reese

  • 838 Points 500 badge 2x thumb
Hi Alexey,
    I have an app that lets you manage the photo in a widget for a customer. I wanted to be to provide some level of display control and information from the application. At a minimum, understand if display is "online/offline" and ability to "restart"or "stop" via the core api. See below.  

Trying to duplicate this command from the Rise Vision Display page:


And access heart beat "online/offline" status.  I have been able to get the "active/inactive" but that is not an indicator of "online/offline".  


Thanks! 
Photo of Alexey

Alexey, Employee

  • 550 Points 500 badge 2x thumb
Glenn,


I have made the following additions to the API available for beta-testing from rvacore-test.appspot.com:


https://apis-explorer.appspot.com/api... (entering display ID in "id" field and pressing Execute restarts the Player on that display)


https://apis-explorer.appspot.com/api... (entering display ID in "id" field and pressing Execute reboots the PC on that display)


https://apis-explorer.appspot.com/api... (field "connected" is "true" when the display is online and "false" when the display is offline)


I believe these should address your needs. Please let me know if you encounter any issues.


Regards,

Alexey
(Edited)
Photo of Glenn Reese

Glenn Reese

  • 838 Points 500 badge 2x thumb
Thank you! I will check it out. 
Photo of Glenn Reese

Glenn Reese

  • 838 Points 500 badge 2x thumb
All my content is on http://rva.risevision.com/...   I do see the "connect" field being returned with core.display.list/get. That does look correct. But I am unable to call gapi.client.core.display.restart(parameters) within https://rvaserver2.appspot.com.  I get function not found.  I don't seem to have access to the beta platform to generate any information or content (company/display) to verify.  

Thanks,
   Glenn
Photo of Blake Freeman

Blake Freeman, Official Rep

  • 36,116 Points 20k badge 2x thumb
Glenn,

These changes have just been QA'd and deployed to our production server. Can you try them from there?

Thanks!
Photo of Glenn Reese

Glenn Reese

  • 838 Points 500 badge 2x thumb
Hi Blake - I confirmed core.display.get/list is properly flagging "connection" field with true/false based on online status.  I have also confirmed "restart" is working properly.  The api returned the following jsonData: {  "item": "Display restart has been initiated.",
  "kind": "core#displayItem",....  

Thanks again for the quick response. Much appreciated!