Create CSR - POST /api/ssl/csr

Parent Previous Next

POST /api/ssl/csr                            

Submit a Certificate Signing Request (CSR).  QUANTIL will give you a CSR file that you can take to a certificate authority to obtain a corresponding SSL certificate.


Request Syntax


Request Headers


Header

Description

Required

Authorization

Authorization string for the request

Yes

Host

URI for the QUANTIL SDK (i.e., api.quantil.com)

Yes

Date

The date and time of the request.

Yes

Accept

Indicates the accepted format (i.e., application/xml)

Yes

Request Body Elements


Element

Description

csr

Container object which includes information required to create the CSR.  It must contain  <name> and <domains> elements. It can contain one each of the following optional elements: <comment>  <csr-country>, <csr-state>, <csr-city> <csr-company>, <csr-department>, <csr-algorithm>.

name

a name describing the certificate request.

domains

a semi-colon separated list of fully qualified domain names. These should be domains you own and will register in QUANTIL's system.  If you are creating a wildcard certificate, the common name must begin with the character "*".   For example, *.domain.com.

comment

an optional description

csr-country

an optional two letter ISO-3166 country code indicating the location of your company.

csr-state

an optional state or province

csr-city

an optional city

csr-company

legal name of your company

csr-department

an optional department name or organizational unit

csr-algorithm

An optional element allowing you to indicate the cryptography algorithm that will be used for your SSL certificate. Specify either "RSA" which represents Rivest–Shamir–Adleman or "EC" which represents Elliptic Curve Cryptography.  RSA is the default.



Request Syntax:


POST /api/ssl/ssl/csr HTTP/1.1

Authorization: <authorization string>

Host: api.quantil.com

Date: <date>

Accept: application/xml


Here is the structure of a request using the curl utility.


curl -i --url https://api.quantil.com/api/ssl/csr

-X POST

-u {user}: {password}

-H 'Date: Fri, 26 Oct 2012 06:33:26 GMT'

-H 'Accept: application/xml'

-H 'Content-Type: application/xml'

-d '<?xml version = "1.0" encoding = "UTF-8"?>

<csr>

<name> {certificate name, required} </name>

<comment> {any comment you want, optional} </comment>

<csr-country> {2-letter country code, optional} </csr-country>

<csr-state> {State / Province name, optional} </csr-state>

<csr-city> {city name, optional} </csr-city>

<csr-company> {company name, optional} </csr-company>

<csr-department> {country name, optional} </csr-department>

<domains> {semi-colon separated domains, mandatory. Eg www.abc.com;image.def.com} </domains>

<csr-algorithm>EC</csr-algorithm>

</csr> '



Response Details:


Response Headers:

HTTP / 1.1 200 OK

Date: <date>

Content-Type: application / xml; charset = utf-8

Location: https://api.quantil.com/api/ssl/csr/{ssl-key-id}

x-cnc-request-id: {id string auto generated by the QUANTIL server}



The Location header will have a URL you can use to get the status of the SSL certificate you added.

Response Body Elements

Element

Description

response

container for additional information from the QUANTIL server.

message

a message returned by the QUANTIL server.  



Sample Response:


HTTP/1.1 200 OK

Date: Fri, 09 Jan 2015 00:08:50 GMT

Accept-Ranges: bytes

Location: https://api.quantil.com/api/ssl/csr/91

Server: WS-web-server

x-cnc-request-id: 4718955

ContentType: application/xml;charset=UTF-8

Content-Type: application/xml;charset=UTF-8

Content-Length: 86


<?xml version="1.0" encoding="UTF-8"?>

<response><message>success</message></response>

Error List


Error

Description

HTTP status code

Invalid CSR Content

The CSR content is invalid.

403

CsrAlgorithmError

The specified CSR algorithm is invalid.

400