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 ?
There is a new document https://developer.cisco.com/fileMedia/download/70b2287c-a5e6-499c-a8c8-e72b68237788 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:
- Authentication is sent from the client side, before initiating the request using the Authorization header.
- Combine the username and password credentials to form a sting " username:password".
- Use Base64 to encode the resulting string literal.
- 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:
- Authorization: Basic bGVhcm5pbmc6bGVhcm5pbmc=
- Authentication is sent to the root URI to reach (e.g. for MSE 8.0 https://msesandbox.cisco.com/api/contextaware)
Cisco CMX Connect and Engage
Cisco CMX Connect and Engage Configuration Guide for Mobile SDK, Release 8.0 - Cisco
Comments
0 comments
Please sign in to leave a comment.