PBX GUI - 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 |
---|---|---|---|---|
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 | 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
status
message |
API Request
mutation {
uploadSSLCertificate(input: { name: "test"
description: "test"
CSRReference: "test"
signedCertificate: "****************"
default: true
}) {
message status
}
} |
API Response
{
"data": {
"uploadSSLCertificate": {
"message": "Added new certificate.",
"status": true
}
}
} |
Fetch CSR Certificate
API- fetchCSRFile
API Parameter- none
Query Parameters
status
message
fileContant |
API Request
{
fetchCSRFile{
status
message
fileContant
}
} |
API Response
{
"data": {
"fetchCSRFile": {
"message": "Please find the CSR file content",
"status": true,
"fileContant: : "******************************"
}
}
} |
Update default Certificate
API- updateDefaultCertificate
API Parameter
Name | Required | Type | Default | Description |
---|---|---|---|---|
cid | Mandatory | string |
| Certificate ID. which can be fetched using the fetchSSLCetificate |
Query Parameters
status
message |
API Request
mutation{
updateDefaultCertificate(input: {cid : "1"}){
status
message
}
} |
API Response
{
"data": {
"updateDefaultCertificate": {
"status": true,
"message": "Successfully updated certificate as default"
}
}
} |
Delete CSR Certificate
API- deleteCSRFile
API Parameter- none
Query Parameters
status
message |
API Request
mutation{
deleteCSRFile(input: {}){
status
message
}
} |
API Response
{
"data": {
"deleteCSRFile": {
"status": true,
"message": "Successfully deleted the Certificate Signing Request"
}
}
} |
Delete Certificate
API- deleteCertificate
API Parameter
Name | Required | Type | Default | Description |
---|---|---|---|---|
cid | Mandatory | string |
| Certificate ID. which can be fetched using the fetchSSLCetificate |
Query Parameters
status
message |
API Request
mutation{
deleteCertificate(input: {cid : "2"}){
status
message
}
} |
API Response
{
"data": {
"deleteCertificate": {
"status": true,
"message": "Successfully deleted the SSL certificate"
}
}
} |