03-12-2024 10:00 AM
I'm looking for help as to how to format the Post request to test our API connectivity to one of our CES Gateway servers. Cisco support have ensured that this is enabled, although we are not able to view the interfaceconfig ourselves. I am following the format from the below documentation:
If you could take a look at our config below and see if there's any mistakes I'm making. We've double checked the firewall and the traffic is not being blocked there, however if I run a Test-Netconnection from PowerShell to our gateway server for port 6080 the TCP test fails, so I'm unsure if the port is even open (although Cisco assures us it is).
My request looks as follows:
POST http://<appliance_FQDN>:6080/esa/api/v2.0/login/
Headers:
Postman-Token <calculated when request is sent>
Content-Length <calculated when request is sent>
Host: <calculated when request is sent>
User-Agent: curl/7.54.0
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: application/json
Cache-Control no-cache
Body:
03-25-2024 04:32 AM
Hello,
Begin by executing a POST request to the URL http://<dhxxxx>:6080/esa/api/v2.0/login. Ensure that the Authorization header is set to no authentication ('No Auth'). In the request body, provide your base64-encoded username and password in the following format:
{
"data":
{
"userName":"username_in_base64",
"passphrase":"password_in_base64"
}
}
Once you've successfully received the jwtToken, switch the Authorization method to 'API key'. Input the jwtToken you obtained as the API key's value for subsequent API requests. Refer to the API documentation for further details on how to structure these requests.
I trust this explanation will be helpful to you or you can reach out to Cisco Technical Support for assistance
04-28-2024 03:58 PM
the more easiest way to check API on CES is to check New-GUI (NGUI). it works by API. if you can able to login NGUI and navigate some pages (reportings, MT, etc.) API is fine.
and btw, here you can catch some API requests by using browser's web traffic trace (F12).
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide