Jump to content


Photo

REST API and Certificate Downloads

440 rest api

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 David Parker

David Parker
  • Members
  • 14 posts

Posted 04 May 2020 - 01:10 PM

Following the ADC REST API v2 documentation, I am attempting to download a certificate from our 440 load balancer.  I am able to authenticate a get a token just fine.  But when I try to download any certificate, I get an error response.

 

My queries look like this:

$ curl \
-u 'xxxxxxxx\nyyyyyyyy=\n:' \
-X GET \
-G \
-d download=signed \
-d encrypt_password=myCertPassword \
-O 'https://lb.example.com/restapi/v2/certificates/my_cert'

Where xxxxxxxx\nyyyyyyyy=\n is my auth token, myCertPassword is the password to be used for the certificate bundle, and my_cert is the name of a certificate stored on the load balancer.

 

Every time I try this, I get a response like the following (the token has been removed):

{
    "error": {
        "msg": "Certificate id requried",
        "status": 405,
        "type": "Method Not Allowed"
    },
    "token": "xxxxxxxx\nyyyyyyyy=\n"
}

(Note: the word "required" is misspelled in the API response)

 

I know the certificate name I am using is valid, because this is different from the error I get when I try to download a certificate that does not exist:

{
    "error": {
        "msg": "ID does not exist for certificate type signed",
        "status": 404,
        "type": "Not Found"
    },
    "token": "xxxxxxxx\nyyyyyyyy=\n"
}

And different from the error I get if my auth token is invalid:

{
    "error": {
        "msg": "Please log in to get valid token",
        "status": 401,
        "type": "Invalid Credentials"
    }
}

Does anyone know why this won't work?  The documentation is so basic that I can't even tell if the problem is with my syntax, my authentication, or something to do with the certificate itself.

 

Thanks.
 



#2 Scott Treacy

Scott Treacy
  • Barracuda Team Members
  • 13 posts

Posted 05 May 2020 - 07:53 AM

Hi David,

 

Can you please log this with Barracuda Support (https://www.barracuda.com/support/) quoting your serial number and firmware version.

 

Regards

Scott



#3 David Parker

David Parker
  • Members
  • 14 posts

Posted 05 May 2020 - 08:08 AM

Thanks, Scott.  I just opened a case.