Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I think that the API has a little bug inside

Hi,

Certificate list request ends up getting a TAR archive instead of API output. Request made is as following:

<Get><Certificate><Filter key="Name" criteria="like">cert name</Filter></Certificate></Get> 

or

<Get><Certificate></Certificate></Get>

Looks like it's a bug

Regards



This thread was automatically locked due to age.
  • Hi  Thank you for connecting with the Sophos community team. I have tried to check in local LAB device with V18.5 and V19.0 and got the same observation and it is generating a TAR file with the below API request.

    X.X.X.X:4444/.../APIController
    <Request>
    <Login>
    <Username>admin</Username>
    <Password>YYYYYYYYY</Password>
    </Login>
    <Get>
    <Certificate transactionid="">
    </Certificate>
    </Get>
    </Request>

    apiparser.log

    INFO Oct 18 09:52:04Z [4966]: <End> - Request:Get, Component:Certificate, return:0
    INFO Oct 18 09:52:04Z [4966]: Command:/scripts/apiparser_generate_tar.sh /sdisk/api-1666086723063967.txt /sdisk/API-1666086723063967 /sdisk/APIXMLOutput/1666086722820.xml /sdisk/API-1666086723063967.tar /sdisk/API-1666086723063967.log 0 status:0
    INFO Oct 18 09:52:04Z [4966]: Tar File : /sdisk/API-1666086723063967.tar is created.

    While trying to Get the IP host (in place of Certificate via API) the output is in the HTML with XML format.

    apiparser.log

    INFO Oct 18 09:57:06Z [6664]: <End> - Request:Get, Component:IPHost, return:0
    INFO Oct 18 09:57:06Z [6664]: Command:/scripts/apiparser_generate_tar.sh /sdisk/api-1666087025336909.txt /sdisk/API-1666087025336909 /sdisk/APIXMLOutput/1666087025069.xml /sdisk/API-1666087025336909.tar /sdisk/API-1666087025336909.log 0 status:3
    INFO Oct 18 09:57:06Z [6664]: No need to create Tar file. Response file is /sdisk/APIXMLOutput/1666087025069.xml

    What is the exact requirement and use case due to which you need output in XML only?

    So at the moment, it can not be decided whether it is BUG or expected working. It may have chances it could be expected result only to have output in the TAR file as observation is the same for me in 2 different SF OS versions.

    Further, if it is a generic use case and scenario due to which you must require XML in place of TAR for certificate get API, then please open a support case to have further verification and validation on the same.

    Regards,

    Vishal Ranpariya
    Technical Account Manager | Sophos Technical Support

    Sophos Support Videos | Knowledge Base  |  @SophosSupport | Sign up for SMS Alerts |
    If a post solves your question use the 'This helped me' link.

  • Well, the certificates output isn't big in general, necessarily to be archived. I just need the information about already uploaded certificates whether I should upload new or just update current one. if this isn't a bug, why the API thinks that I need TAR archive?