cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
960
Views
0
Helpful
1
Replies
Highlighted
Beginner

Using CMX API and authorization

Dear all,

I am new to this cisco cmx and I am currently creating a mobile app to call the cmx reference API for a project.

Firstly, does anyone has a sample code or a tutorial that could teach me how to call the cisco cmx reference API ? I am currently using android studio to develop the mobile applications and I am currently having trouble in the coding area as to how to call the cmx reference API.

Secondly, apart from android studio,  I have also use  web based app developing client such as the appery.io. This is due to the fact that web based app developing client has lesser coding which is beneficiary for me as I have only couple weeks to develop this app. However, in the case of developing app on the web based develop client, whenever I tried testing the cisco cmx reference API such as the "GET: All Users in the System" it will always result in "CMX: System error".

Based on the msesandbox website, I have notice that the sample rest code provided to interact with REST API require a username and password. Thus, correct me if I am wrong, it is require to have a user authentication before enabling to call the cisco cmx reference API ? If so, how can I go about calling cisco cmx reference API on web based app developing client such as the appery.io ?

Much appreciated if anyone could help me out.  Thank You.

1 REPLY 1
Highlighted
Frequent Contributor

Hi,

There is a new document https://developer.cisco.com/site/cmx-mobility-services/documents/cmx-rest-api-getting-started-guide/index.gsp on the Cisco DevNet CMX home page under Documents.

Regarding CMX: System error, user authentication is required.  The Cisco DevNet sandboxes use learning/learning for username/password.

To send queries to the Cisco MSE, you require a username and password. These credentials are required to create a base64 encoded string. After successful authentication, request are sent using the HTTP method (GET, PUT, POST, DELETE).

The following is the workflow for REST API:

  1. Authentication is sent from the client side, before initiating the request using the Authorization header.
  2. Combine the username and password credentials to form a sting " username:password".
  3. Use Base64 to encode the resulting string literal.
  4. Add an authorization method, a space and the staring "Basic" before the encoded string.

For example, if the user agent uses 'learning' as username and 'learning' as password then the header is formed as follows:

Cisco CMX Connect and Engage

Cisco CMX Connect and Engage Configuration Guide for Mobile SDK, Release 8.0 - Cisco

Cisco Connected Mobile Experiences Configuration Guide, Release 10.2 - The Cisco CMX Connect and Engage Service [Cisco …

Let us know how we can help,

Matt