swagger: '2.0'
info:
  description: |
    This API provides operations that let;

    - Tenants to manage CA certificate and Agent certificate resources.


    ## Generic Errors

    The following generic error codes (with status codes) can occur at the operations of this API. Generic error codes are prefixed with 'mdsp.core.generic.'.

    - missingParameter (400)
    - invalidParameter (400)
    - missingRequestBody (400)
    - invalidRequestBody (400)
    - unauthorized (401)
    - forbidden (403)
    - conflict (409)
    - preconditionFailed (412)
    - unsupportedMediaType (415)
    - preconditionRequired (428)
    - tooManyRequests (429)
    - internalServerError (500)

    See the MindSphere Developer Documentation generic errors page for more information on these errors.

  version: '3.1.1'
  x-visibility: internal
  title:  Native MQTT API (DEPRECATED)

basePath: /api/nativemqtt/v3
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
tags:
  - name: CA Certificates
    description: CA Certificate Controller
  - name: Auto Generated Agent Certificates
    description: Auto Generated Agent Certificate Controller
securityDefinitions:
  certificates:
    type: oauth2
    tokenUrl: 'http://authorization.connectivity.net/oauth/token'
    flow: application
    scopes:
      nmq.c.c: Permission to upload ca certificate
      nmq.c.r: Permission to read ca certificate
      nmq.c.d: Permission to delete ca certificate
      nmq.ac.c: Permission to upload agent certificate
      nmq.ac.r: Permission to read agent certificate
      nmq.ac.d: Permission to delete agent certificate



paths:
  /caCertificates:
    post:
      tags:
        - CA Certificates
      summary: Upload CA certificate
      description: |
        Uploads a new CA certificate. Maximum 2 CA certificates per tenant can be uploaded.
      security:
        - certificates:
            - nmq.c.c
      parameters:
        - in: body
          name: certificate
          description: |
            Object describing new CA certificate resource.
          required: true
          schema:
            $ref: '#/definitions/CertificateInput'
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/CertificateResponse'
        '400':
          $ref: '#/responses/InvalidParameter'
        'default':
          $ref: '#/responses/Default'
    get:
      tags:
        - CA Certificates
      summary: Get CA certificates
      description: |
        Gets the CA certificates.
      security:
        - certificates:
            - nmq.c.r
      parameters:
        - name: size
          in: query
          description: Maximum number of CA certificates to be retrieved.
          required: false
          type: integer
          default: 100
          maximum: 100
        - name: pageToken
          in: query
          description: Selects next page. Value must be taken from response body property 'page.nextToken'. If omitted, first page is returned.
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/CertificatesResponse'
        'default':
          $ref: '#/responses/Default'
  /caCertificates/{id}:
    get:
      tags:
        - CA Certificates
      summary: Get CA Certificate
      description: |
        Gets the CA Certificate with id.
      security:
        - certificates:
            - nmq.c.r
      parameters:
        - name: id
          in: path
          description: Unique identifier of the ca certificate.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/CertificateResponse'
        '404':
          $ref: '#/responses/CertificateNotFound'
        'default':
          $ref: '#/responses/Default'
    delete:
      tags:
        - CA Certificates
      summary: Delete CA certificate.
      description: |
        Deletes the CA certificate by id.
      security:
        - certificates:
            - nmq.c.d
      parameters:
        - name: id
          in: path
          description: Unique identifier of the ca certificate.
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '404':
          $ref: '#/responses/CertificateNotFound'
        'default':
          $ref: '#/responses/Default'
  /caCertificates/{id}/verify:
    post:
      tags:
        - CA Certificates
      summary: Verify CA certificate
      description: |
        Verify existing CA certificate.
      security:
        - certificates:
            - nmq.c.c
      parameters:
        - name: id
          in: path
          description: Unique identifier of the ca certificate.
          required: true
          type: string
        - in: body
          name: certificate
          description: |
            Object describing new CA certificate resource.
          required: true
          schema:
            $ref: '#/definitions/VerificationCertificateInput'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/VerifiedCertificateResponse'
        '400':
          $ref: '#/responses/InvalidVerificationCert'
        '404':
          $ref: '#/responses/CertificateNotFound'
        '409':
          $ref: '#/responses/AlreadyVerified'
        'default':
          $ref: '#/responses/Default'
  /caCertificates/{id}/registrationCode:
    get:
      tags:
        - CA Certificates
      summary: Get registration code
      description: |
        Gets a CA certificate's registration code.
      security:
        - certificates:
            - nmq.c.c
      parameters:
        - name: id
          in: path
          description: Unique identifier of the ca certificate.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RegistrationCode'
        '404':
          $ref: '#/responses/CertificateNotFound'
        '409':
          $ref: '#/responses/AlreadyVerified'
        'default':
          $ref: '#/responses/Default'
  /agentCertificates:
    post:
      tags:
        - Auto Generated Agent Certificates
      summary: Create Auto Generated Agent Certificate
      description: |
        Creates auto generated agent certificate.
      security:
        - certificates:
            - nmq.ac.c
      parameters:
        - in: body
          name: certificate
          description: |
            Object describing auto generated agent certificate resource.
          required: true
          schema:
            $ref: '#/definitions/AutoGeneratedAgentCertificateInput'
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/AutoGeneratedAgentCertificateResponse'
        '400':
          $ref: '#/responses/QuotaExceeded'
        'default':
          $ref: '#/responses/Default'
    get:
      tags:
        - Auto Generated Agent Certificates
      summary: Get Auto Generated Agent Certificates
      description: |
        Gets auto generated agent certificates.
      security:
        - certificates:
            - nmq.ac.r
      parameters:
        - name: size
          in: query
          description: Maximum number of auto generated agent certificates to be retrieved.
          required: false
          type: integer
          default: 100
          maximum: 100
        - name: pageToken
          in: query
          description: Selects next page. Value must be taken from response body property 'page.nextToken'. If omitted, first page is returned.
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/AutoGeneratedAgentCertificateSimplifiedResponse'
        'default':
          $ref: '#/responses/Default'
  /agentCertificates/{id}:
    get:
      tags:
        - Auto Generated Agent Certificates
      summary: Get Auto Generated Agent Certificate
      description: |
        Gets Auto Generated Agent Certificate with id.
      security:
        - certificates:
            - nmq.ac.r
      parameters:
        - name: id
          in: path
          description: Unique identifier of the auto generated agent certificate.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/AutoGeneratedCertificateSimplifiedResponse'
        '404':
          $ref: '#/responses/AgentCertificateNotFound'
        'default':
          $ref: '#/responses/Default'
    delete:
      tags:
        - Auto Generated Agent Certificates
      summary: Delete Auto Generated Agent Certificate.
      description: |
        Deletes Auto Generated Agent Certificate with id.
      security:
        - certificates:
            - nmq.ac.d
      parameters:
        - name: id
          in: path
          description: Unique identifier of the auto generated agent certificate.
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '404':
          $ref: '#/responses/AgentCertificateNotFound'
        'default':
          $ref: '#/responses/Default'
definitions:
  CertificatesResponse:
    required:
      - caCertificates
    type: object
    properties:
      caCertificates:
        type: array
        items:
          $ref: '#/definitions/CertificateResponse'
      page:
        allOf:
          - $ref: '#/definitions/Page'

  RegistrationCode:
    required:
      - registrationCode
    type: object
    properties:
      registrationCode:
        type: string
        example: '61d5533b564ecd2f6066asd357f68a64f544e1a8c40d5abf72f9c9ce3fec194'
        description: 'Registration code that is to be used for generating a verification Certificate'
  CertificateResponse:
    required:
      - id
      - name
      - expiration
      - commonName
      - isVerified
    type: object
    properties:
      id:
        type: string
        example: '60c89c9cf1b56605bc315f78'
        description: 'Unique identifier of the certificate'
      name:
        type: string
        example: 'MyTenantName CA Certificate'
        description: "User defined name"
      expiration:
        type: string
        format: date-time
        example: '2021-07-21T17:32:28Z'
        description: "The time after which the certificate is not valid"
      commonName:
        type: string
        example: 'Siemens'
        description: "Common name of certificate"
      isVerified:
        type: boolean
        example: false
        description: "Verification status of CA certificate."
      idScope:
        type: string
        example: 0ne001E4ZA9
        description: '"ID Scope" parameter for using to connect to Azure DPS. See Azure DPS documentation for details.'
  VerifiedCertificateResponse:
    required:
      - id
      - name
      - expiration
      - commonName
      - isVerified
    type: object
    properties:
      id:
        type: string
        example: '60c89c9cf1b56605bc315f78'
        description: 'Unique identifier of the certificate'
      name:
        type: string
        example: 'MyTenantName CA Certificate'
        description: "User defined name"
      expiration:
        type: string
        format: date-time
        example: '2021-07-21T17:32:28Z'
        description: "The time after which the certificate is not valid"
      commonName:
        type: string
        example: 'MyTenantName MDSP CA'
        description: "Common name of the certificate."
      isVerified:
        type: boolean
        example: true
        description: "Verification status of CA certificate."
      idScope:
        type: string
        example: 0ne001E4ZA9
        description: '"ID Scope" parameter for connecting to Azure DPS. See Azure DPS documentation for details.'
  CertificateInput:
    required:
      - name
      - caCertificate
    type: object
    properties:
      name:
        type: string
        example: "MyTenantName MDSP CA Certificate"
        description: 'User defined name'
        minLength: 1
        maxLength: 128
      caCertificate:
        type: string
        description: 'Tenant CA certificate in PEM encoding.'
        example: -----BEGIN CERTIFICATE-----MIIC/jCCAeagAwIBAgIJALv7Lg7C0b1LMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNVBAMMCVRFQU02LW9yZzAeFw0yMDA0MTAxMzUzNTFaFw0yMzAxMjkxMzUzNTFaMBQxEjAQBgNVBAMMCVRFQU02LW9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM4myW+NTlrlzdF1cxYF+3P4i+DOkE2m/u5aDRIoI+7tVCZSNRa3Y2+GzHtNBSkkoCNlCBx6MX6CMKqt3apdSqBKB9ImNjj3ayACzBpywCzLScYdqnvQN3e+LnsKb4qnKMvc11s+9obVBrt76WcCW6iqGMJErw8LcvQvKkccLq5vQ14AgkguGXsbLE+rDllV/w3w3fCjz8K4qzoyJk+BseeMMPAOvbsfOvLLJzjDd9KHKgvyMmyMuR6M9WREIprkI2wgeSxO0LtYInagR2ZCIYIUaZCbV9Q9MEJKwa9NKYgiOgKFsCkaPvo2TvPKQp2IVKXIm/dOjfhlBQ7vNkxvlIrnmdwTu/o4jpq0CTso6PBI+oGJm1SbDKuvHlv/uPxaHUhB8AaEXr4AyNc1Zh7jWbQb0hbIOhDoaG8UIgoaM=-----END CERTIFICATE-----
        minLength: 1
        maxLength: 65536
  VerificationCertificateInput:
    required:
      - verificationCertificate
    type: object
    properties:
      verificationCertificate:
        type: string
        description: 'Verification certificate in PEM encoding.'
        example: -----BEGIN CERTIFICATE-----          MIIBsjCCAVmgAwIBAgIFDg0MCwowCgYIKoZIzj0EAwIwQDEeMBwGA1UEAwwVbWlj
          cm9zb2Z0cmlvdGNvcmVyb290MREwDwYDVQQKDAhNU1JfVEVTVDELMAkGA1UEBhMC
          VVMwIBcNMTcwMTAxMDAwMDAwWhgPMzcwMTAxMzEyMzU5NTlaMFsxOTA3BgNVBAMM
          MEQzNzFGMDgyNjI5NUM3NEJFREExQjMxQ0I2RjgwQTM2QUU0NzdCMUU0MzEzNjIy
          NTERMA8GA1UECgwITVNSX1RFU1QxCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQYI
          KoZIzj0DAQcDQgAEF0/WZW27JwWpVuwyDsigp06Xbjl2Yu8z4Zs6v6rnoUYO6qvl
          8/vnmVN9VNawDaXBrOJYhoOu3Kwd3pRNITiOAKMjMCEwCwYDVR0PBAQDAgIEMBIG
          A1UdEwEB/wQIMAYBAf8CAQEwCgYIKoZIzj0EAwIDRwAwRAIgZDzQSqU85iTa/50F
          +u/lwtfaX9brMLGfC/El5Iq2fLECIDfryUr5NS/4qZ84i8ZximhZEc4QytUPN9//
          qL9z/CUb
          -----END CERTIFICATE-----
        minLength: 1
        maxLength: 65536
  AutoGeneratedAgentCertificateResponse:
    required:
      - id
      - name
      - expiration
      - commonName
      - isVerified
      - agentId
    type: object
    properties:
      id:
        type: string
        example: '60c89c9cf1b56605bc315f78'
        description: 'Unique identifier of the certificate'
      name:
        type: string
        example: 'device001'
        description: "User defined name"
      owner:
        type: string
        example: "somebody@some.com"
        description: 'Owner information'
        minLength: 1
        maxLength: 128
      agentId:
        type: string
        example: "12332121332123"
        description: 'Created agentId/assetId'
        minLength: 1
        maxLength: 128
      expiration:
        type: string
        format: date-time
        example: "2049-12-31T23:59:59.000Z"
        description: 'Expiration date of certificate'
        minLength: 1
        maxLength: 128
      clientId:
        type: string
        example: 'siemens_device001'
        description: "User defined name"
      status:
        type: string
        enum:
          - READY
          - ACTIVE
          - EXPIRED
        example: READY
        description: "The status remains READY until the agent establishes the first connection. It is updated to ACTIVE after the first connection. After expiration date of certificate, status is updated as EXPIRED."
      crendentials:
        type: object
        properties:
          privateKey:
            type: string
            example: "-----BEGIN RSA PRIVATE KEY-----\r\nMIIEowIBAAKCAQEAxvDhfvR9zCk1Sv8l6Vvjbubxi1+MHGWl2DtYL0CGlatmpTZq\r\nSb4nxJRJHaUNoKg7CUqgA+w6CW/fU1p5wS8Y0CFoBHEw7nGov6A+QE0vPSJkB+KX\r\n8N5LwDlkGfNCi/ubM5S0MC9ethQUwVoHB3WbQZNztj6VeyvmglGbHUrQaWfaLHgn\r\nJzzufyejEGE/Hen4VRWS2Zp4zBqg9jmKJjFTn3bf5n7zIpV8qCzMe2tS4WymAWDI\r\nlY/hHu5BGUSo2zUg5ot9NzSsZR2xvlXRXQt792d475cu/whMXJm3JOL3Dz9Gly7X\r\n9q6dgQhwYYS5scya8jc2wNfBiJ+z2/2+FuETYwIDAQABAoIBAFmCYgMMIFmupNLU\r\nkAs6E89/S2ipGdJhDciHkvrXrnZDA1EMdbAuRZhWG7uh2srRRpa8o9h//fDnC/Vl\r\n/Oglt6VVkoaFIz31l7Z4c+nckIeSJK3DjxeJ/U1ExTxDzkpLb546pwQTHCsSR/Bj\r\nAEyj5rIPlP2HlRwxOWqjKwZ39eOmUU/9ufX8fE0X7Sdy7HcvGOIXE+Wp80B3bJiq\r\n/ycgHIZtNM3pQlq4HbnIlyOodSsfKgB1+hgq62RzH2e8SV+qkgEwdhmIf0qXMjxS\r\nnvWw8dtieEMsD4ftUm9D4vYzkSx5Syno7dXKkJfDpC65mI6CE5U7Cg92JteJF1ww\r\n5Urq3vECgYEA+aEA1CGY/xUVO1lyYoIsDcZWhdekLMpaAplH+ItA3HWfqoycvrLN\r\nyO+Tmv8Km+heiRD/Cw1PAjSvWihl2NS1VWFArC4+Gpes92iETbXLi8l/RmPjVIpb\r\nz0wUpd2nnUr/zGPSMZSNyppWwX0B4R30D/vf74u/wfNQPHcjcRxLPGsCgYEAzASy\r\nxNn8BKdWWvmidDwkSpXUurcXdkrQAI/f4rEuBb1mEu96oPWP+nqDHb3FxbWjXFP4\r\nh5Laj0YTxbDcuCafUBFTVLP/eoRlbPnYQfApB+dfkQPxTAW6/h95ybI0TDs4HBIl\r\nArMBGx0KQVns89Hw9InzuLVzwySw157YSn9awukCgYEAihJUnACtWEG4CaiyzOvF\r\nJCVVDBi3NRMDcDaKCV40lPv2QWYe+Jd7nS1uTifNHWkMiPG+r8U/sy+i4dJAawtT\r\n9RKiq9mz/g9w2zOTIkxwdjQQUsXDIqqYl3M0ZH3STP0DuXBo/YV2W968J69WD8b6\r\njLC7Lwr0GHnVImyfTNvifVsCgYASO6VCZHzaaZ4VGVREcQ+JPuS5Hx3Qq5T1R+Zp\r\nWw5S4v9ZV9+svOV2LDbFlK01IyuLV9HRQ/WWclvYAhtntcPtIu9AlamSaHysBZQn\r\nKHByTWJEEochFS4GAggfV3bHDU/Ramm2WQsTQkAlYQUFMVEIeb+3VTgYS5ImYwLP\r\nfZw96QKBgEmB2JrHH3wVpDZ6KVchk+9WJ+jzyScF7DxUiYeq5LgSDLa4It8nms+o\r\nTRhtueTdJSeCbw6rql127AxBca/zz/9c622J6cgCnLLWFblWIW74+6NYhJUNtRD+\r\nXoDu2MPr9pfOjjceDhJNcxYWAOmBnGlcjH1A4sxAxv4FU+kyGdFU\r\n-----END RSA PRIVATE KEY-----\r\n"
            description: "Private key certificate."
          certificatePem:
            type: string
            example: "-----BEGIN CERTIFICATE-----\nMIIDkzCCAnugAwIBAgIUYLWm/kiybq01+8DSAMc1nDJXNWEwDQYJKoZIhvcNAQEL\nBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g\nSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTIyMDIwOTA5MDYy\nNVoXDTQ5MTIzMTIzNTk1OVowWDEYMBYGA1UEAxMPdWZ1a21hc3RlcnBpZWNlMQsw\nCQYDVQQGEwJVUzEQMA4GA1UECBMHQXRsYW50YTEQMA4GA1UEChMHU2llbWVuczEL\nMAkGA1UECxMCSVQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDG8OF+\n9H3MKTVK/yXpW+Nu5vGLX4wcZaXYO1gvQIaVq2alNmpJvifElEkdpQ2gqDsJSqAD\n7DoJb99TWnnBLxjQIWgEcTDucai/oD5ATS89ImQH4pfw3kvAOWQZ80KL+5szlLQw\nL162FBTBWgcHdZtBk3O2PpV7K+aCUZsdStBpZ9oseCcnPO5/J6MQYT8d6fhVFZLZ\nmnjMGqD2OYomMVOfdt/mfvMilXyoLMx7a1LhbKYBYMiVj+Ee7kEZRKjbNSDmi303\nNKxlHbG+VdFdC3v3Z3jvly7/CExcmbck4vcPP0aXLtf2rp2BCHBhhLmxzJryNzbA\n18GIn7Pb/b4W4RNjAgMBAAGjYDBeMB8GA1UdIwQYMBaAFNhVszWxp+kIqBzoMfg8\nSz568szBMB0GA1UdDgQWBBSr0I+yhnx1svuZRi89W+v+6mFtpzAMBgNVHRMBAf8E\nAjAAMA4GA1UdDwEB/wQEAwIHgDANBgkqhkiG9w0BAQsFAAOCAQEAFj7cWEAYSein\nfstQIrp450e6SEKFEAuM+HDL27bg4w9x8Q4q+tqnrhp4zFNUrhV79IPq0Ab25dSJ\nc5qgAowLeR2Sxw52iABxqVbB7NDlL1mWcGGsESa1cU1RIs37HWAr3ihHCldvcuR0\nzf2qci4BgFR2KhUkpDWXHuSaEqv5nYtq6/yyuz+F7KO8cZ7UPtz+rpIY2pQXH7xi\nqCPBhxiupkvm498geJ9j9jUn24AxdKvnI8zAOMkPTBsTWq1ofGFBT1rb9vrHcZYu\naYprJAMai9I58p5kcKUn0i7v4C7BJctJ/87yr4pY9QrD5cWMe8U8wmk8oMlWf7/Z\nTJNMRTyOEQ==\n-----END CERTIFICATE-----\n"
            description: "Public key certificate."
  AutoGeneratedAgentCertificateInput:
    required:
      - name
    type: object
    properties:
      name:
        type: string
        example: "device001"
        pattern: "[a-zA-Z0-9:_-]+"
        description: >-
          Name of the agent certificate. It must match with the following symbols "A-Z",
          "a-z", "0-9", ":", "_", "-".
        minLength: 1
        maxLength: 119
      owner:
        type: string
        example: "somebody@some.com"
        description: 'Owner information'
        minLength: 1
        maxLength: 128
  AutoGeneratedCertificateSimplifiedResponse:
    required:
      - id
      - name
      - expiration
      - commonName
      - isVerified
      - agentId
    type: object
    properties:
      id:
        type: string
        example: '60c89c9cf1b56605bc315f78'
        description: 'Unique identifier of the certificate'
      name:
        type: string
        example: 'device001'
        description: "Certificate name"
      owner:
        type: string
        example: "somebody@some.com"
        description: 'Owner information'
        minLength: 1
        maxLength: 128
      agentId:
        type: string
        example: "12332121332123"
        description: 'Created agentId/assetId'
        minLength: 1
        maxLength: 128
      expiration:
        type: string
        format: date-time
        example: "2049-12-31T23:59:59.000Z"
        description: 'Expiration date of certificate'
        minLength: 1
        maxLength: 128
      clientId:
        type: string
        example: 'siemens_device001'
        description: "Client Id"
      status:
        type: string
        enum:
          - READY
          - ACTIVE
          - EXPIRED
        example: READY
        description: "The status remains READY until the agent establishes the first connection. It is updated to ACTIVE after the first connection. After expiration date of certificate, status is updated as EXPIRED."
  AutoGeneratedAgentCertificateSimplifiedResponse:
    required:
      - agentCertificates
    type: object
    properties:
      agentCertificates:
        type: array
        items:
          $ref: '#/definitions/AutoGeneratedCertificateSimplifiedResponse'
      page:
        allOf:
          - $ref: '#/definitions/Page'
  Page:
    type: object
    required:
      - nextToken
    properties:
      nextToken:
        type: string
        example: '4fad62585def4d84a4c21481b209c116'
        description: 'Opaque token to request next page'
        maxLength: 256
  Errors:
    type: object
    description: Error response body model.
    properties:
      errors:
        type: array
        description: "Concrete error codes and messages are defined at operation error response descriptions in this API specification."
        items:
          type: object
          properties:
            code:
              type: string
              description: "Unique error code. Every code is bound to one (parametrized) message."
              format: "mdsp.core.template.<suffix>"
              example: "mdsp.core.nativemqtt.exampleCode"
            logref:
              type: string
              description: "Logging correlation ID for debugging purposes."
              example: "0bff7e7a-cd25-4576-9908-4180ef086174"
            message:
              type: string
              description: "Human readable error message in English."
              example: "Example error message with parameter value 100"
parameters:
  Page:
    name: page
    in: query
    description: Index of page to be returned. Number of available pages is returned in response body proprety page.totalPages.
    type: number
    default: 0
    minimum: 0
responses:
  InvalidParameter:
    description: |
      Bad request. Possible errors:
      <br>
      <table>
        <colgroup>
          <col span="1" style="width: 30%;">
          <col span="1" style="width: 70%;">
        </colgroup>
        <tr>
          <th align="left">Code Suffix</th>
          <th align="left">Message (parametrized)</th>
        </tr>
        <tr>
          <td>invalidCaCertificate</td>
          <td>CA Certificate is invalid.</td>
        </tr>
        <tr>
          <td>quotaExceeded</td>
          <td>Certificate upload quota exceeded, limit is <2>.</td>
        </tr>
      </table>
    schema:
      $ref: '#/definitions/Errors'
  InvalidVerificationCert:
    description: |
      Bad request. Possible errors:
      <br>
      <table>
        <colgroup>
          <col span="1" style="width: 30%;">
          <col span="1" style="width: 70%;">
        </colgroup>
        <tr>
          <th align="left">Code Suffix</th>
          <th align="left">Message (parametrized)</th>
        </tr>
        <tr>
          <td>invalidVerificationCertificate</td>
          <td>Verification certificate is invalid.</td>
        </tr>
      </table>
    schema:
      $ref: '#/definitions/Errors'
  AlreadyVerified:
    description: |
      Bad request. Possible errors:
      <br>
      <table>
        <colgroup>
          <col span="1" style="width: 30%;">
          <col span="1" style="width: 70%;">
        </colgroup>
        <tr>
          <th align="left">Code Suffix</th>
          <th align="left">Message (parametrized)</th>
        </tr>
        <tr>
          <td>alreadyVerified</td>
          <td>Certificate with id: {id} is already verified.</td>
        </tr>
      </table>
    schema:
      $ref: '#/definitions/Errors'
  CertificateNotFound:
    description: |
      Not found. Possible errors:
      <br>
      <table>
        <colgroup>
          <col span="1" style="width: 30%;">
          <col span="1" style="width: 70%;">
          <col span="1" style="width: 70%;">
        </colgroup>
        <tr>
          <th align="left">Code Suffix</th>
          <th align="left">Message (parametrized)</th>
        </tr>
        <tr>
          <td>certificateNotFound</td>
          <td>Certificate with id: {id} is not found!</td>
        </tr>
      </table>
    schema:
      $ref: '#/definitions/Errors'
  QuotaExceeded:
    description: |
      Bad request. Possible errors:
      <br>
      <table>
        <colgroup>
          <col span="1" style="width: 30%;">
          <col span="1" style="width: 70%;">
        </colgroup>
        <tr>
          <th align="left">Code Suffix</th>
          <th align="left">Message (parametrized)</th>
        </tr>
        <tr>
          <td>quotaExceeded</td>
          <td>Agent Certificate quota exceeded.</td>
        </tr>
        <tr>
          <td>invalidRequestBodyProperty</td>
          <td>{name} must match with the following symbols "A-Z", "a-z", "0-9", ":", "_", "-"</td>
        </tr>
      </table>
    schema:
      $ref: '#/definitions/Errors'
  AgentCertificateNotFound:
    description: |
      Not found. Possible errors:
      <br>
      <table>
        <colgroup>
          <col span="1" style="width: 30%;">
          <col span="1" style="width: 70%;">
          <col span="1" style="width: 70%;">
        </colgroup>
        <tr>
          <th align="left">Code Suffix</th>
          <th align="left">Message (parametrized)</th>
        </tr>
        <tr>
          <td>agentCertificateNotFound</td>
          <td>Agent Certificate with id: {id} is not found!</td>
        </tr>
      </table>
    schema:
      $ref: '#/definitions/Errors'
  Default:
    description: "Other error with any status code and response body format."
