CPANEL-40803 - How to use cURL for UAPI store_filter to create email filter
-
Hey there! Let me do some testing with this API call and I'll get back to you once I have more details! 0 -
Thank you. 0 -
I'm also not able to get that API call to work properly with the details provided on that page so I've created case CPANEL-40803 for our developers to look into this. I'll be sure to post back to this thread once I have an update. 0 -
Thank you, again. I appreciate your creating a case. 0 -
You're very welcome - thanks for bringing this to our attention! 0 -
The following worked: cURL -H "Authorization: cpanel indinferaem:[token]" "https://assigned-email-manager.com:2083/execute/Email/store_filter?filtername=redirect&action1=deliver&match1=contains&part1=$header_to:&val1=jerry&account=jerry@assigned-email-manager.com&dest1=gerry@assigned-email-manager.com"
I got these results:{"metadata":{},"errors":null,"messages":null,"data":{"account":"jerry@assigned-email-manager.com"},"status":1,"warnings":null}
I went into the cPanel GUI and verified that the filter was indeed created. I think cURL automatically changes illegal URL characters into % codes. That's why I could use @ for asterisk and : for colon, etc. I think that my issue could be a documentation issue. Maybe the documentation would be easier to understand if there was a note to replace the * with a number. There could be a note in the documentation to include the : . And the URL example needs to have a question mark. Of course, I don't know how it is supposed to work. Still, explaining the * would make the documentation match how it works now. The cPanel team probably will come up with something better than my suggestion. That's a big reason I am trying to use cPanel to make my application work.0 -
I'm glad you were able to come up with a workaround. The case I submitted will bring an overhaul to that page and will make things much more clear for the future. 0 -
Thank you for being interested, as always. 0
Please sign in to leave a comment.
Comments
8 comments