SOLVED WHM DNS API - what does "unencoded" mean?

pv2b

Registered
Mar 23, 2018
3
1
1
Stockholm
cPanel Access Level
Reseller Owner
Hi.

I'm trying to call the "addzonerecord" method of the WMI API 1 in order to programmatically create TXT records in DNS. Link to docs for convenience: WHM API 1 Functions - addzonerecord - Developer Documentation - cPanel Documentation

Under the section "TXT Record Parameters", there is a parameter "unencoded" which has the following "documentation":

Parameter: unencoded
Type: Boolean
Description: Whether the TXT record's data is encoded.
Possible values: 1 — Encoded. / 0 — Not encoded.
Example: 1

Other than the fact that it's confusingly named (unencoded=1 means encoded...) I don't actually understand what this flag does, and despite some testing on my side, I have not been able to see any difference with this flag set or clear.

So what does this flag actually do?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

Can you verify what method you are using to test this API function? For instance, are you testing with an encoded URL with the API call in a web browser, or through the command line?

Thank you.
 

pv2b

Registered
Mar 23, 2018
3
1
1
Stockholm
cPanel Access Level
Reseller Owner
Hello.

I'm writing a Powershell script to interact with the API. Find my code attached (maybe someone can find it useful as a sample...) It works fine for me right now (although I had to work around a few annoying Powershell bugs).

That said, the API doesn't really care what's calling the method. I want to understand what "unencoded" means in terms of the spec of the API.
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

I notice the same behavior that you see in that the actual record that appears in the DNS zone doesn't appear to change based on the use of the unencoded parameter. I've opened internal case CPANEL-19498 to verify if there's another purpose for the "unencoded" parameter that's not fully documented. I'll monitor the case and update this thread with more information as it becomes available.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

To update, it looks like the parameter is accepted, but it's usage is filtered out. Thus, there currently doesn't appear to be a valid use of this parameter. I've opened an internal case (DOC-10543) with our Documentation Team to have our documentation updated to reflect this information.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

The "unencoded" parameter is now removed from the document.

Thanks!