REST API  8.0.0
REST API for SafeNet Luna Network HSMs
GET /api/lunasa/webServer/csr

GET /api/lunasa/webServer/csr

Gets a certificate signing request.

Parameters

None

Responses

200

Data buffer containing the file contents.

400

Unexpected error

Example Request

   GET 
   https://1.2.3.4:8443/api/lunasa/webServer/csr

Example Result

{
   
}

Notes

This resource returns the contents of a file in a buffer.

Below is an example of getting the contents in python. We iterate through the contents and save them to a file.

        r = requests.get("/api/lunasa/webServer/csr",
                         stream=True,
                         cookies=cookies,
                         verify=False,
                         allow_redirects=False)

        with open("ssl.csr", 'wb') as csr:
          for chunk in r.iter_content(chunk_size=1024):
              if chunk:
                  csr.write(chunk)
          csr.close()