10-16-2020 03:53 PM
Hi!
I'm fairly new in this space. I'm trying to call the ASyncOS API to get a list of "Top Senders by Clean Messages". Just like how you'd see in the esa web portal (as a chart).
Would you please let me know what the uri I should be using and the parameters I should be specifying?
For test purposes I was trying something like this in Fiddler, but I was getting an error (Partial URL cannot be processed). I did have the required headers included in the GET call.
https://<esa:port>/sma/api/v2.0/reporting/mail_incoming_ip_hostname_detail?startDate=2020-10-10T19:00:00.000Z&endDate=2020-10-24T23:00:00.000Z&device_type=esa&filterBy=ip_address&filterOperator=begins_with&filterValue=10&query_type=graph
Any help is much appreciated!
Thanks,
Arjuna
10-17-2020 03:08 AM
Hi Arjuna,
The below link contains various samples strings of the GET requests :
If you are still facing any issues, request you to open a TAC case.
- Anjali
10-21-2020 02:20 PM
Hello Anjali,
Thanks for your response.
Do you know why I'm always getting a 401 error (Even as an admin user), when I try making this API call?
(Obviously my encoded Authorization credentials and the host values are different from below).
GET /sma/api/v2.0/config/appliances?device_type=sma HTTP/1.1 cache-control: no-cache Authorization: Basic YWRtaW46Q2lzY28xMjMk Accept: */* Host: sma.example.com:6080 accept-encoding: gzip, deflate Connection: keep-alive
HTTP/1.0 401 Permission denied
Server: EmailAPI/1.0
Date: Tue, 20 Oct 2020 19:19:39 GMT
Content-Type: application/json
Connection: close
{"error": {"message": "Permission denied.", "code": "401", "explanation": "401 = No permission -- see authorization schemes."}}
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