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

How to delete a certificate using API?

Hi,

Despite my positive feelings regarding Sophos products, API documentation is worst I have ever seen!

It lacks very basic command explanations or examples, for example to delete the certificate it says that Name attribute is required BUT, it does not show WHERE this attribute must be placed? I spent whole day figuring it out, tried all combinations, one of them is:

<Set operation="delete"><CertificateAuthority><Name>cert name</Name></CertificateAuthority></Set>

Does anybody know a magical command?



This thread was automatically locked due to age.
Parents Reply Children
  •   Alrighty noted, can you share few more details with the screenshot for the working and non-working both if possible ?

    Thanks & Regards,
    _______________________________________________________________

    Vivek Jagad | Team Lead, Global Support & Services 


    Sophos Community | Product Documentation | Sophos Techvids | SMS
    If a post solves your question please use the 'Verify Answer' button.

  • Sorry what you mean by working? 

  • By the way, I have recently discovered that I'm also unable to delete a firewall rule! This time, unlike certificate, the error is somewhat different:

    <Login>
    <status>Authentication Successful</status>
    </Login>
    <FirewallRule transactionid="">
    <Status code="501">Configuration parameters validation failed.</Status>
    <InvalidParams>
    <Params>/FirewallRule/PolicyType</Params>
    </InvalidParams>
    </FirewallRule>
    </Response>
    UPDATE
    -------------
    I even put there this PolicyType parameter, but the error 501 still occurs
  • Figured all out!

    You just have to put the request code in <Remove> tag

    So, enclosing it with <Remove></Remove> tags instead of <Set operation="delete"></Set>. Final code to remove a certificate for instance, will look like this:

    1.1.1.1:4444/.../APIController passwordform="plain">password</Password></Login><Remove><Certificate><Name>domain.com</Name></Certificate></Remove></Request>

    I would recommend to let users know this at the documentation page, because logically I had no idea that the delete operation would be absolutely different compared to Add/Update operations that work by using <Set operation="add/update"> tag. Again, this page is useless until somebody spend tons of time and effort:

    Thanks