Certificate APIs

Certificates help establish secure communication between systems by enabling SSL/TLS encryption and authentication. You can upload, view, and manage the certificates that are configured in your tenant by using the available APIs.

GET - List certificates

Retrieves the list of all certificates that are configured in an environment.

URL
../apis/v1/rest/projects/{projectAlias}/configurations/certificates
Parameters
  • {projectAlias} - Name of the project.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
None
Response
 [
        {
            "keyStoreName": "ks",
            "keyStoreType": "PKCS12",
            "keyStoreLocation": "tempcertificate.crt",
            "keyStoreProvider": "SUN",
            "keyStoreDescription": "helloksdesc",
            "acl": null,
            "handle": "wm.security.keystore.ks",
            "nullKSPassword": "false",
            "isLoaded": "true",
            "isHsm": false,
            "configuredKeyAliases": [
                {
                    "keyAlias": "mykey",
                    "nullPassword": "false",
                    "handle": "wm.security.keystore.ks.mykey"
                }
            ],
            "nonConfiguredKeyAliases": [],
            "certficateAliases": [],
            "certificateType": "KEY_STORE"
        }
    ]

GET - Get certificates

Retrieves the details about a specific certificate.

URL
../apis/v1/rest/projects/{projectAlias}/configurations/certificates/{certificateName}?certificateType=KEY_STORE
Parameters
  • {projectAlias} - Name of the project.
  • {certificateName} - Name of the certificate.
  • {certificateType} - Type as KEY_STORE for keystores, Type as TRUST_STORE for truststores, types as PARTNER_CERTIFICATE for partner certificate.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
None
Response
{
        "keyStoreName": "ks",
        "keyStoreType": "PKCS12",
        "keyStoreLocation": "tempcertificate.crt",
        "keyStoreProvider": "SUN",
        "keyStoreDescription": "helloksdesc",
        "acl": null,
        "handle": "wm.security.keystore.ks",
        "nullKSPassword": "false",
        "isLoaded": "true",
        "isHsm": false,
        "configuredKeyAliases": [
            {
                "keyAlias": "mykey",
                "nullPassword": "false",
                "handle": "wm.security.keystore.ks.mykey"
            }
        ],
        "nonConfiguredKeyAliases": [],
        "certficateAliases": [],
        "certificateType": "KEY_STORE"
    }

GET - Get certificate providers

Retrieves the details about the certificate providers.

URL
../apis/v1/rest/projects/{projectAlias}/configurations/certificates/providers
Parameters
  • {projectAlias} - Name of the project.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
None
Response
{
    "type": "key",
    "keyProviderList": [
      {
        "keyStoreType": "JKS",
        "providerList": [
          {
            "provider": "SUN"
          }
        ]
      },
      {
        "keyStoreType": "PKCS12",
        "providerList": [
          {
            "provider": "BC"
          },
          {
            "provider": "SUN"
          },
          {
            "provider": "SunJSSE"
          }
        ]
      }
    ]

POST - Create certificates

Creates a certificate.

URL
../apis/v1/rest/projects/{projectAlias}/configurations/certificates
Parameters
  • {projectAlias} - Name of the project.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
  • For keystores:
    Content-Type: form-data
    
    certificateProperty: {"certificateType":"KEY_STORE","certificateConfig":{"name":"helloks","description":"helloksdesc","type":"JKS","provider":"SUN","password":"changeit","projectName":"fl469be6366e5bd0290b8c6f","keyAliases":[{"alias":"mykey","password":"changeit"}]}}
    file: <certificate file>
    
    
  • For truststores:
    Content-Type: form-data
    
    certificateProperty: {"certificateType":"TRUST_STORE","certificateConfig":{"name":"mytruststore","description":"mytruststore desc","type":"JKS","provider":"SUN","password":"changeit","projectName":"fl469be6366e5bd0290b8c6f","keyAliases":[{"alias":"mykey","password":"changeit"}]}}
    file: <certificate file> 
    
    
  • For PartnerCertificate:
    Content-Type: form-data
    
    certificateProperty: {"certificateType":"PARTNER_CERTIFICATE","certificateConfig":{"name":"hips","description":"hello partner","projectName":"fld94a70b8cca9a208928d73"}}
    file: <certificate file> 
    
    
Response
{
    "code": 0,
    "description": "Success",
    "details": {
      "status": "SUCCESS",
      "message": "Keystore ks added successfully."
    }
  }

PUT - Update certificates

Updates a certificate.

URL
../apis/v1/rest/projects/{projectAlias}/configurations/certificates/{certificateName}
Parameters
  • {projectAlias} - Name of the project.
  • {certificateName} - Name of the certificate.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
  • For keystores:
    Content-Type: form-data
    
    certificateProperty: {"certificateType":"KEY_STORE","certificateConfig":{"name":"helloks","description":"helloksdesc","type":"JKS","provider":"SUN","password":"changeit","projectName":"fl469be6366e5bd0290b8c6f","keyAliases":[{"alias":"mykey","password":"changeit"}]}}
    file: <certificate file>
    
    
  • For truststores:
    Content-Type: form-data
    
    certificateProperty: {"certificateType":"TRUST_STORE","certificateConfig":{"name":"mytruststore","description":"mytruststore desc","type":"JKS","provider":"SUN","password":"changeit","projectName":"fl469be6366e5bd0290b8c6f","keyAliases":[{"alias":"mykey","password":"changeit"}]}}
    file: <certificate file> 
    
    
  • For PartnerCertificate:
    Content-Type: form-data
    
    certificateProperty: {"certificateType":"PARTNER_CERTIFICATE","certificateConfig":{"name":"hips","description":"hello partner","projectName":"fld94a70b8cca9a208928d73"}}
    file: <certificate file> 
    
    
Response
{
    "code": 0,
    "description": "Success",
    "details": {
      "status": "SUCCESS",
      "message": "Keystore ks added successfully."
    }
  }

DELETE - Delete certificates

Deletes a certificate.

URL
../apis/v1/rest/projects/{projectAlias}/configurations/certificates/{certificateName}?certificateType=KEY_STORE
Parameters
  • {projectAlias} - Name of the project.
  • {certificateName} - Name of the certificate.
  • {certificateType} - Type as KEY_STORE for keystores, Type as TRUST_STORE for truststores, types as PARTNER_CERTIFICATE for partner certificate.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
None
Response

If successful, the HTTP Status 204 No Content message is displayed.