CSR export via XML API


Changes to the LIVEcommunity experience are coming soon... Here's what you need to know.

L2 Linker

CSR export via XML API

I am trying to export a CSR via XML API as per this article and as per /debug output that I get when I perform the export via Web UI.


The request I run is as follows:



However this does not quite work - I get an error message that says:


Failed to prepare CSR <cert-name> for export. PKCS10 format can only be used with CSRs and not certificates.


I have now run out of ideas what it does not like in the request. The article explicitely says - "You can use the example above to export a certificate signing request (CSR). If you do so, then specify the following two parameters as shown: format - pkcs10, include-key - no" and this is exactly what I am doing. The debug out for a succefull operation suggests the same syntax:


<request cmd="op" cookie="1001040547321532">
  <operations xml="yes">
        <include-####censored 'key''####
[2020/10/01 23:06:58] user=1001040547321532
Response took 0.040s <response status="success"><result><content encoding="base64">
<---encoded csr goes here--> ]]></content></result></response>

Has anybody has an idea about the correct format of the request?

L2 Linker

Spoke to TAC (the engineer said he had been unable to reproduce), reproduced the issue for him, then we removed spaces from cert name and subject - the issue was gone, re-added the spaces - the issue did NOT re-occur. There must have been something else, very subtle, that trigerred the error. We'll keep playing with this and update this thread if manage to discover anything...

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!