Resource URL: /platform/<<version=4>>/certificate/server

    Overview: This resource exposes cluster server TLS certificates

     Methods: GET, POST

********************************************************************************

Method GET: Retrieve a list of all configured TLS server certificates.

       URL: GET /platform/<<version=4>>/certificate/server

Query arguments:
  sort=<string> The field that will be used for sorting.
limit=<integer> Return no more than this many results at once (see resume).
     dir=<enum> Where <enum> is one of ASC, DESC.  The direction of the sort.
resume=<string> Continue returning results from previous call using this token
                (token should come from the previous call, resume cannot be
                used with other options).

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "certificates": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "properties": {
              "description": {
                "required": true, 
                "type": "string", 
                "description": "Description field associated with a certificate provided for administrative convenience."
              }, 
              "dnsnames": {
                "items": {
                  "type": "string"
                }, 
                "required": true, 
                "type": "array", 
                "description": "A list of DNS names/patterns for which this certificate is valid. This list is extracted from the certificates CN (Common Name) and subjectAtlName extension fields."
              }, 
              "default": {
                "required": true, 
                "type": "boolean", 
                "description": "Boolean identifying if a certificate is the default certificate.The default certificate is used as the fallback when no other certificates match a TLS enabled service's particular criteria. There must always be a configured default certificate."
              }, 
              "not_after": {
                "required": true, 
                "type": "integer", 
                "description": "Certificate notAfter field extracted from the certificate encoded as a UNIX epoch timestamp.  The certificate is not valid after this timestamp."
              }, 
              "fingerprints": {
                "items": {
                  "type": "object", 
                  "properties": {
                    "type": {
                      "type": "string", 
                      "description": "Fingerprint hash algorithm"
                    }, 
                    "value": {
                      "type": "string", 
                      "description": "Fingerprint value"
                    }
                  }
                }, 
                "required": true, 
                "type": "array", 
                "description": "A list of zero or more certificate fingerprints which can be used for certificate identification."
              }, 
              "name": {
                "required": true, 
                "type": "string", 
                "description": "Subject common name extracted from the certificate."
              }, 
              "valid": {
                "required": true, 
                "type": "boolean", 
                "description": "True if the certificate is valid (ie: not_before <= now <= not_after)."
              }, 
              "not_before": {
                "required": true, 
                "type": "integer", 
                "description": "Certificate notBefore field extracted from the certificate encoded as a UNIX epoch timestamp.  The certificate is not valid before this timestamp."
              }, 
              "subject": {
                "required": true, 
                "type": "string", 
                "description": "Certificate subject field extracted from the certificate."
              }, 
              "expired": {
                "required": true, 
                "type": "boolean", 
                "description": "True if the certificate has expired and is no longer valid."
              }, 
              "id": {
                "required": true, 
                "type": "string", 
                "description": "Unique server certificate identifier."
              }, 
              "issuer": {
                "required": true, 
                "type": "string", 
                "description": "Certificate issuer field extracted from the certificate."
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }, 
        "total": {
          "minimum": 0, 
          "type": "integer", 
          "description": "Total number of items available.", 
          "maximum": 4294967295
        }, 
        "resume": {
          "minLength": 0, 
          "type": [
            "string", 
            "null"
          ], 
          "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
        }
      }
    }
  ]
}

********************************************************************************

Method POST: Import a TLS server certificate.

        URL: POST /platform/<<version=4>>/certificate/server

Query arguments:

Required POST request body fields:
certificate_key_path, certificate_path

POST request body schema:
{
  "type": "object", 
  "properties": {
    "default": {
      "type": "boolean", 
      "description": "Boolean identifying if a certificate is the default certificate.The default certificate is used as the fallback when no other certificates match a TLS enabled service's particular criteria. There must always be a configured default certificate."
    }, 
    "certificate_key_path": {
      "required": true, 
      "type": "string", 
      "description": "Local path to the certificate key that is to be imported."
    }, 
    "certificate_path": {
      "required": true, 
      "type": "string", 
      "description": "Local path to the certificate that is to be imported."
    }, 
    "description": {
      "type": "string", 
      "description": "Description field associated with a certificate provided for administrative convenience."
    }
  }
}

POST response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "type": "object", 
      "properties": {
        "id": {
          "minLength": 0, 
          "required": true, 
          "type": "string", 
          "description": "ID of created item that can be used to refer to item in the collection-item resource path.", 
          "maxLength": 255
        }
      }
    }
  ]
}
