Introduction
SMAC Platform is a cloud-based online service. Using the Microsoft Windows Azure⢠infrastructure, SMAC Platform dynamically scales up to any performance or space requirement. All data transfer to and from BWS is secured with strong TLS/SSL encryption.
Access to SMAC Platform is done via a HTTP based RESTful Web API. This web API is accessible via standard HTTP methods by a variety of HTTP clients including browsers and mobile devices.
We provide Swagger UI to visualize and interact with SMAC Platform API.
Authorization
In order to use SMAC Platform API, you must sign up for an account with a confirmed email address. A bearer token and an API key are required to authenticate you with SMAC Platform API.
You can identify which authorization component(s) is required by clicking the icon, for each of the APIs at the Swagger UI. The following are the possible dialogs, each indicating the required authorization(s).
Bearer Token
Bearer token is required by all APIs which perform operations related to the user account. A bearer token is returned upon calling api/Users/authenticate. Expired token can be renewed by calling api/Users/refresh-token.
The token must be sent in the Authorization header when making requests.
Authorization: Bearer <token>
API Key
In addition to bearer token, some APIs require API key. API keys can be created in API Keys Management.
The API key is sent in the request header.
X-SMAC-PLATFORM-API-KEY: <key>
Postman as Test Tool
Postman is an API platform for building and using APIs. Download the Postman application using the following steps:
Download and install Postman from https://www.postman.com/downloads.
Once you have installed Postman and started it, in the Workspace view, click the Import button.
Choose Link and enter URL, https://smac-poc.mcs-group.com.my/swagger/v1/swagger.json.
Postman - Import Link Click Continue, followed by Import to start importing.
Postman - Import
In Collections, select the newly imported API.
Select Pre-request Script tab.
Postman - API Key - Enter the following line, replacing
[ApiKey]
with your API Key.pm.request.addHeader({key: "X-SMAC-PLATFORM-API-KEY", value: "{{ApiKey}}"})
- Enter the following line, replacing
Select Authorization tab.
Postman - Authorization - Select Bearer Token for Type.
- Enter your bearer token in Token.
- You can obtain the bearer token by executing /api/Users/authenticate API.