How does anyone use this API?
WHM and cPanel have a helpful feature to view email delivery reports / tracking.
I needed to be able to access this via API. It's been incredibly frustrating. There is v1, v2 of the "API", plus the LiveAPI and the UAPI. I'm not sure I understand the significance of the "LiveAPI". There's documentation for "api" that tells you to use "api1" or "api2" and *not* "api" (but apparently you can). However, there's no documentation for "api1" or "api2" specifically. The API pages are littered with deprecation notices, even when features are only available in the API system.
I created a token and tried to use that. The first examples I could find all used a session, which was not helpful.
Documentation tells me to use the UAPI and it's not immediately obvious that the tracking feature isn't available. After searching for a while - the documentation is not organized in a way that made it easy - I found out that the feature doesn't exist in the recommended system (UAPI).
I tried the LiveAPI and it never worked. I can't even run the example shown in the documentation. I get a "fetching the env variable containing the path to the socket" error, every time.
There's also a CLI app but it can only be run by root.
I tried API2. It's impossible to find good examples for this. And even though it does return an error if I use an invalid command, the API apparently doesn't check parameters or arguments at all. I get the same result no matter what I put there - an empty records array and some metadata that doesn't tell me anything. That's even if I send it garbage as parameters. I tried what I *think* are correct parameters. There's no way to tell what's valid.
I can't tell if it needs start/end date/times or if that's optional.
I tried a script someone posted on Github. It also returned an empty array. It should not be empty.
At this point, I'm at a total loss as to how this API works for anyone.
Can someone please help?
-
Hey there! Are you the same user that posted on Discord tonight? If so, I still need an example of the specific call you're trying to make and why it isn't returning the results you expect. Without that, we're really just guessing, and that's why I recommended creating a ticket.
0
Please sign in to leave a comment.
Comments
1 comment