Use Swagger User Interface as Rest API Client
The Rest APIs of Plan are now available with Swagger User Interface. Once the Application is up and running, The APIs are available for testing and utilization by launching the Swagger UI URL: [http://[MO_HOST_NAME]:[MO_PORT]/plan/dist/index.html
Procedure
The header parameters need to be configured only once by getting a valid token ID.
Each API has information about the required and optional parameters for usage along with sample expected result.
Swagger UI takes care of sending the parameters as required( Either in header or in Body ) and result is available using "Try it out" option.
Procedure:
Make the configuration changes in Unica Platform for REST API. Get a valid token from Platform using the URL below:
http://[HOST_NAME]:[PORT]/unica/api/manager/authentication/login
Header Parameters :
m_user_name:[USER_NAME]
m_user_password:[PASSWORD]
api_auth_mode:manager
Expected Response (example):
{
"m_tokenId": "1550222864978-2-X0V7WYew-he9r-hBaUuidI-WzLu-E6klBVba",
"m_user_name": "USER_NAME",
"createDate": "Fri Feb 15 14:57:44 IST 2019"
}
Use a header modifier plugn to add the following parameters:
m_user_name: [USER_NAME]
m_user_password: [PASSWORD]
api_auth_mode:manager
m_tokenId: [Token received via Login URL]