DEVELOPERS BLOG

Call UEM REST API’s Remotely AND Securely

CODE SAMPLES / 09.16.20 / Ed Bourne

The ability to access On-Premise BlackBerry UEM web services through the BlackBerry infrastructure was released with BlackBerry UEM 12.12 (and its sister release on BlackBerry UEM Cloud) [MS1] earlier this year.  From my personal home computer, and I can contact my UEM instance, remotely and securely, very handy if you want to check something without having to VPN in.[MS2]   But the real use case is for 3rd party vendors who have a solution that connects their server to your server.  They no longer have to co-locate their server with UEM or setup a complicated DMZ solution.  I have a had a few questions about it, so I thought I would share some details.

Details on remote REST API access can be found in the Web Services getting started guide.   Scroll down to examples and you will find this:

Access On-Premise UEM web service securely

To access On-Premise web services using BlackBerry Infrastructure proxy, you must provide the extra proxy information in the request

curl --proxy http://proxyserverhost:proxyserverport \
--proxy-header "Tenant-Id: SRP00000" \
--proxy-header "Origin-Server-Id: bws" \
-s -k
https://server01:18084/SRP00000/api/v1/util/ping

This example adds three extra items to an otherwise standard ping REST API call.

--proxy http://proxyserverhost:proxyserverport
This can vary based on your region, ask your admin.  It will look something like this:
  ca.bbesecure.com:443
  us.bbesecure.com:443
  nl.bbesecure.com:443
  hk.bbsecure.com:443

--proxy-header "Tenant-Id: SRP00000"
               The Tenant-ID is the same as your SRPID, and this line should have the same value as the last, ie SRP00000 in our example here.

--proxy-header "Origin-Server-Id: bws"
               There are no options on this, for now, this is just what you put in.

There is a simple way to get all this info.  Simply look at an activation email for the server you want to contact.  I’ve highlighted the relevant part below:

Ed Bourne,

            Your administrator has enabled your mobile device for BlackBerry UEM. To activate your device you need some or all of the following information:

                Your work email address:
                ed@myserver.blackberry.com

                Server name:
                bcp://CA.bbsecure.com:443/SRP00000

                Activation username:
                ed@myserver.blackberry.com

                Your device activation password:
                Your activation password will be delivered in a separate email.

So now, just fill in the blanks, and curl/postman/whatever away!

Ed Bourne

About Ed Bourne

Ed Bourne brings over 10 years of experience in mobility as a Sr. Enterprise Solutions Manager at BlackBerry. Ed manages the technical partnerships with some of our largest Strategic Partners and Customers, helping to foster BlackBerry expertise and bring a compelling mobile experience to our joint customers.