Certificate Management GraphQL APIs

This section will capture the APIs related with certman Module.

Generate CSR 

API- generateCSR

API Parameter-

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

hostname

Mandatory

string

 

Hostname for which CSR is required

name

Mandatory

string

 

Name for the CSR

organizationName

Mandatory

String

 

Name of the organization

organizationUnit

Mandatory

String

 

Organization unit

country

Mandatory

String

 

Country for the CSR

state

Mandatory

String

 

State for the CSR

city

Mandatory

String

 

City for the CSR

 

 

Query Parameters 

status message

 

 

API Request 

mutation {   generateCSR(input: {     name : "test"     hostName: "www.testing.com"     organizationName: "testing"     organizationUnit: "testing"     country: "US"     state: "california"     city: "neenah"   }){   message   status   } }

 

API Response 

{   "data": {     "generateCSR": {       "message": "Added new certificate signing request",       "status": true     }   } }

 

Upload SSL Certificate 

API- uploadSSLCertificate

 

API Parameter-

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

name

Mandatory

string

 

The base name of the certificate, Can only contain alphanumeric characters

description

Mandatory

string

 

The Description of this certificate. Used in the module only

passPhrase

Mandatory

String

 

The Passphrase of the Private Key. This will be used to decrypt the private key and the certificate. They will be stored unpassworded on the system to prevent service disruptions

privateKey

Mandatory

String

 

If you have a separate private key paste it here

CSRReference

Optional

String

 

Certificate Signing Request to reference

signedCertificate

Mandatory

String

 

After you have submitted a CSR to a CA, they will sign it, after validation, and return a Signed Certificate. That certificate should be pasted in the box below. If you leave this box blank, the certificate will not be updated.

trustedChain

Mandatory

String

 

Our CA may also require a Trusted Chain to be installed. This will be provided by the CA, and will consist of one, or multiple, certificate files

default

Optional

boolean

false

Whether to make the uploaded certificate as default certificate. Any other certificate marked as default will be removed.

 

 

Query Parameters 

 

 

API Request 

 

API Response 

Fetch CSR Certificate 

API- fetchCSRFile

API Parameter- none

 

Query Parameters 

 

 

API Request 

 

API Response 

Update default Certificate 

API- updateDefaultCertificate

API Parameter

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

cid

Mandatory

string

 

Certificate ID. which can be fetched using the fetchSSLCetificate

 

Query Parameters 

 

 

API Request 

 

API Response 

Delete CSR Certificate 

API- deleteCSRFile

API Parameter- none

 

Query Parameters 

 

 

API Request 

 

API Response 

Delete Certificate 

API- deleteCertificate

API Parameter

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

cid

Mandatory

string

 

Certificate ID. which can be fetched using the fetchSSLCetificate

 

Query Parameters 

 

 

API Request 

 

API Response 

Return to Documentation Home I Return to Sangoma Support