This repository contains any extra resources needed to participate in the Open AMT Cloud Toolkit Workshop for Open AMT Cloud Toolkit v1.3.0.
Key Files Included:
- RPC Binary/Executable (OUTDATED, v1.2.0)
- These binaries are for testing purposes and other non-production uses. Instructions on compiling these binaries yourself can be found here.
- sample_blank.htm File for Demonstrating APIs
- sample_filledin.html File which is equivalent to sample_blank.htm but with examples filled in
In this workshop, we will demo APIs using the sample_blank.htm example template. For basic examples on constructing API calls using other tools or technologies, see below.
View our REST API Call tutorial. Includes a walkthrough and example code for how to get an Authorization Token and then make a call to get all devices of the MPS server.
Find additional information on curl in their documentation.
Example Authorize
curl -k -X POST -H "Content-Type: application/json" -d "{\"username\": \"standalone\", \"password\": \"G@ppm0ym\"}" https://localhost/mps/login/api/v1/authorize
Example Get Devices
curl -k -H "Authorization: Bearer <Your-JWT-Token>" -X GET https://localhost/mps/api/v1/devices
The following steps will show how to construct the Authorize API call via Postman:
-
Select New in the top-left corner or 'Create a Request' via the Launchpad.
-
Change 'Get' to 'Post' via the drop-down.
-
Enter the Authorize API URL.
https://localhost/mps/login/api/v1/authorize
-
In the 'Body' tab, select 'raw' and then 'JSON' from the drop down.
-
Provide the body according to Authorize API docs.
{ "username": "standalone", "password": "G@ppm0ym" }
-
Click Send.
Example Input
Example Output
Troubleshooting Note: If there is an authorization error, ensure SSL certificate verification is set to OFF in the Settings menu.