Populate and Upload the Request

If you use this template output, only include the data element.

For additional properties that you might want to specify in your CSR, list the properties of an existing system certificate, as shown in List Certificates.

When you are satisfied with your CSR, upload the CSR to the host, as shown in the following example. Once you have uploaded the CSR, you can no longer change it.

Example Request:

POST /api/setting/v2/certificates/system HTTP/1.1
Host: alice.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Content-type: application/json

{
    "data": {
        "subject": [
            {
                "commonName": "alice.example.com"
            },
            {
                "organizationName": "Example Corp, Inc"
            },
            {
                "localityName": "Exampleton"
            },
            {
                "stateOrProvinceName": "CA"
            },
            {
                "countryName": "US"
            }
        ],
        "extensions": {
            "subjectAltName": {
                "value": [
                    {
                        "DNS": "alice.example.com"
                    },
                    {
                        "IP": "alice.example.com-ipaddr"
                    }
                ]
            }
        }
    }
}

Example Result:

HTTP/1.1 201 Created
Date: Fri, 14 May 2021 01:17:45 GMT
Content-Type: application/json; charset=utf-8
X-Zfssa-Api-Version: 2.0
X-Zfssa-Setting-Api: 2.0
Location: /api/setting/v2/certificates/system/65119889-98d3-4fc4-bff5-f007a55f6cb3
Content-Length: 379

{
    "request": {
        "uuid": "csr-uuid",
        "type": "request",
        "data": {
            "subject": [
                {
                    "commonName": "alice.example.com"
                },
                {
                    "organizationName": "Example Corp, Inc"
                },
                {
                    "localityName": "Exampleton"
                },
                {
                    "stateOrProvinceName": "CA"
                },
                {
                    "countryName": "US"
                }
            ],
            "extensions": {
                "subjectAltName": {
                    "value": [
                        {
                            "DNS": "alice.example.com"
                        },
                        {
                            "IP": "alice.example.com-ipaddr"
                        }
                    ]
                }
            }
        },
        "href": "/api/setting/v2/certificates/system/csr-uuid"
    }
}