JSON plugin and ClearPass RestAPI integration
Confluence User - 05 Sep, 2019
Hello team.
We are developing an integration with Aruba ClearPass through the API. We were already able, successfully, to receive a token through identification with username and password through a JSON type plugin, as I show in the image below.
With that token, we should be able to make transactions, as seen in these CURL commands:
curl -X POST "https://<ClearPass IP/hostname>/api/guest" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer a6d2873200bee25768307c32ee22415ac8ad203a" \
--data '{
"enabled": true,
"expire_time": "1438562410",
"password": "Aruba@!23$",
"role_id": 2,
"username": "testaccount"
}'\
-m 30 \
-v \
-k
However, we do not know how to include additional header elements in the configuration of the joget plugin (-h in the code), since they are not part of the JSON Body and the server needs these parameters and otherwise it returns errors of unauthorized type (403).
Anyone with experience in this subject or ideas about it?
rest;json;integration;plugin
