api specifics needed

  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members.

I am completing up my evaluation of the Rise Vision software to see if it meets our university's needs.  One checkbox on all new software we have been purchasing is that it be easily API accessible.  Me and most of my techs utilize PowerShell as our language of choice for its ease of quickly creating code that is concise and readable.

Some of the things I have done:
1. I have read the developer documentation at https://help.risevision.com/developer
2. I have read through many of the articles that return from a search for API in the User Forums
3. I have gone to https://cloud.google.com/console/project and obtained a Google OAuth2 client id.
4. I have registered my app at https://developer.risevision.com/apps/list

I have gone through and created PowerShell code to match the methods that we have used to connect to about 8 other software companies we deal with, but it has not quite worked for Rise Vision.  Your solution as mentioned in some of the user forum articles shows REST like code and other code that apparently is Javascript dependents.  It is very hard to tell what is current and supported, versus what has been deprecated.

$company_Id      = "<our company id>"
$client_Id = "<our client id>"
$client_secret = "<our client secret>" ## Variables ############################################################################################################################ $DebugPreference = "Continue" # Continue = Display Debugging Info $unencoded_scope = "https://www.googleapis.com/auth/userinfo.email" # https://www.googleapis.com/auth/userinfo.profile" # https://www.googleapis.com/auth/devstorage.full_control" $scope = [System.Web.HttpUtility]::UrlEncode($unencoded_scope) $unencoded_redirect_uri = "http://www.lsus.edu" $redirect_uri = [System.Web.HttpUtility]::UrlEncode($unencoded_redirect_uri) $googleapiurl = "https://accounts.google.com/o/oauth2" $authcodeurl = "$googleapiurl/auth?scope=$scope&response_type=code&redirect_uri=$redirect_uri&client_id=$client_Id&access_type=offline&approval_prompt=force" $storageapiurl = "https://storage-dot-rvaserver2.appspot.com/_ah/api/storage/v0.01" $coreapiurl = "https://rvacore-test.appspot.com/_ah/api/core/v1"
 <Leaving out the authentication code grant and the exchange for the Access Token>
#storage.files.get  (GET)   WORKS!!!!!! But only because.... Authorization Not Required
############################################################################################################################
$foldername = "MyImages" #Leave blank to get Root files/folders
$result = $null
$restheaders = @{}
$restheaders.Add("Authorization", "Bearer $access_token")
try {
$result = Invoke-RestMethod -Method Get -Uri "$storageapiurl/files?companyId=$company_Id&folder=$foldername" -Headers $restheaders -ContentType "application/json"
     } 
catch {Report-Failure}
$result.files | Select-Object name,timeCreated | Format-Table
#core.presentation.list DOESNT WORK
############################################################################################################################
$result = $null
$restheaders = @{}
$restheaders.Add("Authorization", "Bearer $access_token")
$Body  = @{ 
    companyId=$company_Id  
    }
$json = $Body | ConvertTo-Json
try {
$result = Invoke-RestMethod -Method Post -Uri "https://rvaserver2.appspot.com/_ah/api/core/v1/listPresentation" -Headers $restheaders -ContentType "application/json" -Body $json
    }
catch { Report-Failure} 
$result
So after failing at getting the functions to work, I decided that I would go back to basics and am using Google’s own oauthplaygroud ( https://developers.google.com/oauthplayground ) to attempt to get the appropriate scopes, methods, uris, parameters and body contents sorted out before I try and recode this again.

All of the code examples in the Developer documentation and the Github samples are in very convoluted Javascript and I am trying to get this down to its basics so it is replicatable in PowerShell.

Can you please correct the following?

1.	“core.display.list”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Post
c.	URI = https://rvaserver2.appspot.com/_ah/api/core/v1/listDisplay   maybe?
d.	ContentType = application/json
e.	Body = 
{
    "companyId":  "4dd6936a-ddb4-4c71-ad20-d4b1d26fa58a"
}

2.	“core.display.get”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Post
c.	URI = https://rvaserver2.appspot.com/_ah/api/core/v1/getDisplay  maybe?
d.	ContentType = application/json
e.	Body = 
{
    "id":  "S5RZBGV6YFB7"
}
 

3.	“core.display.restart”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Post
c.	URI = https://rvaserver2.appspot.com/_ah/api/core/v1/restartDisplay   maybe?
d.	ContentType = application/json
e.	Body = 
{
    "id":  "S5RZBGV6YFB7"
}
f.	Role Notes: User must have Display Administrator Role

4.	“core.presentation.list”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Post
c.	URI = https://rvaserver2.appspot.com/_ah/api/core/v1/listPresentation  maybe?
d.	ContentType = application/json
e.	Body = 
{
    "companyId":  "4dd6936a-ddb4-4c71-ad20-d4b1d26fa58a"
}
 

5.	“core.presentation.get”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Post
c.	URI = https://rvaserver2.appspot.com/_ah/api/core/v1/getPresentation    maybe?
d.	ContentType = application/json
e.	Body = 
{
    "id":  "32b2598b-5809-43c1-b01a-25050292bf39"
}

6.	“core.presentation.patch”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Patch (Maybe?)
c.	URI = https://rvaserver2.appspot.com/_ah/api/core/v1/patchPresentation  maybe?
d.	ContentType = application/json
e.	Body = 
{
    "id":  "32b2598b-5809-43c1-b01a-25050292bf39"
    “data”:  “<insert the JSON containing changed fields here>”
}
f.	Role Notes: User must have Content Publisher or Content Editor Role
 

7.	“core.presentation.publish”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Post
c.	URI = https://rvaserver2.appspot.com/_ah/api/core/v1/restartDisplay   maybe?
d.	ContentType = application/json
e.	Body = 
{
    "id":  "32b2598b-5809-43c1-b01a-25050292bf39"
}
f.	Role Notes: User must have Content Publisher Role

8.	“storage.files.get”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Get
c.	URI = https://storage-dot-rvaserver2.appspot.com/_ah/api/storage/v0.01/files?companyId=4dd6936a-ddb4-4c71-ad20-d4b1d26fa58a&folder=””
d.	ContentType = application/json
e.	Body = None
f.	
9.	“storage.createFolder”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Post
c.	URI = https://storage-dot-rvaserver2.appspot.com/_ah/api/storage/v0.01/folder?companyId=4dd6936a-ddb4-4c71-ad20-d4b1d26fa58a&folder=Myfolder
d.	ContentType = application/json
e.	Body =  (Listed as a Post in the API spec, but example shows paremeters in GET format on the URI line)
{
    "companyId":  "4dd6936a-ddb4-4c71-ad20-d4b1d26fa58a"
    “folder”: “Myfolder”
}
 
10.	“storage.getResumableUploadURI”
a.	Scope(s) = https://www.googleapis.com/auth/userinfo.email
b.	Method = Get
c.	URI = https://storage-dot-rvaserver2.appspot.com/_ah/api/storage/v0.01/getUploadURI?companyId=4dd6936a-ddb4-4c71-ad20-d4b1d26fa58a&fileName=myPic.png&fileType=image/png
d.	ContentType = application/json
e.	Body =  None

Thank you for your time and assistance in this!
Scott
Photo of Scott Hardwick

Scott Hardwick

  • 126 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Robb

Robb, Official Rep

  • 76,676 Points 50k badge 2x thumb
Scott,

The API's are provided as is and usage is supported by the community. We will investigate and fix eventual API issues but we don't support and will not investigate custom/users code. We know that documentation is not great but we don't have capacity to address that right now.

Thanks!

Photo of Scott Hardwick

Scott Hardwick

  • 126 Points 100 badge 2x thumb
Robb,

Wow... This is totally different than what you have seemed to convey in our five emails back and forth about getting the developers to assist and how I needed to post it here for them to assist.
I am very disappointed in this response and now with this company.
Scott