openapi: 3.0.3
info:
  title: Riversoft STCP Gemini API
  version: v2
  description: |-
    Public specification of the management REST API of Riversoft STCP Gemini and Riversoft STCP DirectLink. It is the same API used by the Riversoft Console Portal.

    Replace the example server with the API address of your environment. Use HTTPS in production.

    Protected routes require the `Authorization: Bearer <access_token>` header, obtained from `/oauth/token` or `/oauth/v2/token`. Each route requires a permission in the operator's `scope`; it is stated in the description of each operation.

    Requests with a JSON body must send exactly `Content-Type: application/json`.

    The `CONFIG_TXT` schemas match the `stcpcfgifacetypes-go` configuration module v1.3.2.
  contact:
    name: Riversoft Support
servers:
- url: https://api.exemplo.com:33070
  description: Illustrative address; replace it with the API address of your environment.
tags:
- name: Authentication
- name: Single Sign-On
- name: Information
- name: Instances
- name: Users
- name: Network services
- name: Schedules
- name: File types
- name: Routings
- name: Operators
- name: Groups and permissions
- name: API registration
- name: Error and event codes
- name: Supervision
- name: Supervision files
- name: Maintenance
- name: Reports
security:
- bearerAuth: []
paths:
  /oauth/token:
    post:
      tags:
      - Authentication
      summary: Issue token (password grant)
      operationId: postOAuthToken
      description: |-
        Issues the access token through OAuth 2.0 *password grant*, with native authentication only. This route does not apply two-factor authentication (2FA) and does not accept LDAP sign-in: for those cases, use `POST /oauth/v2/token`.

        After the maximum number of failures set in the password policies, the operator is locked and receives `401`.
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenRequest'
            example:
              grant_type: password
              username: stcpadmin
              password: <senha>
      responses:
        '200':
          description: Token issued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AuthUnauthorized'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '500':
          $ref: '#/components/responses/InternalError'
  /oauth/v2/token:
    post:
      tags:
      - Authentication
      summary: Issue token with 2FA support
      operationId: postOAuthTokenV2
      description: |-
        First sign-in step. Without 2FA, responds with the token, in the same format as `POST /oauth/token`. With 2FA enabled in the API registration, responds with the challenge URL (`URL`); on the operator's first access, also with the TOTP secret (`secret`) and the QR code (`qrcode`) for registration in the authenticator app.

        For LDAP sign-in, send the user in the `<provider>/<operator>` format, where `<provider>` is the name of the LDAP provider registered in `ssoProviders`.
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '200':
          description: Token issued or 2FA challenge.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/TokenResponse'
                - $ref: '#/components/schemas/MFAChallengeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AuthUnauthorized'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '500':
          $ref: '#/components/responses/InternalError'
  /oauth/v2/token/mfa/{challengeID}:
    post:
      tags:
      - Authentication
      summary: Complete sign-in with the 2FA code
      operationId: postOAuthTokenMFA
      description: Second step of the sign-in with 2FA. Send the 6-digit TOTP code generated by the authenticator app. Each
        wrong code responds `401`; on the fourth wrong code, the operator is locked and the challenge is discarded. With a
        nonexistent or discarded challenge, start again at `POST /oauth/v2/token`.
      security: []
      parameters:
      - in: path
        name: challengeID
        required: true
        description: Challenge ID, returned in `URL` in the previous step.
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        description: TOTP code.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MFARequest'
            example:
              Code: '123456'
      responses:
        '200':
          description: Token issued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AuthUnauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /disconnect/api/v3/logout:
    delete:
      tags:
      - Authentication
      summary: Sign out
      operationId: deleteLogout
      description: Invalidates the access token sent in the `Authorization` header. With `sso_logout_end_session` enabled
        and an SSO session, the response returns in `redirect` the address to also end the session at the identity provider.
      responses:
        '200':
          description: Session ended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogoutResponse'
              example:
                data: Logout successful
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/logout:
    delete:
      tags:
      - Authentication
      summary: Sign out (alternative route)
      operationId: deleteLogoutV2
      description: Same function as `DELETE /disconnect/api/v3/logout`.
      responses:
        '200':
          description: Session ended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogoutResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /auth/api/v1/sso/login:
    get:
      tags:
      - Single Sign-On
      summary: Start SSO sign-in
      operationId: getSSOLogin
      description: Redirects the browser to the identity provider given (SAML 2.0 or OAuth 2.0). The available providers are
        listed in `GET /info/sso/providers`. LDAP providers use `POST /oauth/v2/token`.
      security: []
      parameters:
      - in: query
        name: provider
        required: true
        description: Name of the registered identity provider.
        schema:
          type: string
      responses:
        '307':
          description: Redirect to the identity provider.
        '400':
          $ref: '#/components/responses/BadRequest'
  /auth/api/v1/sso/saml2/acs:
    post:
      tags:
      - Single Sign-On
      summary: SAML 2.0 callback (ACS)
      operationId: postSAML2ACS
      description: Return endpoint (*Assertion Consumer Service*) called by the SAML 2.0 provider after authentication. It
        is not called directly by integrations.
      security: []
      responses:
        '303':
          description: Redirect to the `sso_login_redirect` address with `token`, `token_type` (`Bearer`) and `scope` (permissions
            as Base64-encoded JSON) in the query string. On failure, with `error`.
  /auth/api/v1/sso/saml2/slo:
    post:
      tags:
      - Single Sign-On
      summary: SAML 2.0 logout callback (SLO)
      operationId: postSAML2SLO
      description: '*Single Logout* endpoint called by the SAML 2.0 provider.'
      security: []
      responses:
        '303':
          description: Redirect after sign-out.
  /auth/api/v1/sso/oauth2:
    get:
      tags:
      - Single Sign-On
      summary: OAuth 2.0 / OpenID Connect callback
      operationId: getOAuth2Callback
      description: Return endpoint (*callback*) called by the OAuth 2.0 or OpenID Connect provider after authentication. It
        is not called directly by integrations.
      security: []
      responses:
        '303':
          description: Redirect to the `sso_login_redirect` address with `token`, `token_type` (`Bearer`) and `scope` (permissions
            as Base64-encoded JSON) in the query string. On failure, with `error`.
  /info/version:
    get:
      tags:
      - Information
      summary: API version
      operationId: getInfoVersion
      description: API registration name (`rest_name`), version and codename.
      security: []
      responses:
        '200':
          description: API version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionInfo'
              example:
                Name: RestAPI
                Version: 2.3.0
                Model: Pudim
  /info/status:
    get:
      tags:
      - Information
      summary: Connection status
      operationId: getInfoStatus
      description: Status of the API connections to the configuration database and the log database. Useful for monitoring.
      security: []
      responses:
        '200':
          description: Connection status.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ServiceStatus'
              example:
              - name: API_ConfigDB_Connection
                active: true
                status_time: '2026-11-09T10:15:00-03:00'
              - name: API_LogDB_Connection
                active: true
                status_time: '2026-11-09T10:15:00-03:00'
  /info/report:
    get:
      tags:
      - Information
      summary: Connection incident history
      operationId: getInfoReport
      description: Latest incidents logged for one of the `GET /info/status` connections.
      security: []
      parameters:
      - in: query
        name: name
        required: true
        description: Connection name, such as `API_ConfigDB_Connection`.
        schema:
          type: string
      responses:
        '200':
          description: Logged incidents.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '404':
          $ref: '#/components/responses/NotFound'
  /info/license:
    get:
      tags:
      - Information
      summary: License status
      operationId: getInfoLicense
      description: License status, days until expiration and expiration date. When the license expires, the API shuts down.
      security: []
      responses:
        '200':
          description: License status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseStatus'
              example:
                status: active
                daysRemaining: 120
                expiresAt: '2027-03-09T00:00:00Z'
  /info/sso/providers:
    get:
      tags:
      - Information
      summary: Sign-in providers
      operationId: getInfoSSOProviders
      description: Identity providers enabled for sign-in (OAuth 2.0, SAML 2.0 or LDAP).
      security: []
      responses:
        '200':
          description: Enabled providers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LoginProvider'
              example:
              - Name: EntraID
                Type: oauth2
  /stcpcore/v2/instances:
    get:
      tags:
      - Instances
      summary: List instances
      operationId: listInstances
      description: |-
        **Permission:** `stcpcore.instance` ≥ 1 (read).

        The operator sees the instances related to their groups.
      responses:
        '200':
          description: Instances found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Instance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Instances
      summary: Create instance
      operationId: createInstance
      description: |-
        **Permission:** `stcpcore.instance` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      requestBody:
        required: true
        description: Instance to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Instance'
      responses:
        '200':
          description: Instance created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}:
    get:
      tags:
      - Instances
      summary: Get instance
      operationId: getInstance
      description: '**Permission:** `stcpcore.instance` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Instance found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Instance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Instances
      summary: Update instance
      operationId: updateInstance
      description: |-
        **Permission:** `stcpcore.instance` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Instance updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Instance'
      responses:
        '200':
          description: Instance updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Instances
      summary: Delete instance
      operationId: deleteInstance
      description: '**Permission:** `stcpcore.instance` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Instance deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/members:
    get:
      tags:
      - Instances
      summary: List instances and their users
      operationId: listInstanceMembers
      description: '**Permission:** `stcpcore.instance` ≥ 15 (read and write).'
      responses:
        '200':
          description: Instances with the users of each one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstanceMembers'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/users:
    get:
      tags:
      - Users
      summary: List users
      operationId: listUsers
      description: |-
        **Permission:** `stcpcore.user` ≥ 1 (read).

        Each user has a single mailbox.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Users found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Users
      summary: Create user
      operationId: createUser
      description: |-
        **Permission:** `stcpcore.user` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: User to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
      responses:
        '200':
          description: User created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/users/id/{userID}:
    get:
      tags:
      - Users
      summary: Get user
      operationId: getUser
      description: '**Permission:** `stcpcore.user` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: User found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Users
      summary: Update user
      operationId: updateUser
      description: |-
        **Permission:** `stcpcore.user` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: User updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
      responses:
        '200':
          description: User updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Users
      summary: Delete user
      operationId: deleteUser
      description: '**Permission:** `stcpcore.user` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: User deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/services:
    get:
      tags:
      - Network services
      summary: List network services
      operationId: listNetworkServices
      description: |-
        **Permission:** `stcpcore.service` ≥ 1 (read).

        Includes the supervision services (Supervision (gemini) and Supervision (directlink)) and the Riversoft STCP DirectLink API service.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Network services found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/NetworkService'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Network services
      summary: Create network service
      operationId: createNetworkService
      description: |-
        **Permission:** `stcpcore.service` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Network service to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkService'
      responses:
        '200':
          description: Network service created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/services/id/{serviceID}:
    get:
      tags:
      - Network services
      summary: Get network service
      operationId: getNetworkService
      description: '**Permission:** `stcpcore.service` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: serviceID
        required: true
        description: Network service ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Network service found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/NetworkService'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Network services
      summary: Update network service
      operationId: updateNetworkService
      description: |-
        **Permission:** `stcpcore.service` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: serviceID
        required: true
        description: Network service ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Network service updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkService'
      responses:
        '200':
          description: Network service updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Network services
      summary: Delete network service
      operationId: deleteNetworkService
      description: '**Permission:** `stcpcore.service` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: serviceID
        required: true
        description: Network service ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Network service deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/schedules:
    get:
      tags:
      - Schedules
      summary: List schedules
      operationId: listSchedules
      description: '**Permission:** `stcpcore.schedule` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Schedules found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Schedule'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Schedules
      summary: Create schedule
      operationId: createSchedule
      description: |-
        **Permission:** `stcpcore.schedule` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Schedule to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Schedule'
      responses:
        '200':
          description: Schedule created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/schedules/id/{scheduleID}:
    get:
      tags:
      - Schedules
      summary: Get schedule
      operationId: getSchedule
      description: '**Permission:** `stcpcore.schedule` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: scheduleID
        required: true
        description: Schedule ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Schedule found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Schedule'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Schedules
      summary: Update schedule
      operationId: updateSchedule
      description: |-
        **Permission:** `stcpcore.schedule` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: scheduleID
        required: true
        description: Schedule ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Schedule updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Schedule'
      responses:
        '200':
          description: Schedule updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Schedules
      summary: Delete schedule
      operationId: deleteSchedule
      description: '**Permission:** `stcpcore.schedule` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: scheduleID
        required: true
        description: Schedule ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Schedule deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/ftypesglobal:
    get:
      tags:
      - File types
      summary: List global file types
      operationId: listFileTypeGlobals
      description: |-
        **Permission:** `stcpcore.filetypeglobal` ≥ 1 (read).

        File types applied when the user has no file type of their own that matches the file.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Global file types found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/FileTypeGlobal'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - File types
      summary: Create global file type
      operationId: createFileTypeGlobal
      description: |-
        **Permission:** `stcpcore.filetypeglobal` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Global file type to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileTypeGlobal'
      responses:
        '200':
          description: Global file type created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/ftypesglobal/id/{ftypesglobalID}:
    get:
      tags:
      - File types
      summary: Get global file type
      operationId: getFileTypeGlobal
      description: '**Permission:** `stcpcore.filetypeglobal` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: ftypesglobalID
        required: true
        description: Global file type ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Global file type found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/FileTypeGlobal'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - File types
      summary: Update global file type
      operationId: updateFileTypeGlobal
      description: |-
        **Permission:** `stcpcore.filetypeglobal` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: ftypesglobalID
        required: true
        description: Global file type ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Global file type updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileTypeGlobal'
      responses:
        '200':
          description: Global file type updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - File types
      summary: Delete global file type
      operationId: deleteFileTypeGlobal
      description: '**Permission:** `stcpcore.filetypeglobal` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: ftypesglobalID
        required: true
        description: Global file type ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Global file type deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/ftypesglobal/check:
    get:
      tags:
      - File types
      summary: Test a file name against the global file types
      operationId: checkFileTypeGlobal
      description: |-
        **Permission:** `stcpcore.filetypeglobal` ≥ 1 (read).

        Returns the global file types whose regular expression matches the given name.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: query
        name: filename
        required: true
        description: File name to test.
        schema:
          type: string
      responses:
        '200':
          description: Matching types.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/FileTypeGlobal'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/users/id/{userID}/filetypes:
    get:
      tags:
      - File types
      summary: List user file types
      operationId: listFileTypes
      description: '**Permission:** `stcpcore.filetype` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: User file types found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/FileType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - File types
      summary: Create user file type
      operationId: createFileType
      description: |-
        **Permission:** `stcpcore.filetype` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: User file type to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileType'
      responses:
        '200':
          description: User file type created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/users/id/{userID}/filetypes/id/{filetypeID}:
    get:
      tags:
      - File types
      summary: Get user file type
      operationId: getFileType
      description: '**Permission:** `stcpcore.filetype` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: filetypeID
        required: true
        description: User file type ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: User file type found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/FileType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - File types
      summary: Update user file type
      operationId: updateFileType
      description: |-
        **Permission:** `stcpcore.filetype` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: filetypeID
        required: true
        description: User file type ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: User file type updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileType'
      responses:
        '200':
          description: User file type updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - File types
      summary: Delete user file type
      operationId: deleteFileType
      description: '**Permission:** `stcpcore.filetype` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: filetypeID
        required: true
        description: User file type ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: User file type deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/users/id/{userID}/filetypes/check:
    get:
      tags:
      - File types
      summary: Test a file name against the user file types
      operationId: checkFileType
      description: |-
        **Permission:** `stcpcore.filetype` ≥ 1 (read).

        Returns the user file types whose regular expression matches the given name.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: userID
        required: true
        description: User ID.
        schema:
          type: integer
          format: int64
      - in: query
        name: filename
        required: true
        description: File name to test.
        schema:
          type: string
      responses:
        '200':
          description: Matching types.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/FileType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/routing:
    get:
      tags:
      - Routings
      summary: List routings
      operationId: listRoutings
      description: |-
        **Permission:** `stcpcore.routing` ≥ 1 (read).

        Routings and rules used by Riversoft STCP Gemini Rename.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Routings found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Routing'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Routings
      summary: Create routing
      operationId: createRouting
      description: '**Permission:** `stcpcore.routing` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Routing to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Routing'
      responses:
        '200':
          description: Routing created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Routings
      summary: Update routing
      operationId: updateRouting
      description: |-
        **Permission:** `stcpcore.routing` ≥ 15 (read and write).

        The routing is identified by the `ID` sent in the body.
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Routing updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Routing'
      responses:
        '200':
          description: Routing updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/routing/id/{bundleID}:
    get:
      tags:
      - Routings
      summary: Get routing
      operationId: getRouting
      description: '**Permission:** `stcpcore.routing` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: bundleID
        required: true
        description: Routing ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Routing found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Routing'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Routings
      summary: Delete routing
      operationId: deleteRouting
      description: '**Permission:** `stcpcore.routing` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: bundleID
        required: true
        description: Routing ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Routing deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpcore/v2/instances/id/{instanceID}/routing/name/{bundleName}:
    get:
      tags:
      - Routings
      summary: Get routing by name
      operationId: getRoutingByName
      description: '**Permission:** `stcpcore.routing` ≥ 1 (read).'
      parameters:
      - in: path
        name: instanceID
        required: true
        description: Instance ID.
        schema:
          type: integer
          format: int64
      - in: path
        name: bundleName
        required: true
        description: Routing name.
        schema:
          type: string
      responses:
        '200':
          description: Routing found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Routing'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/operators:
    get:
      tags:
      - Operators
      summary: List operators
      operationId: listOperators
      description: '**Permission:** `stcpadmin.operator` ≥ 1 (read).'
      responses:
        '200':
          description: Operators found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Operator'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Operators
      summary: Create operator
      operationId: createOperator
      description: |-
        **Permission:** `stcpadmin.operator` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      requestBody:
        required: true
        description: Operator to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Operator'
      responses:
        '200':
          description: Operator created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/operators/id/{operatorID}:
    get:
      tags:
      - Operators
      summary: Get operator
      operationId: getOperator
      description: '**Permission:** `stcpadmin.operator` ≥ 1 (read).'
      parameters:
      - in: path
        name: operatorID
        required: true
        description: Operator ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Operator found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Operator'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Operators
      summary: Update operator
      operationId: updateOperator
      description: |-
        **Permission:** `stcpadmin.operator` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: operatorID
        required: true
        description: Operator ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Operator updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Operator'
      responses:
        '200':
          description: Operator updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Operators
      summary: Delete operator
      operationId: deleteOperator
      description: '**Permission:** `stcpadmin.operator` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: operatorID
        required: true
        description: Operator ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Operator deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/operators/me:
    get:
      tags:
      - Operators
      summary: Get own profile
      operationId: getMyProfile
      description: '**Permission:** `stcpadmin.operator` ≥ 1 (read).'
      responses:
        '200':
          description: Authenticated operator profile.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Operator'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Operators
      summary: Update own profile
      operationId: updateMyProfile
      description: '**Permission:** `stcpadmin.operator` ≥ 15 (read and write).'
      requestBody:
        required: true
        description: Profile updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Operator'
      responses:
        '200':
          description: Profile updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/operators/me/password:
    put:
      tags:
      - Operators
      summary: Change own password
      operationId: updateMyPassword
      description: |-
        **Permission:** `stcpadmin.operator` ≥ 15 (read and write).

        The new password is checked against the password policies of the API registration, including the password history.
      requestBody:
        required: true
        description: New password.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewPasswordRequest'
            example:
              NewPassword: <nova-senha>
      responses:
        '200':
          description: Password changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/groups:
    get:
      tags:
      - Groups and permissions
      summary: List groups
      operationId: listGroups
      description: |-
        **Permission:** `stcpadmin.group` ≥ 1 (read).

        Groups define the operators' permissions and the instances, operators and users they can access.
      responses:
        '200':
          description: Groups found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Group'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Groups and permissions
      summary: Create group
      operationId: createGroup
      description: |-
        **Permission:** `stcpadmin.group` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      requestBody:
        required: true
        description: Group to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '200':
          description: Group created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/groups/id/{groupID}:
    get:
      tags:
      - Groups and permissions
      summary: Get group
      operationId: getGroup
      description: '**Permission:** `stcpadmin.group` ≥ 1 (read).'
      parameters:
      - in: path
        name: groupID
        required: true
        description: Group ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Group found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Group'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Groups and permissions
      summary: Update group
      operationId: updateGroup
      description: |-
        **Permission:** `stcpadmin.group` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: groupID
        required: true
        description: Group ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Group updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '200':
          description: Group updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Groups and permissions
      summary: Delete group
      operationId: deleteGroup
      description: '**Permission:** `stcpadmin.group` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: groupID
        required: true
        description: Group ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Group deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/groups/id/{groupID}/operators:
    get:
      tags:
      - Groups and permissions
      summary: List group operators
      operationId: listGroupOperators
      description: '**Permission:** `stcpadmin.group` ≥ 1 (read).'
      parameters:
      - in: path
        name: groupID
        required: true
        description: Group ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Group operators.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        ID:
                          type: integer
                        Name:
                          type: string
        '404':
          $ref: '#/components/responses/NotFound'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /stcpadmin/v2/settings:
    get:
      tags:
      - API registration
      summary: List API registrations
      operationId: listApiSettings
      description: |-
        **Permission:** `stcpadmin.setting` ≥ 1 (read).

        The API registration (API/Supervision in the Riversoft Console Portal) holds TLS, address, 2FA, password policies, SSO providers and the supervision nodes. At startup, the API loads the registration whose name matches the `rest_name` in `config.json`.
      responses:
        '200':
          description: API registrations found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/ApiSetting'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - API registration
      summary: Create API registration
      operationId: createApiSetting
      description: |-
        **Permission:** `stcpadmin.setting` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      requestBody:
        required: true
        description: API registration to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiSetting'
      responses:
        '200':
          description: API registration created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/settings/id/{apiID}:
    get:
      tags:
      - API registration
      summary: Get API registration
      operationId: getApiSetting
      description: '**Permission:** `stcpadmin.setting` ≥ 1 (read).'
      parameters:
      - in: path
        name: apiID
        required: true
        description: API registration ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: API registration found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/ApiSetting'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - API registration
      summary: Update API registration
      operationId: updateApiSetting
      description: |-
        **Permission:** `stcpadmin.setting` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: apiID
        required: true
        description: API registration ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: API registration updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiSetting'
      responses:
        '200':
          description: API registration updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - API registration
      summary: Delete API registration
      operationId: deleteApiSetting
      description: '**Permission:** `stcpadmin.setting` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: apiID
        required: true
        description: API registration ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: API registration deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/api/policies:
    get:
      tags:
      - API registration
      summary: Get password policies
      operationId: getPasswordPolicies
      description: '**Permission:** `stcpadmin.operator` ≥ 15 (read and write).'
      responses:
        '200':
          description: Password policies in effect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PoliciesResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/error_events:
    get:
      tags:
      - Error and event codes
      summary: List error and event codes
      operationId: listErrorEvents
      description: |-
        **Permission:** `stcpadmin.error_event` ≥ 1 (read).

        Description and procedures associated with the message codes (`MSGnnnn`).
      responses:
        '200':
          description: Error and event codes found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/ErrorEvent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Error and event codes
      summary: Create error or event code
      operationId: createErrorEvent
      description: |-
        **Permission:** `stcpadmin.error_event` ≥ 15 (read and write).

        Send the entity without the `ID` field. The `Content-Type` header must be exactly `application/json`.
      requestBody:
        required: true
        description: Error or event code to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ErrorEvent'
      responses:
        '200':
          description: Error or event code created. `data` contains the entity name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadmin/v2/error_events/id/{eeID}:
    get:
      tags:
      - Error and event codes
      summary: Get error or event code
      operationId: getErrorEvent
      description: '**Permission:** `stcpadmin.error_event` ≥ 1 (read).'
      parameters:
      - in: path
        name: eeID
        required: true
        description: Error or event code ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Error or event code found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/ErrorEvent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Error and event codes
      summary: Update error or event code
      operationId: updateErrorEvent
      description: |-
        **Permission:** `stcpadmin.error_event` ≥ 15 (read and write).

        Send the complete entity. Masked sensitive fields (`****`) keep the stored value.
      parameters:
      - in: path
        name: eeID
        required: true
        description: Error or event code ID.
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        description: Error or event code updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ErrorEvent'
      responses:
        '200':
          description: Error or event code updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Error and event codes
      summary: Delete error or event code
      operationId: deleteErrorEvent
      description: '**Permission:** `stcpadmin.error_event` ≥ 15 (read and write).'
      parameters:
      - in: path
        name: eeID
        required: true
        description: Error or event code ID.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Error or event code deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/monitor/nodes:
    post:
      tags:
      - Supervision
      summary: List supervision nodes
      operationId: listMonitorNodes
      description: |-
        **Permission:** `stcpadminsvc.mon_console_info` ≥ 1 (read).

        Supervision nodes enabled in the API registration (Riversoft STCP Gemini Server and Riversoft STCP DirectLink).
      responses:
        '200':
          description: Enabled nodes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SupervisionNode'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/instance/info:
    post:
      tags:
      - Supervision
      summary: Instance information
      operationId: getInstanceInfo
      description: |-
        Status and data of the running instance.

        **Permission:** `stcpadminsvc.mon_inst_info` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/instance/restart:
    post:
      tags:
      - Supervision
      summary: Restart the instance
      operationId: restartInstance
      description: |-
        Restarts the instance on the given node.

        **Permission:** `stcpadminsvc.mon_inst_restart` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/instance/debug:
    post:
      tags:
      - Supervision
      summary: Change the debug level
      operationId: setDebugLevel
      description: |-
        Changes the debug level without restarting the service. Set the level in `Level`.

        **Permission:** `stcpadminsvc.main_set_level` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/instance/console:
    post:
      tags:
      - Supervision
      summary: Console messages
      operationId: getConsoleInfo
      description: |-
        Latest instance console messages.

        **Permission:** `stcpadminsvc.mon_console_info` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/user/info:
    post:
      tags:
      - Supervision
      summary: User information
      operationId: getUserInfo
      description: |-
        Status of the users' mailboxes and connections. Set `Name` for a specific user.

        **Permission:** `stcpadminsvc.mon_user_info` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/user/start:
    post:
      tags:
      - Supervision
      summary: Start outbound connection
      operationId: startUserConnection
      description: |-
        Starts an outbound connection with the user given in `Name`.

        **Permission:** `stcpadminsvc.mon_user_start_conn` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/user/stop:
    post:
      tags:
      - Supervision
      summary: Cancel connection
      operationId: stopUserConnection
      description: |-
        Cancels the ongoing connection of the user given in `Name`.

        **Permission:** `stcpadminsvc.mon_user_canc_conn` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/user/create_folder:
    post:
      tags:
      - Supervision
      summary: Create the directory structure
      operationId: createUserFolders
      description: |-
        Creates the mailbox directory structure of the user given in `Name`.

        **Permission:** `stcpadminsvc.main_user_create_folders` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/schedule/start:
    post:
      tags:
      - Supervision
      summary: Run schedule
      operationId: startSchedule
      description: |-
        Runs the schedule given in `Name` right away.

        **Permission:** `stcpadminsvc.mon_sched_exec` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/service/info:
    post:
      tags:
      - Supervision
      summary: Service information
      operationId: getServiceInfo
      description: |-
        Status of the instance network services.

        **Permission:** `stcpadminsvc.mon_inst_serv` ≥ 1 (read).

        The API sends the command to the supervision nodes enabled for the instance given in `Instance`; with `Node`, only to that node.
      requestBody:
        required: true
        description: Instance, node and command arguments.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionCommand'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              Node: ''
              Level: ''
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/sandbox:
    get:
      tags:
      - Supervision files
      summary: List mailbox files (sandbox)
      operationId: listSandboxFiles
      description: '**Permission:** `stcpadminsvc.mon_sandbox_file_management` ≥ 1 (read).'
      parameters:
      - in: query
        name: instance
        required: true
        description: Instance.
        schema:
          type: string
      - in: query
        name: node
        required: false
        description: Supervision node. Empty sends to all the instance nodes.
        schema:
          type: string
      - in: query
        name: user
        required: true
        description: User who owns the mailbox.
        schema:
          type: string
      - in: query
        name: area
        required: false
        description: Area (directory) to list.
        schema:
          type: string
      - in: query
        name: filter
        required: false
        description: 'Base64-encoded JSON filter: `{"Regex": "...", "Start": <unix>, "End": <unix>}`.'
        schema:
          type: string
          format: byte
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Supervision files
      summary: Send a file to the mailbox (sandbox)
      operationId: addSandboxFile
      description: |-
        **Permission:** `stcpadminsvc.mon_sandbox_file_management` ≥ 1 (read).

        The file content goes in `Data`, Base64-encoded.
      requestBody:
        required: true
        description: File to send.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionFileRequest'
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Supervision files
      summary: Delete a file from the mailbox (sandbox)
      operationId: deleteSandboxFile
      description: '**Permission:** `stcpadminsvc.mon_sandbox_file_management` ≥ 1 (read).'
      requestBody:
        required: true
        description: File to delete.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionFileRequest'
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpmon/keystore:
    get:
      tags:
      - Supervision files
      summary: List keystore files
      operationId: listKeystoreFiles
      description: '**Permission:** `stcpadminsvc.mon_keystore_file_management` ≥ 1 (read).'
      parameters:
      - in: query
        name: instance
        required: true
        description: Instance.
        schema:
          type: string
      - in: query
        name: node
        required: false
        description: Supervision node. Empty sends to all the instance nodes.
        schema:
          type: string
      - in: query
        name: area
        required: false
        description: Area (directory) to list.
        schema:
          type: string
      - in: query
        name: filter
        required: false
        description: 'Base64-encoded JSON filter: `{"Regex": "...", "Start": <unix>, "End": <unix>}`.'
        schema:
          type: string
          format: byte
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Supervision files
      summary: Send a key or certificate to the keystore
      operationId: addKeystoreFile
      description: |-
        **Permission:** `stcpadminsvc.mon_keystore_file_management` ≥ 1 (read).

        The file content goes in `Data`, Base64-encoded.
      requestBody:
        required: true
        description: File to send.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionFileRequest'
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Supervision files
      summary: Delete a file from the keystore
      operationId: deleteKeystoreFile
      description: '**Permission:** `stcpadminsvc.mon_keystore_file_management` ≥ 1 (read).'
      requestBody:
        required: true
        description: File to delete.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupervisionFileRequest'
      responses:
        '200':
          description: Responses from each node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupervisionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/reset/user/password:
    post:
      tags:
      - Maintenance
      summary: Reset a user's password
      operationId: resetUserPassword
      description: |-
        Sets a new password for the user, checked against the instance password policies.

        **Permission:** `stcpadminsvc.main_user_reset_pwd` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              NewPassword: <nova-senha>
              CurrentPassword: ''
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/change/user/password:
    post:
      tags:
      - Maintenance
      summary: Change a user's password
      operationId: changeUserPassword
      description: |-
        Changes the user's password, sending the current password in `CurrentPassword`.

        **Permission:** `stcpadminsvc.main_user_reset_pwd` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              NewPassword: <nova-senha>
              CurrentPassword: ''
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/reset/user/lock:
    post:
      tags:
      - Maintenance
      summary: Unlock a user
      operationId: resetUserLock
      description: |-
        Removes the user's sign-in failure lock.

        **Permission:** `stcpadminsvc.main_user_reset_lock` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              NewPassword: <nova-senha>
              CurrentPassword: ''
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/reset/user/hash:
    post:
      tags:
      - Maintenance
      summary: Reset a user's authentication hash
      operationId: resetUserHash
      description: |-
        Recreates the user's authentication hash.

        **Permission:** `stcpadminsvc.main_user_reset_hash` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              NewPassword: <nova-senha>
              CurrentPassword: ''
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/reset/user/2fa:
    post:
      tags:
      - Maintenance
      summary: Reset a user's 2FA
      operationId: resetUserOTP
      description: |-
        Deletes the user's TOTP secret; a new one is generated at the next sign-in.

        **Permission:** `stcpadminsvc.main_user_reset_hash` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Instance: TESTE
              Name: PARCEIRO01
              NewPassword: <nova-senha>
              CurrentPassword: ''
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/reset/operator/password:
    post:
      tags:
      - Maintenance
      summary: Reset an operator's password
      operationId: resetOperatorPassword
      description: |-
        Sets a new password for the operator.

        **Permission:** `stcpadminsvc.main_oper_reset_pwd` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Name: operador01
              NewPassword: <nova-senha>
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/change/operator/password:
    post:
      tags:
      - Maintenance
      summary: Change an operator's password
      operationId: changeOperatorPassword
      description: |-
        Changes the operator's password, sending the current password in `CurrentPassword`.

        **Permission:** `stcpadminsvc.main_oper_reset_pwd` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Name: operador01
              NewPassword: <nova-senha>
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/reset/operator/lock:
    post:
      tags:
      - Maintenance
      summary: Unlock an operator
      operationId: resetOperatorLock
      description: |-
        Removes the operator's sign-in failure lock.

        **Permission:** `stcpadminsvc.main_oper_reset_pwd` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Name: operador01
              NewPassword: <nova-senha>
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /stcpadminsvc/v2/supervision/stcpauth/reset/operator/2fa:
    post:
      tags:
      - Maintenance
      summary: Reset an operator's 2FA
      operationId: resetOperatorOTP
      description: |-
        Deletes the operator's TOTP secret; a new one is generated at the next sign-in.

        **Permission:** `stcpadminsvc.main_oper_reset_pwd` ≥ 1 (read).
      requestBody:
        required: true
        description: Entity and passwords, when applicable.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaintenanceRequest'
            example:
              Name: operador01
              NewPassword: <nova-senha>
      responses:
        '200':
          description: Operation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/system:
    get:
      tags:
      - Reports
      summary: System events
      operationId: getSystemReport
      description: |-
        Events logged by the product modules.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`.
      parameters:
      - in: query
        name: instance
        required: false
        description: Instance.
        schema:
          type: string
      - in: query
        name: msg
        required: false
        description: Part of the message text.
        schema:
          type: string
      - in: query
        name: code
        required: false
        description: Message code, such as `MSG0065`.
        schema:
          type: string
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: limit
        required: false
        description: Records per page. Default 100; maximum 15000.
        schema:
          type: integer
          default: 100
          maximum: 15000
      - in: query
        name: index
        required: false
        description: Pagination index, given in the `next` URI.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Records found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ReportPage'
                - type: object
                  properties:
                    data:
                      type: array
                      nullable: true
                      items:
                        $ref: '#/components/schemas/MessageRow'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/users:
    get:
      tags:
      - Reports
      summary: User events
      operationId: getUsersReport
      description: |-
        User connection events.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`.
      parameters:
      - in: query
        name: instance
        required: false
        description: Instance.
        schema:
          type: string
      - in: query
        name: user
        required: false
        description: User. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: msg
        required: false
        description: Part of the message text.
        schema:
          type: string
      - in: query
        name: code
        required: false
        description: Message code, such as `MSG0065`.
        schema:
          type: string
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: limit
        required: false
        description: Records per page. Default 100; maximum 15000.
        schema:
          type: integer
          default: 100
          maximum: 15000
      - in: query
        name: index
        required: false
        description: Pagination index, given in the `next` URI.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Records found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ReportPage'
                - type: object
                  properties:
                    data:
                      type: array
                      nullable: true
                      items:
                        $ref: '#/components/schemas/MessageRow'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/instance:
    get:
      tags:
      - Reports
      summary: Instance messages
      operationId: getInstanceReport
      description: |-
        All messages logged for the instance.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`.
      parameters:
      - in: query
        name: instance
        required: false
        description: Instance.
        schema:
          type: string
      - in: query
        name: user
        required: false
        description: User. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: msg
        required: false
        description: Part of the message text.
        schema:
          type: string
      - in: query
        name: code
        required: false
        description: Message code, such as `MSG0065`.
        schema:
          type: string
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: limit
        required: false
        description: Records per page. Default 100; maximum 15000.
        schema:
          type: integer
          default: 100
          maximum: 15000
      - in: query
        name: index
        required: false
        description: Pagination index, given in the `next` URI.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Records found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ReportPage'
                - type: object
                  properties:
                    data:
                      type: array
                      nullable: true
                      items:
                        $ref: '#/components/schemas/MessageRow'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/operators:
    get:
      tags:
      - Reports
      summary: Operator activities
      operationId: getOperatorsReport
      description: |-
        Actions performed by operators, including through the API.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`.
      parameters:
      - in: query
        name: operador
        required: false
        description: Operator.
        schema:
          type: string
      - in: query
        name: msg
        required: false
        description: Part of the message text.
        schema:
          type: string
      - in: query
        name: code
        required: false
        description: Message code, such as `MSG0065`.
        schema:
          type: string
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: limit
        required: false
        description: Records per page. Default 100; maximum 15000.
        schema:
          type: integer
          default: 100
          maximum: 15000
      - in: query
        name: index
        required: false
        description: Pagination index, given in the `next` URI.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Records found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ReportPage'
                - type: object
                  properties:
                    data:
                      type: array
                      nullable: true
                      items:
                        $ref: '#/components/schemas/OperatorRow'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/transfers:
    get:
      tags:
      - Reports
      summary: Transfer history
      operationId: getTransfersReport
      description: |-
        File transmissions and receptions.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`.
      parameters:
      - in: query
        name: instance
        required: false
        description: Instance.
        schema:
          type: string
      - in: query
        name: user
        required: false
        description: User. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: tags
        required: false
        description: File type tag. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: events
        required: false
        description: '`5` = transmission; `7` = reception. Can be repeated.'
        schema:
          type: array
          items:
            type: integer
            enum:
            - 5
            - 7
        explode: true
      - in: query
        name: results
        required: false
        description: '`0` = successful only; `-1` = with error only. Omit for all.'
        schema:
          type: integer
          enum:
          - 0
          - -1
      - in: query
        name: filename
        required: false
        description: File name.
        schema:
          type: string
      - in: query
        name: msg
        required: false
        description: Part of the message text.
        schema:
          type: string
      - in: query
        name: code
        required: false
        description: Message code, such as `MSG0065`.
        schema:
          type: string
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: limit
        required: false
        description: Records per page. Default 100; maximum 15000.
        schema:
          type: integer
          default: 100
          maximum: 15000
      - in: query
        name: index
        required: false
        description: Pagination index, given in the `next` URI.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Records found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ReportPage'
                - type: object
                  properties:
                    data:
                      type: array
                      nullable: true
                      items:
                        $ref: '#/components/schemas/TransferRow'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/audit/transfers:
    get:
      tags:
      - Reports
      summary: Transfer audit
      operationId: getAuditTransfers
      description: |-
        Transfers in the period, without pagination.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`.
      parameters:
      - in: query
        name: instance
        required: false
        description: Instance.
        schema:
          type: string
      - in: query
        name: user
        required: false
        description: User. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: filename
        required: false
        description: File name.
        schema:
          type: string
      - in: query
        name: tags
        required: false
        description: File type tag. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: direction
        required: false
        description: '`in` = inbound; `out` = outbound. Omit for both.'
        schema:
          type: string
          enum:
          - in
          - out
      - in: query
        name: status
        required: false
        description: '`error` = with error; `all` = all. Omit for successful only.'
        schema:
          type: string
          enum:
          - error
          - all
      responses:
        '200':
          description: Records found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    nullable: true
                    items:
                      $ref: '#/components/schemas/TransferRow'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/audit/sessions:
    get:
      tags:
      - Reports
      summary: Session audit
      operationId: getAuditSessions
      description: |-
        Inbound and outbound connections in the period, without pagination.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`.
      parameters:
      - in: query
        name: instance
        required: false
        description: Instance.
        schema:
          type: string
      - in: query
        name: user
        required: false
        description: User. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: filename
        required: false
        description: File name.
        schema:
          type: string
      - in: query
        name: tags
        required: false
        description: File type tag. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: direction
        required: false
        description: '`in` = inbound; `out` = outbound. Omit for both.'
        schema:
          type: string
          enum:
          - in
          - out
      - in: query
        name: status
        required: false
        description: '`error` = with error; `all` = all. Omit for successful only.'
        schema:
          type: string
          enum:
          - error
          - all
      responses:
        '200':
          description: Records found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    nullable: true
                    items:
                      $ref: '#/components/schemas/TransferRow'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /reports/v2/audit/statistics:
    get:
      tags:
      - Reports
      summary: Transfer statistics
      operationId: getAuditStatistics
      description: |-
        Transfer totals grouped by period.

        **Permission:** `stcpadminsvc.report_evt_sys` ≥ 1 (read).

        If `start` or `end` are missing or are not integers, the API responds `403`. The `instance` parameter is required.
      parameters:
      - in: query
        name: instance
        required: true
        description: Instance. Required.
        schema:
          type: string
      - in: query
        name: user
        required: false
        description: User. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: filename
        required: false
        description: File name.
        schema:
          type: string
      - in: query
        name: tags
        required: false
        description: File type tag. Can be repeated.
        schema:
          type: array
          items:
            type: string
        explode: true
      - in: query
        name: start
        required: true
        description: Start of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: end
        required: true
        description: End of the period (Unix timestamp in milliseconds). Required.
        schema:
          type: integer
          format: int64
      - in: query
        name: statistics
        required: false
        description: 'Grouping: `year`, `month`, `week`, `dayofweek`, `day` or `hour`. Omit for the period total.'
        schema:
          type: string
          enum:
          - year
          - month
          - week
          - dayofweek
          - day
          - hour
      responses:
        '200':
          description: Totals found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    nullable: true
                    items:
                      type: object
                      additionalProperties: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Access token issued by `/oauth/token` or `/oauth/v2/token`.
  schemas:
    Error:
      type: object
      properties:
        field:
          type: string
          description: Entity or area of the operation.
        error:
          type: string
          description: Error type.
        error_description:
          type: string
          description: Error description.
      description: API error format.
    TokenRequest:
      type: object
      properties:
        grant_type:
          type: string
          description: Always `password`.
          enum:
          - password
        username:
          type: string
          description: Operator. For LDAP (only in `/oauth/v2/token`), use `<provider>/<operator>`.
        password:
          type: string
          description: Operator password.
          format: password
      required:
      - grant_type
      - username
      - password
    TokenResponse:
      type: object
      properties:
        access_token:
          type: string
          description: Access token. Valid for the time set in `session_duration` in the API `config.json` (default 60 minutes,
            maximum 720).
        scope:
          type: string
          description: Operator permissions (JSON serialized as text; see `Permissions`).
        operator:
          type: string
          description: Authenticated operator.
        rest_name:
          type: string
          description: API registration name (`rest_name`).
        token_type:
          type: string
          description: Always `Bearer`.
          enum:
          - Bearer
      required:
      - access_token
      - token_type
    MFAChallengeResponse:
      type: object
      properties:
        URL:
          type: string
          description: 'Path to complete the sign-in: `/oauth/v2/token/mfa/{challengeID}`.'
        secret:
          type: string
          description: TOTP secret in Base32, returned only on the first access.
          format: password
        qrcode:
          type: string
          description: 'TOTP secret QR code, returned only on the first access: 200 × 200 PNG image in standard Base64, to
            use in `data:image/png;base64,`.'
      required:
      - URL
    MFARequest:
      type: object
      properties:
        Code:
          type: string
          description: 6-digit TOTP code.
        Operator:
          type: string
          description: 'Optional and ignored: the API uses the challenge operator.'
      required:
      - Code
    DataMessage:
      type: object
      properties:
        data:
          type: string
          description: Operation result.
    LogoutResponse:
      type: object
      properties:
        data:
          type: string
          description: Operation result (`Logout successful`).
        redirect:
          type: string
          description: Logout address at the identity provider. Present only with `sso_logout_end_session` enabled and an
            SSO session.
    WriteResult:
      type: object
      properties:
        data:
          type: string
          description: Name of the saved entity or confirmation message.
        field:
          type: string
          description: Entity type.
    ListEnvelope:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status.
        field:
          type: string
          description: Entity type.
        data:
          type: array
          description: Entities found.
          items: {}
    VersionInfo:
      type: object
      properties:
        Name:
          type: string
          description: API registration name.
        Version:
          type: string
          description: Version.
        Model:
          type: string
          description: Version codename.
    ServiceStatus:
      type: object
      properties:
        name:
          type: string
          description: Checked connection.
        active:
          type: boolean
          description: Connection is active.
        status_time:
          type: string
          description: Check time.
          format: date-time
        check_error:
          type: string
          description: Last check error, if any.
        reconnect_error:
          type: string
          description: Last reconnection error, if any.
    LicenseStatus:
      type: object
      properties:
        status:
          type: string
          description: 'Always `active`: with an invalid or expired license, the API does not stay up.'
          enum:
          - active
        daysRemaining:
          type: integer
          description: Days until expiration. `-1` when the license does not expire.
        expiresAt:
          type: string
          description: Expiration date (RFC 3339). Empty when the license does not expire.
    LoginProvider:
      type: object
      properties:
        Name:
          type: string
          description: Provider name.
        Type:
          type: string
          description: Provider type.
          enum:
          - oauth2
          - saml2
          - ldap
    Instance:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          allOf:
          - $ref: '#/components/schemas/CfgInstance'
          description: 'Entity configuration, in the same format used by the Riversoft Console Portal. On update (`PUT`),
            the `CONFIG_TXT` sent replaces the stored one entirely: omitted fields go back to empty or zero. So query the
            entity, change the fields and send the complete object. Unknown fields are ignored without error. Passwords and
            secrets are returned masked in queries; if you send the masked value back, the API keeps the stored one.'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    InstanceMembers:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                description: Instance ID.
              Name:
                type: string
                description: Instance.
              Users:
                type: array
                items:
                  type: object
                  properties:
                    ID:
                      type: integer
                      description: User ID.
                    Name:
                      type: string
                      description: User.
    User:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        INSTANCE_ID:
          type: integer
          description: Instance ID.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          allOf:
          - $ref: '#/components/schemas/CfgUser'
          description: 'Entity configuration, in the same format used by the Riversoft Console Portal. On update (`PUT`),
            the `CONFIG_TXT` sent replaces the stored one entirely: omitted fields go back to empty or zero. So query the
            entity, change the fields and send the complete object. Unknown fields are ignored without error. Passwords and
            secrets are returned masked in queries; if you send the masked value back, the API keeps the stored one.'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    NetworkService:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        INSTANCE_ID:
          type: integer
          description: Instance ID.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          allOf:
          - $ref: '#/components/schemas/CfgService'
          description: 'Entity configuration, in the same format used by the Riversoft Console Portal. On update (`PUT`),
            the `CONFIG_TXT` sent replaces the stored one entirely: omitted fields go back to empty or zero. So query the
            entity, change the fields and send the complete object. Unknown fields are ignored without error. Passwords and
            secrets are returned masked in queries; if you send the masked value back, the API keeps the stored one.'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    Schedule:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        INSTANCE_ID:
          type: integer
          description: Instance ID.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          allOf:
          - $ref: '#/components/schemas/CfgSchedule'
          description: 'Entity configuration, in the same format used by the Riversoft Console Portal. On update (`PUT`),
            the `CONFIG_TXT` sent replaces the stored one entirely: omitted fields go back to empty or zero. So query the
            entity, change the fields and send the complete object. Unknown fields are ignored without error. Passwords and
            secrets are returned masked in queries; if you send the masked value back, the API keeps the stored one.'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    FileTypeGlobal:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        INSTANCE_ID:
          type: integer
          description: Instance ID.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          allOf:
          - $ref: '#/components/schemas/CfgFileType'
          description: 'Entity configuration, in the same format used by the Riversoft Console Portal. On update (`PUT`),
            the `CONFIG_TXT` sent replaces the stored one entirely: omitted fields go back to empty or zero. So query the
            entity, change the fields and send the complete object. Unknown fields are ignored without error. Passwords and
            secrets are returned masked in queries; if you send the masked value back, the API keeps the stored one.'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    FileType:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        USER_ID:
          type: integer
          description: User ID.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          allOf:
          - $ref: '#/components/schemas/CfgFileType'
          description: 'Entity configuration, in the same format used by the Riversoft Console Portal. On update (`PUT`),
            the `CONFIG_TXT` sent replaces the stored one entirely: omitted fields go back to empty or zero. So query the
            entity, change the fields and send the complete object. Unknown fields are ignored without error. Passwords and
            secrets are returned masked in queries; if you send the masked value back, the API keeps the stored one.'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    Routing:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        INSTANCE_ID:
          type: integer
          description: Instance ID.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          allOf:
          - $ref: '#/components/schemas/CfgRouting'
          description: 'Entity configuration, in the same format used by the Riversoft Console Portal. On update (`PUT`),
            the `CONFIG_TXT` sent replaces the stored one entirely: omitted fields go back to empty or zero. So query the
            entity, change the fields and send the complete object. Unknown fields are ignored without error. Passwords and
            secrets are returned masked in queries; if you send the masked value back, the API keeps the stored one.'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    Operator:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          type: object
          properties:
            Operator:
              type: object
              properties:
                IdOperador:
                  type: integer
                  description: Internal ID.
                NomeCompleto:
                  type: string
                  description: Full name.
                Descricao:
                  type: string
                  description: Description.
                Email:
                  type: string
                  description: Email.
                  format: email
                Senha:
                  type: string
                  description: Password. Returned masked.
                  format: password
                Estado:
                  type: integer
                  description: '`1` = active; `0` = locked.'
                IntervaloMonitoracao:
                  type: integer
                  description: Supervision refresh interval, in seconds (minimum 30).
                LinhasPorPagina:
                  type: integer
                  description: Rows per page in the Portal (minimum 50).
                TempoInatividade:
                  type: integer
                  description: Session inactivity time, in seconds (minimum 300).
                Expiration:
                  type: integer
                  description: Session validity, in seconds (minimum 300).
                Tipo:
                  type: integer
                  description: Operator type.
                LoginFails:
                  type: integer
                  description: Consecutive sign-in failures.
                  readOnly: true
                DataUltimoAcesso:
                  type: string
                  description: Last access.
                  readOnly: true
                EnderecoIPUltimoAcesso:
                  type: string
                  description: Last access IP.
                  readOnly: true
              required:
              - NomeCompleto
              - Email
            Relations:
              type: object
              properties:
                Groups:
                  type: array
                  description: IDs of the operator's groups.
                  items:
                    type: integer
              required:
              - Groups
            Entity:
              type: object
              properties:
                Name:
                  type: string
                Version:
                  type: integer
          required:
          - Operator
          - Relations
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    PermissionValue:
      type: integer
      enum:
      - 0
      - 1
      - 15
      description: '`0` = no access; `1` = read; `15` = read and write.'
    Permissions:
      type: object
      properties:
        stcpcore:
          type: object
          properties:
            instance:
              $ref: '#/components/schemas/PermissionValue'
            user:
              $ref: '#/components/schemas/PermissionValue'
            service:
              $ref: '#/components/schemas/PermissionValue'
            schedule:
              $ref: '#/components/schemas/PermissionValue'
            routing:
              $ref: '#/components/schemas/PermissionValue'
            filetype:
              $ref: '#/components/schemas/PermissionValue'
            filetypeglobal:
              $ref: '#/components/schemas/PermissionValue'
        stcpadmin:
          type: object
          properties:
            operator:
              $ref: '#/components/schemas/PermissionValue'
            group:
              $ref: '#/components/schemas/PermissionValue'
            oper_group:
              $ref: '#/components/schemas/PermissionValue'
            error_event:
              $ref: '#/components/schemas/PermissionValue'
            logtransfer:
              $ref: '#/components/schemas/PermissionValue'
            logmessage:
              $ref: '#/components/schemas/PermissionValue'
            logsystem:
              $ref: '#/components/schemas/PermissionValue'
            setting:
              $ref: '#/components/schemas/PermissionValue'
        stcpauth:
          type: object
          properties:
            reset_hash:
              $ref: '#/components/schemas/PermissionValue'
            reset_password:
              $ref: '#/components/schemas/PermissionValue'
            reset_lock:
              $ref: '#/components/schemas/PermissionValue'
            check_status:
              $ref: '#/components/schemas/PermissionValue'
            change_password:
              $ref: '#/components/schemas/PermissionValue'
        stcpadminsvc:
          type: object
          properties:
            query_inst_sched:
              $ref: '#/components/schemas/PermissionValue'
            query_inst_users:
              $ref: '#/components/schemas/PermissionValue'
            query_reg_inst:
              $ref: '#/components/schemas/PermissionValue'
            query_reg_serv:
              $ref: '#/components/schemas/PermissionValue'
            query_reg_cod_err:
              $ref: '#/components/schemas/PermissionValue'
            query_reg_cod_evt:
              $ref: '#/components/schemas/PermissionValue'
            query_reg_group:
              $ref: '#/components/schemas/PermissionValue'
            query_reg_oper:
              $ref: '#/components/schemas/PermissionValue'
            query_rest_api:
              $ref: '#/components/schemas/PermissionValue'
            report_evt_inst:
              $ref: '#/components/schemas/PermissionValue'
            report_evt_oper:
              $ref: '#/components/schemas/PermissionValue'
            report_evt_sys:
              $ref: '#/components/schemas/PermissionValue'
            report_evt_user:
              $ref: '#/components/schemas/PermissionValue'
            report_freq_conn:
              $ref: '#/components/schemas/PermissionValue'
            report_freq_transf:
              $ref: '#/components/schemas/PermissionValue'
            report_transf_audit:
              $ref: '#/components/schemas/PermissionValue'
            report_transf_stat:
              $ref: '#/components/schemas/PermissionValue'
            report_transf_graph:
              $ref: '#/components/schemas/PermissionValue'
            report_transf_hist:
              $ref: '#/components/schemas/PermissionValue'
            report_transf_route:
              $ref: '#/components/schemas/PermissionValue'
            mon_sched_exec:
              $ref: '#/components/schemas/PermissionValue'
            mon_inst_restart:
              $ref: '#/components/schemas/PermissionValue'
            mon_inst_info:
              $ref: '#/components/schemas/PermissionValue'
            mon_inst_serv:
              $ref: '#/components/schemas/PermissionValue'
            mon_user_start_conn:
              $ref: '#/components/schemas/PermissionValue'
            mon_user_canc_conn:
              $ref: '#/components/schemas/PermissionValue'
            mon_user_info:
              $ref: '#/components/schemas/PermissionValue'
            mon_console_info:
              $ref: '#/components/schemas/PermissionValue'
            mon_sandbox_file_management:
              $ref: '#/components/schemas/PermissionValue'
            mon_keystore_file_management:
              $ref: '#/components/schemas/PermissionValue'
            main_set_level:
              $ref: '#/components/schemas/PermissionValue'
            main_sched_ch_state:
              $ref: '#/components/schemas/PermissionValue'
            main_oper_reset_pwd:
              $ref: '#/components/schemas/PermissionValue'
            main_user_ch_state:
              $ref: '#/components/schemas/PermissionValue'
            main_user_reset_pwd:
              $ref: '#/components/schemas/PermissionValue'
            main_user_reset_lock:
              $ref: '#/components/schemas/PermissionValue'
            main_user_reset_hash:
              $ref: '#/components/schemas/PermissionValue'
            main_user_create_folders:
              $ref: '#/components/schemas/PermissionValue'
        stcpmon:
          type: object
          description: Reserved. No permissions.
        stcpconfigs:
          type: object
          deprecated: true
          description: Deprecated. Kept only for compatibility with older versions of the Riversoft Console Portal.
          properties:
            config_instances:
              $ref: '#/components/schemas/PermissionValue'
            config_filetypeglobals:
              $ref: '#/components/schemas/PermissionValue'
            config_schedules:
              $ref: '#/components/schemas/PermissionValue'
            config_users:
              $ref: '#/components/schemas/PermissionValue'
            config_filetypes:
              $ref: '#/components/schemas/PermissionValue'
            config_services:
              $ref: '#/components/schemas/PermissionValue'
            config_settings:
              $ref: '#/components/schemas/PermissionValue'
            config_operators:
              $ref: '#/components/schemas/PermissionValue'
            config_groups:
              $ref: '#/components/schemas/PermissionValue'
            config_cod_errs_evts:
              $ref: '#/components/schemas/PermissionValue'
      description: Permissions by resource group. When the operator belongs to more than one group, the permissions are combined.
    Group:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
          format: int64
        NAME:
          type: string
          description: Name.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          type: object
          properties:
            Permissions:
              $ref: '#/components/schemas/Permissions'
            Relations:
              type: object
              properties:
                Instances:
                  type: array
                  description: Instance IDs. `[0]` = all.
                  items:
                    type: integer
                Operators:
                  type: array
                  description: Operator IDs. `[0]` = all.
                  items:
                    type: integer
                Users:
                  type: array
                  description: User IDs. `[0]` = all.
                  items:
                    type: integer
              required:
              - Instances
              - Operators
              - Users
            Entity:
              type: object
              properties:
                Name:
                  type: string
                Version:
                  type: integer
          required:
          - Relations
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - NAME
      - CONFIG_TXT
    SupervisionNode:
      type: object
      properties:
        Enable:
          type: boolean
          description: Node enabled.
        Instance:
          type: string
          description: Supervised instance.
        Nodename:
          type: string
          description: Node name.
        Username:
          type: string
          description: 'Supervision credential: user.'
        Password:
          type: string
          description: 'Supervision credential: password. Returned masked.'
          format: password
        Host:
          type: string
          description: Supervision service address.
        Port:
          type: integer
          description: 'Port: default 33050 (Riversoft STCP Gemini) or 33060 (Riversoft STCP DirectLink).'
        Tls:
          type: boolean
          description: TLS connection.
        Cert:
          type: string
          description: Certificate used for TLS.
    PasswordPolicies:
      type: object
      properties:
        enabled:
          type: integer
          description: Policies enabled (`1`) or not (`0`).
        maxFails:
          type: integer
          description: Sign-in failures before lockout.
        maxDays:
          type: integer
          description: Password validity, in days.
        minLen:
          type: integer
          description: Minimum password length.
        complexity:
          type: integer
          description: Required complexity level.
        historyCount:
          type: integer
          description: Previous passwords that cannot be reused.
    ApiSettingConfig:
      type: object
      properties:
        Monitor:
          type: array
          items:
            $ref: '#/components/schemas/SupervisionNode'
          description: Supervision nodes.
        passwordPolicies:
          $ref: '#/components/schemas/PasswordPolicies'
        ssl:
          type: boolean
          description: TLS enabled.
        cert:
          type: string
          description: TLS certificate.
        key:
          type: string
          description: TLS private key.
        passphrase:
          type: string
          description: Private key password. Returned masked.
          format: password
        host:
          type: string
          description: API interface.
        port:
          type: integer
          description: API port.
        enable2FA:
          type: boolean
          description: Requires 2FA (TOTP) at operator sign-in.
        sso_login_redirect:
          type: string
          description: Return URL after SSO sign-in.
        sso_logout_end_session:
          type: boolean
          description: Also ends the session at the identity provider on sign-out.
        ssoProviders:
          type: array
          description: Identity providers (SSO).
          items:
            $ref: '#/components/schemas/SsoProvider'
        Entity:
          type: object
          properties:
            Name:
              type: string
            Version:
              type: integer
      description: Values in the API `config.json` take precedence over those in the registration.
    ApiSetting:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
        NAME:
          type: string
          description: Registration name; must match the `rest_name` in the API `config.json`.
        DESCRIPTION:
          type: string
          description: Description.
        CONFIG_TXT:
          $ref: '#/components/schemas/ApiSettingConfig'
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
      required:
      - NAME
      - CONFIG_TXT
    PoliciesResponse:
      type: object
      properties:
        Name:
          type: string
          description: API registration name.
        Policies:
          $ref: '#/components/schemas/PasswordPolicies'
    ErrorEvent:
      type: object
      properties:
        ID:
          type: integer
          description: ID. Omitted on creation.
        CODE:
          type: string
          description: Message code, such as `MSG0089`.
        DESCRIPTION:
          type: string
          description: Description.
        PROCEDURES:
          type: string
          description: Recommended procedures.
        CREATED:
          type: string
          description: Creation date.
          readOnly: true
        MODIFIED:
          type: string
          description: Last modification date.
          readOnly: true
        EXTRA_TXT:
          type: string
          description: Additional data.
      required:
      - CODE
    NewPasswordRequest:
      type: object
      properties:
        NewPassword:
          type: string
          description: New password.
          format: password
      required:
      - NewPassword
    SupervisionCommand:
      type: object
      properties:
        Instance:
          type: string
          description: Instance.
        Node:
          type: string
          description: Supervision node. Empty sends to all the instance nodes.
        Name:
          type: string
          description: User or schedule, depending on the command.
        Level:
          type: string
          description: Debug level, for the `debug` command.
      required:
      - Instance
    SupervisionFileRequest:
      type: object
      properties:
        Instance:
          type: string
          description: Instance.
        Node:
          type: string
          description: Supervision node.
        User:
          type: string
          description: User who owns the mailbox (sandbox only).
        Area:
          type: string
          description: Destination area (directory).
        Filename:
          type: string
          description: File name.
        Data:
          type: string
          description: File content in Base64 (upload only).
          format: byte
      required:
      - Instance
      - Filename
    SupervisionResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              Instance:
                type: string
                description: Instance.
              Nodename:
                type: string
                description: Node that responded.
              Data:
                type: array
                description: 'Node response. On connection failure, `{"error": "...", "Timestamp": <unix>}`.'
                items:
                  type: object
                  additionalProperties: true
    MaintenanceRequest:
      type: object
      properties:
        Instance:
          type: string
          description: Instance (users only).
        Name:
          type: string
          description: User or operator.
        NewPassword:
          type: string
          description: New password (password reset and change).
          format: password
        CurrentPassword:
          type: string
          description: Current password (password change).
          format: password
      required:
      - Name
    MaintenanceResponse:
      type: object
      properties:
        data:
          description: Operation result.
        redirect:
          type: string
          description: Address the Portal must redirect to, when applicable.
    ReportPage:
      type: object
      properties:
        data:
          type: array
          description: Records. `null` when there are no records.
          nullable: true
          items: {}
        next:
          type: string
          description: Next page URI. Empty when there is no next page.
    MessageRow:
      type: object
      properties:
        DATAHORA:
          type: string
          description: Date and time.
        INSTANCE:
          type: string
          description: Instance.
        USUARIO:
          type: string
          description: User or module.
        CODIGOMENSAGEM:
          type: string
          description: Message code.
        MENSAGEM:
          type: string
          description: Message.
        IDMENSAGEM:
          type: integer
          description: Message ID.
    OperatorRow:
      type: object
      properties:
        DATAHORA:
          type: string
          description: Date and time.
        OPERADOR:
          type: string
          description: Operator.
        MODULO:
          type: string
          description: Module.
        CODIGOMENSAGEM:
          type: string
          description: Message code.
        MENSAGEM:
          type: string
          description: Operation details (service, operator, status, method and path).
    TransferRow:
      type: object
      properties:
        DATAHORA:
          type: string
          description: Date and time.
        INSTANCE:
          type: string
          description: Instance.
        USUARIO:
          type: string
          description: User or module.
        CONEXAO:
          type: string
          description: Connection or routing details.
        EVENTO:
          type: integer
          description: '`5` = transmission; `7` = reception; `1`/`3` = inbound/outbound session.'
        NOMEARQUIVO:
          type: string
          description: File name.
        TAMARQUIVO:
          type: integer
          description: File size.
        TAGS:
          type: string
          description: File type tags.
        RESULTADO:
          type: integer
          description: '`0` = success; other value = error code.'
        MENSAGEM:
          type: string
          description: Message.
        REDE:
          type: string
          description: Network or service used.
    CfgInstance:
      type: object
      properties:
        Entity:
          $ref: '#/components/schemas/CfgEntity'
        Authentication:
          $ref: '#/components/schemas/CfgInstanceAuthentication'
        Log:
          $ref: '#/components/schemas/CfgInstanceLog'
        Startup:
          $ref: '#/components/schemas/CfgInstanceStartup'
      description: Instance `CONFIG_TXT`.
    CfgEntity:
      type: object
      properties:
        Version:
          type: integer
          format: int64
          description: Structure version. Use `2`.
        Name:
          type: string
          description: 'Entity type: `instance`, `user`, `service`, `schedule`, `filetypeglobal`, `filetype`, `routing`, `group`,
            `operator` or `setting`.'
      description: Structure identification. `Version` = `2`.
    CfgInstanceAuthentication:
      type: object
      properties:
        DLLName:
          type: string
          description: Access library of the authentication database.
        DBName:
          type: string
          description: Name of the authentication database.
        DBHost:
          type: string
          description: Server of the authentication database.
        DBPort:
          type: integer
          format: int64
          description: Port of the authentication database.
        DBUser:
          type: string
          description: User of the authentication database.
        DBPswd:
          type: string
          format: password
          description: 'Password of the authentication database. Sensitive data: returned masked in queries.'
        AuthType:
          type: integer
          format: int64
          description: 'Authentication type: `0` operating system, `1` STCP, `2` RSA SecurID, `3` LDAP.'
        AuthPrefix:
          type: string
        AuthDomain:
          type: string
        AuthMFAMethod:
          type: integer
          format: int64
          description: 'Users'' MFA: `0` disabled, `1` authenticator app (TOTP), `2` code by email, `3` code by SMS.'
        AuthPolicyEnabled:
          type: integer
          format: int64
          description: '`1` enables the password policies.'
        AuthPolicyPswdMinLen:
          type: integer
          format: int64
          description: Minimum password length.
        AuthPolicyPswdMaxDays:
          type: integer
          format: int64
          description: Password validity, in days.
        AuthPolicyPswdMaxFails:
          type: integer
          format: int64
          description: Failures until the user is locked.
        AuthPolicyPswdHistoryCount:
          type: integer
          format: int64
          description: Previous passwords that cannot be reused.
        AuthPolicyPswdComplex:
          type: integer
          format: int64
          description: 'Required complexity, as a sum: `1` lowercase letter, `2` uppercase letter, `4` digit, `8` symbol (`15`
            = all).'
        AuthSecurIdCfgFile:
          type: string
          description: RSA SecurID configuration file.
        AuthLDAPRemoteAddress:
          type: string
          description: LDAP server address.
        AuthLDAPRemotePort:
          type: integer
          format: int64
          description: LDAP server port.
        AuthLDAPDomain:
          type: string
          description: LDAP domain.
        AuthLDAPBindMethod:
          type: string
          description: LDAP bind method.
        AuthLDAPBindUser:
          type: string
          description: LDAP bind user.
        AuthLDAPBindPswd:
          type: string
          format: password
          description: 'LDAP bind password. Sensitive data: returned masked in queries.'
        AuthLDAPTls:
          type: integer
          format: int64
          description: '`1` uses TLS in the LDAP connection.'
        AuthLDAPTlsCertVerify:
          type: integer
          format: int64
          description: '`1` validates the LDAP server certificate.'
        AuthLDAPTlsCertCaFile:
          type: string
          description: LDAP server CA file.
      description: 'Authentication of the instance''s transfer users: authentication database, authentication type, MFA, password
        policies and LDAP.'
    CfgInstanceLog:
      type: object
      properties:
        Verbose:
          type: integer
          format: int64
          description: Log detail level.
        Console:
          type: integer
          format: int64
          description: '`1` also shows the messages on the console.'
        External:
          type: integer
          format: int64
          description: '`1` sends the messages to an external program.'
        ExecProg:
          type: string
          description: External program that receives the messages.
        DLLName:
          type: string
          description: Access library of the log database.
        DBName:
          type: string
          description: Name of the log database.
        DBHost:
          type: string
          description: Server of the log database.
        DBPort:
          type: integer
          format: int64
          description: Port of the log database.
        DBUser:
          type: string
          description: User of the log database.
        DBPswd:
          type: string
          format: password
          description: 'Password of the log database. Sensitive data: returned masked in queries.'
        FilterRegEx:
          type: string
          description: Regular expression of the messages logged.
        FilterRegExNeg:
          type: string
          description: Regular expression of the messages ignored.
      description: 'Instance log: log database, detail level and filters.'
    CfgInstanceStartup:
      type: object
      properties:
        Version:
          type: string
          description: Instance version.
        OSType:
          type: string
          description: 'Operating system: `LINUX`, `WINNT`, `WIN32` or `MACOS`.'
        ServiceName:
          type: string
          description: Service name in the operating system.
        ServiceDescription:
          type: string
          description: Service description in the operating system.
        SystemDirectory:
          type: string
          description: Instance system directory.
        KeystoreDirectory:
          type: string
          description: Keys and certificates directory.
        DataDirectory:
          type: string
          description: Users' mailbox directory.
        TempDirectoryName:
          type: string
          description: Name of each mailbox's temporary directory.
        ControlDirectoryName:
          type: string
          description: Name of each mailbox's control directory.
        FormatDirectoryName:
          type: string
          description: Name of each mailbox's formatting directory.
        InboxDirectoryName:
          type: string
          description: Name of each mailbox's inbox directory.
        RestartDirectoryName:
          type: string
          description: Name of each mailbox's restart directory.
        OutboxDirectoryName:
          type: string
          description: Name of each mailbox's outbox directory.
        PendingDirectoryName:
          type: string
          description: Name of each mailbox's pending directory.
        BackupDirectoryName:
          type: string
          description: Name of each mailbox's backup directory.
        LinkDirectoryName:
          type: string
          description: Name of each mailbox's link directory.
        MaxSessions:
          type: integer
          format: int64
          description: Maximum number of simultaneous instance sessions.
        IntervalSchedule:
          type: integer
          format: int64
          description: Schedule check interval.
        SerialNumber:
          type: string
          description: License serial number.
        DisableSchedule:
          type: integer
          format: int64
          description: '`1` disables running the schedules.'
        ExternalLockEnable:
          type: integer
          format: int64
          description: '`1` enables the external lock.'
        ExternalLockTimeout:
          type: integer
          format: int64
          description: External lock timeout.
        ExternalLockWait:
          type: integer
          format: int64
          description: Wait between attempts to get the lock.
        ExternalLockRetries:
          type: integer
          format: int64
          description: Attempts to get the lock.
        ExternalLockType:
          type: string
          description: 'External lock provider: `in-memory`, `filesystem` or `redis`.'
        ExternalLockAddress:
          type: string
          description: External lock service address (`host:port`).
        MaximunConsoleMsgs:
          type: integer
          format: int64
          description: Maximum number of messages kept on the console.
        MaximunAsyncProcesses:
          type: integer
          format: int64
          description: Maximum number of simultaneous processes.
        MaxMonitorSessions:
          type: integer
          format: int64
          description: Maximum number of supervision sessions.
        ssoProviders:
          type: array
          items:
            $ref: '#/components/schemas/SsoProvider'
          description: Identity providers (SSO).
      description: 'Instance startup: service, directories, sessions, external lock and SSO providers.'
    SsoProvider:
      type: object
      properties:
        ssoEnable:
          type: boolean
          description: Enables the provider.
        ssoName:
          type: string
          description: Provider name. `google`, `microsoft` and `apple` have specific handling.
        ssoType:
          type: string
          description: 'Type: `oauth2`, `saml2`, `jwt` or `ldap`.'
        ssoClientId:
          type: string
          description: Application ID (OAuth 2.0/SAML 2.0) or user (LDAP).
        ssoClientSecret:
          type: string
          format: password
          description: 'Application secret (OAuth 2.0/SAML 2.0) or password (LDAP). Sensitive data: returned masked in queries.'
        ssoTenantOrTeamId:
          type: string
          description: Tenant (Microsoft), Team ID (Apple) or domain (LDAP).
        ssoPrivateKeyFile:
          type: string
          description: Signing private key (Apple, JWT or SAML 2.0).
        ssoPrivateKeyPswd:
          type: string
          format: password
          description: 'Private key password. Sensitive data: returned masked in queries.'
        ssoPrivateKeyId:
          type: string
          description: Signing key ID (Apple or JWT).
        ssoScope:
          type: string
          description: Scopes (OAuth 2.0), search filter (LDAP) or `scope` claim (JWT).
        ssoAudience:
          type: string
          description: Expected or issued audience (SAML 2.0 or JWT). If omitted, uses `ssoTenantOrTeamId` (SAML 2.0) or `ssoClientId`
            (JWT).
        ssoCertsUrl:
          type: string
          description: Certificates to validate the ID token (OAuth 2.0) or the JWT signature.
        ssoAuthUrl:
          type: string
          description: Authorization URL (OAuth 2.0) or IdP metadata (SAML 2.0).
        ssoTokenUrl:
          type: string
          description: Token URL (OAuth 2.0).
        ssoLogoutUrl:
          type: string
          description: IdP logout/end session URL (OAuth 2.0).
        ssoRedirectUrlOrEndpoint:
          type: string
          description: Login callback (OAuth 2.0), ACS (SAML 2.0) or connection endpoint (LDAP).
        ssoRedirectLogoutUrl:
          type: string
          description: Logout callback (OAuth 2.0, SAML 2.0). Required in OAuth 2.0 for providers with a logout round trip,
            such as Microsoft.
        ssoAppRedirectUrl:
          type: string
          description: Operator destination after logout (OAuth 2.0, SAML 2.0).
        ssoMethodName:
          type: string
          description: JWT signing algorithm.
        ssoTokenExpirationTime:
          type: integer
          description: Default JWT validity, in seconds.
      description: Identity provider (SSO).
    CfgUser:
      type: object
      properties:
        Entity:
          $ref: '#/components/schemas/CfgEntity'
        General:
          $ref: '#/components/schemas/CfgUserGeneral'
        Token:
          $ref: '#/components/schemas/CfgUserToken'
        Net1:
          $ref: '#/components/schemas/CfgUserNet'
        Net2:
          $ref: '#/components/schemas/CfgUserNet'
        OFTP:
          $ref: '#/components/schemas/CfgUserOFTP'
        SFTP:
          $ref: '#/components/schemas/CfgUserSFTP'
        S3:
          $ref: '#/components/schemas/CfgUserS3'
        AzBlob:
          $ref: '#/components/schemas/CfgUserAzBlob'
        OciBlob:
          $ref: '#/components/schemas/CfgUserOciBlob'
        GcpBlob:
          $ref: '#/components/schemas/CfgUserGcpBlob'
        WhatsApp:
          $ref: '#/components/schemas/CfgUserWhatsApp'
        AS2:
          $ref: '#/components/schemas/CfgUserAS2'
        FTP:
          $ref: '#/components/schemas/CfgUserFTP'
        WebHook:
          $ref: '#/components/schemas/CfgUserWebHook'
      description: Transfer user `CONFIG_TXT`. Fill in the section of the protocol set in `General.TransferProtocol`.
    CfgUserGeneral:
      type: object
      properties:
        IdCodeProfile:
          type: string
          description: User identification.
        Description:
          type: string
          description: Description.
        Email:
          type: string
          description: User email.
        Mobile:
          type: string
          description: User mobile phone.
        Password:
          type: string
          format: password
          description: 'User password. Sensitive data: returned masked in queries.'
        MaxSessions:
          type: integer
          format: int64
          description: Maximum number of simultaneous sessions.
        EnabledEERP:
          type: integer
          format: int64
          description: '`1` enables EERP (OFTP delivery confirmation).'
        Backup:
          type: integer
          format: int64
          description: '`1` keeps a copy of the sent files.'
        Locked:
          type: integer
          format: int64
          description: '`1` = locked; `0` = unlocked.'
        AuthPswdNeverExpire:
          type: integer
          format: int64
          description: '`1` = the password never expires.'
        ConnectionBeforeCommand:
          type: string
          description: Command run before the connection.
        ConnectionStartCommand:
          type: string
          description: Command run when the connection starts.
        ConnectionStartCommandWait:
          type: integer
          format: int64
          description: '`1` waits for the command to finish.'
        ConnectionEndCommand:
          type: string
          description: Command run when the connection ends.
        ConnectionEndCommandWait:
          type: integer
          format: int64
          description: '`1` waits for the command to finish.'
        ConnectionBeforeCommandWait:
          type: integer
          format: int64
          description: '`1` waits for the command to finish.'
        FileMinLenFilterTx:
          type: integer
          format: int64
          description: Minimum size of the files sent.
        FileMinLenFilterRx:
          type: integer
          format: int64
          description: Minimum size of the files received.
        FileTypeDefault:
          type: string
          description: Default file type.
        ConnectionFilter:
          type: string
          description: Filter of source addresses accepted in the connection.
        FileFilterTx:
          type: string
          description: Filter (mask) of the files sent.
        FileFilterRx:
          type: string
          description: Filter (mask) of the files received.
        FileLenFilterTx:
          type: integer
          format: int64
          description: Maximum size of the files sent.
        FileLenFilterRx:
          type: integer
          format: int64
          description: Maximum size of the files received.
        FileUserdataWithFileIdTx:
          type: integer
          format: int64
        CreateControlCompletedFileRx:
          type: integer
          format: int64
          description: 'Completed-receipt control file: `0` disabled, `1` enabled with timestamp, `2` enabled.'
        StartDateHour:
          type: integer
          format: int64
          description: Start hour of the time window.
        StartDateMinute:
          type: integer
          format: int64
          description: Start minute of the time window.
        StartDateSecond:
          type: integer
          format: int64
          description: Start second of the time window.
        EndDateHour:
          type: integer
          format: int64
          description: End hour of the time window.
        EndDateMinute:
          type: integer
          format: int64
          description: End minute of the time window.
        EndDateSecond:
          type: integer
          format: int64
          description: End second of the time window.
        WeekDayInterval:
          type: integer
          format: int64
          description: Days of the week of the time window.
        TransferProtocol:
          type: integer
          format: int64
          description: 'Outbound connection protocol: `0` disabled, `1` OFTP, `2` SFTP, `4` Amazon S3, `5` Azure Blob Storage,
            `6` OCI Object Storage, `7` Google Cloud Storage, `8` WhatsApp, `9` FTP, `10` AS2, `11` Webhook.'
        TxOptimized:
          type: integer
          format: int64
          description: '`1` enables optimized sending.'
        AuthMFAMethod:
          type: integer
          format: int64
          description: 'User MFA: `0` follows the instance; `128` disabled for this user.'
        TransferProtocolIn:
          type: integer
          format: int64
          description: 'Protocols accepted in the inbound connection, as a sum of `2^protocol` (codes of `TransferProtocol`).
            Example: OFTP and SFTP = `2 + 4` = `6`.'
      description: 'General user data: identification, password, protocol, sessions, file filters, connection commands and
        time window.'
    CfgUserToken:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        CheckTokenId:
          type: integer
          format: int64
          description: '`1` requires the token in the user authentication.'
        SendTokenId:
          type: integer
          format: int64
          description: '`1` sends the token in the connection.'
        Token:
          type: string
          format: password
          description: 'User token. Sensitive data: returned masked in queries.'
      description: User authentication token.
    CfgUserNet:
      type: object
      properties:
        Enable:
          type: integer
          format: int64
          description: '`1` enables the network.'
        Debug:
          type: integer
          format: int64
          description: Debug level.
        DLLName:
          type: string
          description: Module library.
        Type:
          type: string
        Mode:
          type: string
        FTPDownloadRemoteDir:
          type: string
          description: Remote directory the files are downloaded from.
        FTPDownloadRemoteFileMask:
          type: string
          description: Mask of the downloaded files.
        FTPDownloadRemoteFileRemove:
          type: integer
          format: int64
          description: '`1` removes the remote file after the download.'
        FTPDownloadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the download.
        FTPDownloadRemoteTmpExt:
          type: string
          description: Temporary extension used in the download.
        FTPMaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        FTPPassive:
          type: integer
          format: int64
          description: '`1` uses passive mode. Ignored in Riversoft STCP DirectLink, which always uses passive mode.'
        FTPProxyEnabled:
          type: integer
          format: int64
          description: '`1` uses a proxy; `0` does not.'
        FTPProxyType:
          type: integer
          format: int64
          description: '`0` SOCKS4, `1` SOCKS5, `2` HTTP, `3` HTTPS, `4` FTP.'
        FTPProxyAuth:
          type: integer
          format: int64
          description: 'Proxy authentication. HTTP: `0` Basic, `1` NTLM. FTP: `0` none, `1` SITE, `2` USER@SITE, `3` USER
            with login, `4` USER/PASS/ACCT, `5` OPEN, `6` firewall SITE.'
        FTPProxyRemoteAddress:
          type: string
          description: Proxy address.
        FTPProxyRemotePort:
          type: integer
          format: int64
          description: Proxy port.
        FTPProxyUserName:
          type: string
          description: Proxy user.
        FTPProxyUserPswd:
          type: string
          format: password
          description: 'Proxy password. Sensitive data: returned masked in queries.'
        FTPRemoteAddress:
          type: string
          description: Remote server address.
        FTPRemotePort:
          type: integer
          format: int64
          description: Remote server port.
        FTPLocalAddress:
          type: string
          description: Local source address of the connection.
        FTPLocalPort:
          type: integer
          format: int64
          description: Local source port of the connection.
        FTPSecurity:
          type: integer
          format: int64
          description: Connection security (TLS) level.
        FTPSSLCAField:
          type: string
          description: Ignored in Riversoft STCP DirectLink.
        FTPSSLCAValue:
          type: string
          description: Ignored in Riversoft STCP DirectLink.
        FTPSSLCAFile:
          type: string
          description: CA file.
        FTPSSLCiphers:
          type: string
          description: Accepted TLS ciphers.
        FTPSSLVerifyCerts:
          type: integer
          format: int64
          description: '`1` validates the server certificate.'
        FTPSSLCertFile:
          type: string
          description: Client certificate.
        FTPSSLClientPrivKeyFile:
          type: string
          description: Client private key.
        FTPSSLClientPrivKeyPswd:
          type: string
          format: password
          description: 'Client private key password. Sensitive data: returned masked in queries.'
        FTPUploadRemoteDir:
          type: string
          description: Remote directory the files are uploaded to.
        FTPUploadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the upload.
        FTPUploadRemoteTmpExt:
          type: string
          description: Temporary extension used in the upload.
        FTPDownloadCheckSizeDisabled:
          type: integer
          format: int64
        FTPDownloadType:
          type: string
        FTPDirSeparator:
          type: string
        SFTPDownloadRemoteDir:
          type: string
          description: Remote directory the files are downloaded from.
        SFTPDownloadRemoteFileMask:
          type: string
          description: Mask of the downloaded files.
        SFTPDownloadRemoteFileRemove:
          type: integer
          format: int64
          description: '`1` removes the remote file after the download.'
        SFTPDownloadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the download.
        SFTPDownloadRemoteTmpExt:
          type: string
          description: Temporary extension used in the download.
        SFTPMaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        SFTPProxyEnabled:
          type: integer
          format: int64
          description: '`1` uses a proxy; `0` does not.'
        SFTPProxyType:
          type: integer
          format: int64
          description: '`0` SOCKS4, `1` SOCKS5, `2` HTTP, `3` HTTPS, `4` FTP.'
        SFTPProxyAuth:
          type: integer
          format: int64
          description: 'Proxy authentication. HTTP: `0` Basic, `1` NTLM. FTP: `0` none, `1` SITE, `2` USER@SITE, `3` USER
            with login, `4` USER/PASS/ACCT, `5` OPEN, `6` firewall SITE.'
        SFTPProxyRemoteAddress:
          type: string
          description: Proxy address.
        SFTPProxyRemotePort:
          type: integer
          format: int64
          description: Proxy port.
        SFTPProxyUserName:
          type: string
          description: Proxy user.
        SFTPProxyUserPswd:
          type: string
          format: password
          description: 'Proxy password. Sensitive data: returned masked in queries.'
        SFTPRemoteAddress:
          type: string
          description: Remote server address.
        SFTPRemotePort:
          type: integer
          format: int64
          description: Remote server port.
        SFTPLocalAddress:
          type: string
          description: Local source address of the connection.
        SFTPLocalPort:
          type: integer
          format: int64
          description: Local source port of the connection.
        SFTPSecurity:
          type: integer
          format: int64
          description: Connection security (TLS) level.
        SFTPSSLClientPrivKeyFile:
          type: string
          description: Client private key.
        SFTPSSLClientPrivKeyPswd:
          type: string
          format: password
          description: 'Client private key password. Sensitive data: returned masked in queries.'
        SFTPSSLServerFingerPrint:
          type: string
          description: Expected server key fingerprint.
        SFTPUploadRemoteDir:
          type: string
          description: Remote directory the files are uploaded to.
        SFTPUploadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the upload.
        SFTPUploadRemoteTmpExt:
          type: string
          description: Temporary extension used in the upload.
        SFTPCipher:
          type: string
          description: Accepted ciphers.
        TCPAuthentication:
          type: integer
          format: int64
        TCPCompress:
          type: integer
          format: int64
          description: '`1` enables compression.'
        TCPCryptLevel:
          type: integer
          format: int64
        TCPLocalAddress:
          type: string
          description: Local source address of the connection.
        TCPLocalPort:
          type: integer
          format: int64
          description: Local source port of the connection.
        TCPMaxRecvBuf:
          type: integer
          format: int64
          description: Receive buffer size.
        TCPMaxSendBuf:
          type: integer
          format: int64
          description: Send buffer size.
        TCPProxyEnabled:
          type: integer
          format: int64
          description: '`1` uses a proxy; `0` does not.'
        TCPProxyType:
          type: integer
          format: int64
          description: '`0` SOCKS4, `1` SOCKS5, `2` HTTP, `3` HTTPS, `4` FTP.'
        TCPProxyAuth:
          type: integer
          format: int64
          description: 'Proxy authentication. HTTP: `0` Basic, `1` NTLM. FTP: `0` none, `1` SITE, `2` USER@SITE, `3` USER
            with login, `4` USER/PASS/ACCT, `5` OPEN, `6` firewall SITE.'
        TCPProxyRemoteAddress:
          type: string
          description: Proxy address.
        TCPProxyRemotePort:
          type: integer
          format: int64
          description: Proxy port.
        TCPProxyUserName:
          type: string
          description: Proxy user.
        TCPProxyUserPswd:
          type: string
          format: password
          description: 'Proxy password. Sensitive data: returned masked in queries.'
        TCPRemoteAddress:
          type: string
          description: Remote server address.
        TCPRemotePort:
          type: integer
          format: int64
          description: Remote server port.
        TCPRfc2204:
          type: integer
          format: int64
        TCPSecurity:
          type: integer
          format: int64
          description: Connection security (TLS) level.
        TCPSSLCAFile:
          type: string
          description: CA file.
        TCPSSLCAPath:
          type: string
          description: CA directory.
        TCPSSLCertFile:
          type: string
          description: Client certificate.
        TCPSSLCipher:
          type: string
          description: Accepted TLS ciphers.
        TCPSSLDebugDir:
          type: string
          description: TLS debug directory.
        TCPSSLDebugLevel:
          type: integer
          format: int64
          description: TLS debug level.
        TCPSSLPrivKeyFile:
          type: string
          description: Private key.
        TCPSSLPrivKeyPswd:
          type: string
          format: password
          description: 'Private key password. Sensitive data: returned masked in queries.'
        TCPIPv6:
          type: integer
          format: int64
          description: '`1` uses IPv6.'
        TCPMaxListen:
          type: integer
          format: int64
          description: Pending connection queue size.
        TCPMaxRecvTO:
          type: integer
          format: int64
          description: Receive timeout.
        TCPMaxSendTO:
          type: integer
          format: int64
          description: Send timeout.
        TCPSSLDHFile:
          type: string
          description: Diffie-Hellman parameters file.
        TCPSSLVerifyCert:
          type: integer
          format: int64
          description: '`1` validates the server certificate.'
        TCPSSLOldVersionsEnabled:
          type: integer
          format: int64
          description: '`1` accepts old TLS versions.'
        S3Endpoint:
          type: string
          description: Service endpoint.
        S3Region:
          type: string
          description: Region.
        S3DownloadBucket:
          type: string
          description: Bucket the files are downloaded from.
        S3DownloadPrefix:
          type: string
          description: Prefix (folder) of the downloaded objects.
        S3DownloadDelimiter:
          type: string
          description: Folder delimiter in the listing.
        S3DownloadRemoteFileMask:
          type: string
          description: Mask of the downloaded files.
        S3DownloadRemoteFileRemove:
          type: integer
          format: int64
          description: '`1` removes the remote file after the download.'
        S3DownloadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the download.
        S3DownloadRemoteTmpExt:
          type: string
          description: Temporary extension used in the download.
        S3UploadBucket:
          type: string
          description: Bucket the files are uploaded to.
        S3UploadPrefix:
          type: string
          description: Prefix (folder) of the uploaded objects.
        S3VerifyBuckets:
          type: integer
          format: int64
          description: '`1` checks that the buckets exist.'
        AzBlobEndpoint:
          type: string
          description: Service endpoint.
        AzBlobDownloadContainer:
          type: string
          description: Container the files are downloaded from.
        AzBlobDownloadPrefix:
          type: string
          description: Prefix (folder) of the downloaded objects.
        AzBlobDownloadRemoteFileMask:
          type: string
          description: Mask of the downloaded files.
        AzBlobDownloadRemoteFileRemove:
          type: integer
          format: int64
          description: '`1` removes the remote file after the download.'
        AzBlobDownloadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the download.
        AzBlobDownloadRemoteTmpExt:
          type: string
          description: Temporary extension used in the download.
        AzBlobUploadContainer:
          type: string
          description: Container the files are uploaded to.
        AzBlobUploadPrefix:
          type: string
          description: Prefix (folder) of the uploaded objects.
        OciBlobEndpoint:
          type: string
          description: Service endpoint.
        OciBlobTenancy:
          type: string
          description: OCI tenancy (OCID).
        OciBlobRegion:
          type: string
          description: Region.
        OciBlobDownloadBucket:
          type: string
          description: Bucket the files are downloaded from.
        OciBlobDownloadPrefix:
          type: string
          description: Prefix (folder) of the downloaded objects.
        OciBlobDownloadDelimiter:
          type: string
          description: Folder delimiter in the listing.
        OciBlobDownloadRemoteFileMask:
          type: string
          description: Mask of the downloaded files.
        OciBlobDownloadRemoteFileRemove:
          type: integer
          format: int64
          description: '`1` removes the remote file after the download.'
        OciBlobDownloadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the download.
        OciBlobDownloadRemoteTmpExt:
          type: string
          description: Temporary extension used in the download.
        OciBlobUploadBucket:
          type: string
          description: Bucket the files are uploaded to.
        OciBlobUploadPrefix:
          type: string
          description: Prefix (folder) of the uploaded objects.
        GcpBlobEndpoint:
          type: string
          description: Service endpoint.
        GcpBlobRegion:
          type: string
          description: Region.
        GcpBlobDownloadBucket:
          type: string
          description: Bucket the files are downloaded from.
        GcpBlobDownloadPrefix:
          type: string
          description: Prefix (folder) of the downloaded objects.
        GcpBlobDownloadDelimiter:
          type: string
          description: Folder delimiter in the listing.
        GcpBlobDownloadRemoteFileMask:
          type: string
          description: Mask of the downloaded files.
        GcpBlobDownloadRemoteFileRemove:
          type: integer
          format: int64
          description: '`1` removes the remote file after the download.'
        GcpBlobDownloadRemoteTmpDir:
          type: string
          description: Temporary remote directory used in the download.
        GcpBlobDownloadRemoteTmpExt:
          type: string
          description: Temporary extension used in the download.
        GcpBlobUploadBucket:
          type: string
          description: Bucket the files are uploaded to.
        GcpBlobUploadPrefix:
          type: string
          description: Prefix (folder) of the uploaded objects.
        WhatsAppEndpoint:
          type: string
          description: Service endpoint.
        WhatsAppDownloadMode:
          type: integer
          format: int64
          description: 'Document download mode: `0` Meta document ID, `1` Meta link, `2` secure link without password, `3`
            secure link with password.'
        WhatsAppSecureLinkEndpoint:
          type: string
          description: Secure link API endpoint.
        AS2PartnerUrl:
          type: string
          description: Partner URL.
        AS2ProxyEnabled:
          type: integer
          format: int64
          description: '`1` uses a proxy; `0` does not.'
        AS2ProxyType:
          type: integer
          format: int64
          description: '`0` SOCKS4, `1` SOCKS5, `2` HTTP, `3` HTTPS, `4` FTP.'
        AS2ProxyAuth:
          type: integer
          format: int64
          description: 'Proxy authentication. HTTP: `0` Basic, `1` NTLM. FTP: `0` none, `1` SITE, `2` USER@SITE, `3` USER
            with login, `4` USER/PASS/ACCT, `5` OPEN, `6` firewall SITE.'
        AS2ProxyRemoteAddress:
          type: string
          description: Proxy address.
        AS2ProxyRemotePort:
          type: integer
          format: int64
          description: Proxy port.
        AS2ProxyUserName:
          type: string
          description: Proxy user.
        AS2ProxyUserPswd:
          type: string
          format: password
          description: 'Proxy password. Sensitive data: returned masked in queries.'
        AS2LocalAddress:
          type: string
          description: Local source address of the connection.
        AS2LocalPort:
          type: integer
          format: int64
          description: Local source port of the connection.
        AS2TLSClientPrivKeyFile:
          type: string
          description: Client private key.
        AS2TLSClientPrivKeyPswd:
          type: string
          format: password
          description: 'Client private key password. Sensitive data: returned masked in queries.'
        AS2TLSCertFile:
          type: string
          description: Client certificate.
        AS2TLSCAFile:
          type: string
          description: CA file.
        AS2TLSSCiphers:
          type: string
          description: Accepted TLS ciphers.
        AS2TLSVerifyCerts:
          type: integer
          format: int64
          description: '`1` validates the server certificate.'
        WebHookPartnerUrl:
          type: string
          description: Partner URL.
        WebHookProxyEnabled:
          type: integer
          format: int64
          description: '`1` uses a proxy; `0` does not.'
        WebHookProxyType:
          type: integer
          format: int64
          description: '`0` SOCKS4, `1` SOCKS5, `2` HTTP, `3` HTTPS, `4` FTP.'
        WebHookProxyAuth:
          type: integer
          format: int64
          description: 'Proxy authentication. HTTP: `0` Basic, `1` NTLM. FTP: `0` none, `1` SITE, `2` USER@SITE, `3` USER
            with login, `4` USER/PASS/ACCT, `5` OPEN, `6` firewall SITE.'
        WebHookProxyRemoteAddress:
          type: string
          description: Proxy address.
        WebHookProxyRemotePort:
          type: integer
          format: int64
          description: Proxy port.
        WebHookProxyUserName:
          type: string
          description: Proxy user.
        WebHookProxyUserPswd:
          type: string
          format: password
          description: 'Proxy password. Sensitive data: returned masked in queries.'
        WebHookLocalAddress:
          type: string
          description: Local source address of the connection.
        WebHookLocalPort:
          type: integer
          format: int64
          description: Local source port of the connection.
        WebHookTLSClientPrivKeyFile:
          type: string
          description: Client private key.
        WebHookTLSClientPrivKeyPswd:
          type: string
          format: password
          description: 'Client private key password. Sensitive data: returned masked in queries.'
        WebHookTLSCertFile:
          type: string
          description: Client certificate.
        WebHookTLSCAFile:
          type: string
          description: CA file.
        WebHookTLSSCiphers:
          type: string
          description: Accepted TLS ciphers.
        WebHookTLSVerifyCerts:
          type: integer
          format: int64
          description: '`1` validates the server certificate.'
      description: 'Connection network. Fields are prefixed by the protocol (`TCP`, `FTP`, `SFTP`, `S3`, `AzBlob`, `OciBlob`,
        `GcpBlob`, `WhatsApp`, `AS2`, `WebHook`): fill in only those of the protocol in use. `Net1` is the main network and
        `Net2` the alternative one.'
    CfgUserOFTP:
      type: object
      properties:
        Idcode:
          type: string
          description: Identification (login) in the protocol.
        Password:
          type: string
          format: password
          description: 'Password. Sensitive data: returned masked in queries.'
        UserData:
          type: string
          description: Protocol userdata.
        Level:
          type: string
          description: OFTP protocol version.
        DLLName:
          type: string
          description: Module library.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        Compression:
          type: integer
          format: int64
          description: '`1` enables compression.'
        SpecialLogic:
          type: integer
          format: int64
        Credits:
          type: integer
          format: int64
          description: OFTP credits (message window).
        Restart:
          type: integer
          format: int64
          description: '`1` enables resuming interrupted transfers.'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        T1:
          type: integer
          format: int64
        T2:
          type: integer
          format: int64
        NumMaxRetry:
          type: integer
          format: int64
          description: Maximum number of retries.
        Debug:
          type: integer
          format: int64
          description: Debug level.
        MaxLenDsn:
          type: integer
          format: int64
          description: Maximum file name (DSN) length.
        Authentication:
          type: integer
          format: int64
        LocalPrivateKeyFile:
          type: string
          description: Local private key (OFTP 2).
        LocalPrivateKeyPswd:
          type: string
          format: password
          description: 'Local private key password. Sensitive data: returned masked in queries.'
        LocalCertFile:
          type: string
          description: Local certificate (OFTP 2).
        RemoteCertFile:
          type: string
          description: Partner certificate (OFTP 2).
      description: User OFTP protocol.
    CfgUserSFTP:
      type: object
      properties:
        Idcode:
          type: string
          description: Identification (login) in the protocol.
        Password:
          type: string
          format: password
          description: 'Password. Sensitive data: returned masked in queries.'
        UserData:
          type: string
          description: Protocol userdata.
        DLLName:
          type: string
          description: Module library.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
        MaxLenDsn:
          type: integer
          format: int64
          description: Maximum file name (DSN) length.
        SFTPSysdateFormat:
          type: string
          description: Date format used in file names.
        PublicKey:
          type: string
          description: User public key.
      description: User SFTP protocol.
    CfgUserS3:
      type: object
      properties:
        Idcode:
          type: string
          description: Identification (login) in the protocol.
        SecretCode:
          type: string
          format: password
          description: 'Access secret. Sensitive data: returned masked in queries.'
        AccessToken:
          type: string
          format: password
          description: 'Access token. Sensitive data: returned masked in queries.'
        Userdata:
          type: string
          description: Protocol userdata.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
      description: Amazon S3 cloud storage.
    CfgUserAzBlob:
      type: object
      properties:
        Idcode:
          type: string
          description: Identification (login) in the protocol.
        SecretCode:
          type: string
          format: password
          description: 'Access secret. Sensitive data: returned masked in queries.'
        AccessToken:
          type: string
          format: password
          description: 'Access token. Sensitive data: returned masked in queries.'
        Userdata:
          type: string
          description: Protocol userdata.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
      description: Azure Blob Storage cloud storage.
    CfgUserOciBlob:
      type: object
      properties:
        Idcode:
          type: string
          description: Identification (login) in the protocol.
        PrivateKey:
          type: string
          format: password
          description: 'OCI API private key. Sensitive data: returned masked in queries.'
        PrivateKeyPswd:
          type: string
          format: password
          description: 'Private key password. Sensitive data: returned masked in queries.'
        Fingerprint:
          type: string
          description: OCI API key fingerprint.
        Userdata:
          type: string
          description: Protocol userdata.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
      description: OCI Object Storage cloud storage.
    CfgUserGcpBlob:
      type: object
      properties:
        Idcode:
          type: string
          description: Identification (login) in the protocol.
        AccessKey:
          type: string
          format: password
          description: 'Access key or token. Sensitive data: returned masked in queries.'
        Userdata:
          type: string
          description: Protocol userdata.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
      description: Google Cloud Storage cloud storage.
    CfgUserWhatsApp:
      type: object
      properties:
        Idcode:
          type: string
          description: Phone number ID in WhatsApp Business.
        AccessKey:
          type: string
          format: password
          description: 'Meta system credential token. Sensitive data: returned masked in queries.'
        Userdata:
          type: string
          description: Protocol userdata.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
      description: Sending through WhatsApp Business.
    CfgUserAS2:
      type: object
      properties:
        Idcode:
          type: string
          description: Local AS2 ID.
        Userdata:
          type: string
          description: Protocol userdata.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
        Domain:
          type: string
          description: Domain used to generate the Message-ID.
        PartnerSignatureCert:
          type: string
          description: Partner signature certificate.
        PartnerEncryptCert:
          type: string
          description: Partner encryption certificate.
        MyAlgId:
          type: integer
          description: Set of hash, signature and encryption algorithms.
        MySignatureKey:
          type: string
          description: Signature private key.
        MySignatureCert:
          type: string
          description: Signature certificate.
        MyEncryptKey:
          type: string
          description: Encryption private key.
        MyEncryptCert:
          type: string
          description: Encryption certificate.
        MDNOptions:
          type: integer
          format: int64
          description: 'MDN options, as a sum: `1` enabled, `2` signed, `4` asynchronous, `8` encrypted.'
        MDNAsyncURL:
          type: string
          description: Asynchronous MDN delivery URL.
        AuthMode:
          type: integer
          description: 'Authentication with the partner: `0` none, `1` Basic, `2` Bearer.'
        AuthUsername:
          type: string
          description: Basic authentication user.
        AuthPassword:
          type: string
          format: password
          description: 'Basic authentication password. Sensitive data: returned masked in queries.'
        SendDocumentOptions:
          type: integer
          description: 'Options of the document sent. Sum of the values: `1` signed (multipart), `2` signed, `4` encrypted,
            `8` compressed. `0` = none.'
        RequiredDocumentOptions:
          type: integer
          description: 'Options required in the document received. Sum of the values: `1` signed (multipart), `2` signed,
            `4` encrypted, `8` compressed. `0` = none.'
        BERCompatibility:
          type: boolean
          description: BER/DER encoding compatibility.
      description: 'User AS2 protocol: identification, certificates, MDN and document options.'
    CfgUserFTP:
      type: object
      properties:
        Idcode:
          type: string
          description: Identification (login) in the protocol.
        Password:
          type: string
          format: password
          description: 'Password. Sensitive data: returned masked in queries.'
        UserData:
          type: string
          description: Protocol userdata.
        DLLName:
          type: string
          description: Module library.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        MaxBufSize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
        MLSD:
          type: integer
          format: int64
          description: '`1` uses the MLSD command to list directories.'
      description: User FTP/FTPS protocol.
    CfgUserWebHook:
      type: object
      properties:
        Idcode:
          type: string
          description: Local Webhook identification.
        Userdata:
          type: string
          description: Protocol userdata.
        InitMode:
          type: string
          description: '`Both`, `Initiator` (starts the connection) or `Responder` (waits for the connection).'
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        Debug:
          type: integer
          format: int64
          description: Debug level.
        PartnerSignatureCert:
          type: string
          description: Partner signature certificate.
        PartnerEncryptCert:
          type: string
          description: Partner encryption certificate.
        MyAlgId:
          type: integer
          description: Set of hash, signature and encryption algorithms.
        MySignatureKey:
          type: string
          description: Signature private key.
        MySignatureCert:
          type: string
          description: Signature certificate.
        MyEncryptKey:
          type: string
          description: Encryption private key.
        MyEncryptCert:
          type: string
          description: Encryption certificate.
        AuthMode:
          type: integer
          description: 'Authentication with the partner: `0` none, `1` Basic, `2` Bearer.'
        AuthUsername:
          type: string
          description: Basic authentication user.
        AuthPassword:
          type: string
          format: password
          description: 'Basic authentication password. Sensitive data: returned masked in queries.'
        SendDocumentOptions:
          type: integer
          description: 'Options of the document sent. Sum of the values: `1` signed (multipart), `2` signed, `4` encrypted,
            `8` compressed. `0` = none.'
        RequiredDocumentOptions:
          type: integer
          description: 'Options required in the document received. Sum of the values: `1` signed (multipart), `2` signed,
            `4` encrypted, `8` compressed. `0` = none.'
        BERCompatibility:
          type: boolean
          description: BER/DER encoding compatibility.
      description: 'User Webhook connector: identification, certificates and document options.'
    CfgService:
      type: object
      properties:
        Entity:
          $ref: '#/components/schemas/CfgEntity'
        Service:
          $ref: '#/components/schemas/CfgService'
        Net1:
          $ref: '#/components/schemas/CfgServiceNetwork'
        OFTP:
          $ref: '#/components/schemas/CfgServiceOFTP'
        SFTP:
          $ref: '#/components/schemas/CfgServiceSFTP'
        API:
          $ref: '#/components/schemas/CfgServiceAPI'
        WhatsApp:
          $ref: '#/components/schemas/CfgServiceWhatsApp'
        AS2:
          $ref: '#/components/schemas/CfgServiceAS2'
        WebHook:
          $ref: '#/components/schemas/CfgServiceWebHook'
        Monitor:
          $ref: '#/components/schemas/CfgServiceMonitor'
      description: Network service `CONFIG_TXT`. Fill in the section of the type set in `Service.ServiceType`.
    CfgServiceNetwork:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        Mode:
          type: string
        Debug:
          type: integer
          format: int64
          description: Debug level.
        TCPCompress:
          type: integer
          format: int64
          description: '`1` enables compression.'
        TCPSSLDHParam:
          type: string
          description: Diffie-Hellman parameters file.
        TCPLocalAddress:
          type: string
          description: Address on which the service listens.
        TCPLocalPort:
          type: integer
          format: int64
          description: Port on which the service listens.
        TCPMaxRecvBuf:
          type: integer
          format: int64
          description: Receive buffer size.
        TCPMaxSendBuf:
          type: integer
          format: int64
          description: Send buffer size.
        TCPRfc2204:
          type: integer
          format: int64
        TCPSecurity:
          type: integer
          format: int64
          description: Connection security (TLS) level.
        TCPSSLCAFile:
          type: string
          description: CA file.
        TCPSSLCAPath:
          type: string
          description: CA directory.
        TCPSSLCertFile:
          type: string
          description: Client certificate.
        TCPSSLCertChainFile:
          type: string
          description: Certificate chain.
        TCPSSLCipher:
          type: string
          description: Accepted TLS ciphers.
        TCPSSLDebugDir:
          type: string
          description: TLS debug directory.
        TCPSSLDebugLevel:
          type: integer
          format: int64
          description: TLS debug level.
        TCPSSLPrivKeyFile:
          type: string
          description: Private key.
        TCPSSLPrivKeyPswd:
          type: string
          format: password
          description: 'Private key password. Sensitive data: returned masked in queries.'
        TCPv6:
          type: integer
          format: int64
        TCPMaxListen:
          type: integer
          format: int64
          description: Pending connection queue size.
        TCPSSLVerifyCert:
          type: integer
          format: int64
          description: '`1` validates the server certificate.'
        TCPSSLOldVersionsEnabled:
          type: integer
          format: int64
          description: '`1` accepts old TLS versions.'
        TCPMaxRecvTO:
          type: integer
          format: int64
          description: Receive timeout.
        TCPMaxSendTO:
          type: integer
          format: int64
          description: Send timeout.
      description: Network on which the service listens (TCP and TLS).
    CfgServiceOFTP:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        Level:
          type: string
          description: OFTP protocol version.
        Compression:
          type: integer
          format: int64
          description: '`1` enables compression.'
        Credits:
          type: integer
          format: int64
          description: OFTP credits (message window).
        Debug:
          type: integer
          format: int64
          description: Debug level.
        Maxbufsize:
          type: integer
          format: int64
          description: Maximum buffer size.
        Mode:
          type: string
          description: '`Both`, `Sender` (sends only) or `Receiver` (receives only).'
        NumMaxRetry:
          type: integer
          format: int64
          description: Maximum number of retries.
        Restart:
          type: integer
          format: int64
          description: '`1` enables resuming interrupted transfers.'
        SpecialLogic:
          type: integer
          format: int64
        T1:
          type: integer
          format: int64
        T2:
          type: integer
          format: int64
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
      description: OFTP service.
    CfgServiceSFTP:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        Debug:
          type: integer
          format: int64
          description: Debug level.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        MaxConnections:
          type: integer
          format: int64
          description: Maximum number of connections.
        MaxOpenFiles:
          type: integer
          format: int64
          description: Maximum number of open files per connection.
        MaxReadDirEntries:
          type: integer
          format: int64
          description: Maximum entries per directory read.
        FileCreatePerms:
          type: integer
          format: int64
          description: Permissions of the created files.
        AuthMode:
          type: integer
          format: int64
          description: Authentication mode.
      description: SFTP service.
    CfgServiceAPI:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        AuthMode:
          type: integer
          description: 'Accepted authentication modes, as a sum: `1` Basic, `2` Bearer, `4` token exchange (JWT), `8` password
            grant. `0` accepts all modes. The Bearer token is always required on routes that are not authentication routes.'
        StaticPagesPath:
          type: string
          description: Static pages directory.
        TemplatePagesPath:
          type: string
          description: Page templates directory.
        Uri:
          type: string
          description: Public service URL.
        TLSMinVersion:
          type: string
          description: Minimum TLS version.
        TLSMaxVersion:
          type: string
          description: Maximum TLS version.
        LogEnable:
          type: integer
          format: int64
          description: '`1` enables the service log.'
        LogFile:
          type: string
          description: Service log file.
        CustomHeaders:
          type: object
          additionalProperties:
            type: string
          description: Additional HTTP headers sent in the responses.
        RateLimiterMaxRequests:
          type: integer
          description: Maximum requests per client in the window. `0` or less disables the limit.
        RateLimiterWindowSeconds:
          type: integer
          description: Limit window size, in seconds (default 60).
        RateLimiterPartnerHeader:
          type: string
          description: Header that identifies the partner for the request limit (default `anonymous`).
        RateLimiterCleanupInterval:
          type: integer
          description: Cleanup interval of the limit records, in seconds (default 60).
        RateLimiterMaxStates:
          type: integer
          description: Maximum number of clients tracked by the limit (default 10000).
      description: Riversoft STCP DirectLink API service.
    CfgServiceWhatsApp:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        AppSecret:
          type: string
          format: password
          description: 'Meta application secret. Required. Sensitive data: returned masked in queries.'
        CredentialToken:
          type: string
          format: password
          description: 'Meta system credential token. Required. Sensitive data: returned masked in queries.'
        Endpoint:
          type: string
          description: Meta WhatsApp Business API endpoint. Required.
        VerifyToken:
          type: string
          format: password
          description: 'Webhook verification token. Required. Sensitive data: returned masked in queries.'
        Uri:
          type: string
          description: URL of this service (webhook). Required.
        TLSMinVersion:
          type: string
          description: Minimum TLS version.
        TLSMaxVersion:
          type: string
          description: Maximum TLS version.
        LogEnable:
          type: integer
          format: int64
          description: '`1` enables the service log.'
        LogFile:
          type: string
          description: Service log file.
        CustomHeaders:
          type: object
          additionalProperties:
            type: string
          description: Additional HTTP headers sent in the responses.
        TemplateMessagesPath:
          type: string
          description: Message templates directory.
      description: WhatsApp Business service (Meta webhook).
    CfgServiceAS2:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        AuthMode:
          type: integer
          description: 'Authentication with the partner: `0` none, `1` Basic, `2` Bearer.'
        Realm:
          type: string
          description: Basic authentication realm.
        Host:
          type: string
          description: Public service host.
        TLSMinVersion:
          type: string
          description: Minimum TLS version.
        TLSMaxVersion:
          type: string
          description: Maximum TLS version.
        LogEnable:
          type: integer
          format: int64
          description: '`1` enables the service log.'
        LogFile:
          type: string
          description: Service log file.
        CustomHeaders:
          type: object
          additionalProperties:
            type: string
          description: Additional HTTP headers sent in the responses.
      description: AS2 service.
    CfgServiceWebHook:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        AuthMode:
          type: integer
          description: 'Authentication with the partner: `0` none, `1` Basic, `2` Bearer.'
        Realm:
          type: string
          description: Basic authentication realm.
        Host:
          type: string
          description: Public service host.
        TLSMinVersion:
          type: string
          description: Minimum TLS version.
        TLSMaxVersion:
          type: string
          description: Maximum TLS version.
        LogEnable:
          type: integer
          format: int64
          description: '`1` enables the service log.'
        LogFile:
          type: string
          description: Service log file.
        CustomHeaders:
          type: object
          additionalProperties:
            type: string
          description: Additional HTTP headers sent in the responses.
        RateLimiterMaxRequests:
          type: integer
          description: Maximum requests per client in the window. `0` or less disables the limit.
        RateLimiterWindowSeconds:
          type: integer
          description: Limit window size, in seconds (default 60).
        RateLimiterPartnerHeader:
          type: string
          description: Header that identifies the partner for the request limit (default `anonymous`).
        RateLimiterCleanupInterval:
          type: integer
          description: Cleanup interval of the limit records, in seconds (default 60).
        RateLimiterMaxStates:
          type: integer
          description: Maximum number of clients tracked by the limit (default 10000).
      description: Webhook service.
    CfgServiceMonitor:
      type: object
      properties:
        DLLName:
          type: string
          description: Module library.
        Debug:
          type: integer
          format: int64
          description: Debug level.
        ExternalCommand:
          type: string
          description: External command run by the service.
        MaxRecvBuf:
          type: integer
          format: int64
        MaxSendBuf:
          type: integer
          format: int64
        Password:
          type: string
          format: password
          description: 'Supervision credential password. Sensitive data: returned masked in queries.'
        ReqInterval:
          type: integer
          format: int64
          description: Interval between requests.
        Timeout:
          type: integer
          format: int64
          description: Inactivity timeout.
        UserName:
          type: string
          description: Supervision credential user.
      description: Supervision service.
    CfgSchedule:
      type: object
      properties:
        Entity:
          $ref: '#/components/schemas/CfgEntity'
        Schedule:
          $ref: '#/components/schemas/CfgSchedule'
      description: Schedule `CONFIG_TXT`.
    CfgFileType:
      type: object
      properties:
        Entity:
          $ref: '#/components/schemas/CfgEntity'
        FileConf:
          $ref: '#/components/schemas/CfgFileTypeFileConf'
      description: File type `CONFIG_TXT` (global or user).
    CfgFileTypeFileConf:
      type: object
      properties:
        CRCharTX:
          type: integer
          format: int64
        CRCharRX:
          type: integer
          format: int64
        LFCharTX:
          type: integer
          format: int64
        LFCharRX:
          type: integer
          format: int64
        Name:
          type: string
          description: Name.
        Description:
          type: string
          description: Description.
        FileMatch:
          type: integer
          format: int64
          description: 'File identification: `0` default, `1` prefix/suffix, `2` file name, `3` regular expression.'
        FileDirection:
          type: integer
          format: int64
          description: 'Direction: `0` both, `1` sending disabled, `2` receiving disabled.'
        FileRegex:
          type: string
          description: File identification pattern, according to `FileMatch`.
        MaxRecSize:
          type: integer
          format: int64
          description: Maximum record size.
        Originator:
          type: string
          description: Originator (OFTP).
        Destination:
          type: string
          description: Destination (OFTP).
        Format:
          type: string
          description: File format.
        TranslateTableIn:
          type: string
        TranslateTableOut:
          type: string
        InsertCRLF:
          type: integer
          format: int64
        SupressCRLF:
          type: integer
          format: int64
        TimeStampTx:
          type: integer
          format: int64
          description: '`1` adds a timestamp to the name of the file sent.'
        TimeStampRx:
          type: integer
          format: int64
          description: '`1` adds a timestamp to the name of the file received.'
        ConvFileNameTx:
          type: integer
          format: int64
        ConvFileNameRx:
          type: integer
          format: int64
        Overwrite:
          type: integer
          format: int64
          description: '`1` overwrites the existing file on receiving.'
        CommandLineTx:
          type: string
          description: Command run after sending.
        CommandLineTxWait:
          type: integer
          format: int64
          description: '`1` waits for the command to finish.'
        CommandLineRx:
          type: string
          description: Command run after receiving.
        CommandLineRxWait:
          type: integer
          format: int64
          description: '`1` waits for the command to finish.'
        CommandLineRead:
          type: string
        CommandLineWrite:
          type: string
        CommandLineCheckTx:
          type: string
        CommandLineCheckRx:
          type: string
        CommandLinePreCheckTx:
          type: string
        CommandLinePreCheckRx:
          type: string
        Compressed:
          type: integer
          format: int64
          description: '`1` compresses the file.'
        Envelloped:
          type: integer
          format: int64
          description: '`1` envelopes (signs/encrypts) the file.'
        EERPSigned:
          type: integer
          format: int64
          description: '`1` requires a signed EERP.'
        EERPOffRx:
          type: integer
          format: int64
        FileTimeRx:
          type: integer
          format: int64
        BackupFileTx:
          type: integer
          format: int64
        SecurityLevel:
          type: integer
          format: int64
        CipherLevel:
          type: integer
          format: int64
        StartDateHour:
          type: integer
          format: int64
          description: Start hour of the time window.
        StartDateMinute:
          type: integer
          format: int64
          description: Start minute of the time window.
        StartDateSecond:
          type: integer
          format: int64
          description: Start second of the time window.
        EndDateHour:
          type: integer
          format: int64
          description: End hour of the time window.
        EndDateMinute:
          type: integer
          format: int64
          description: End minute of the time window.
        EndDateSecond:
          type: integer
          format: int64
          description: End second of the time window.
        WeekDayInterval:
          type: integer
          format: int64
          description: Days of the week of the time window.
        DisableLogDupRx:
          type: integer
          format: int64
        Userdata:
          type: string
          description: File userdata.
        Tags:
          type: string
          description: File type tags, used in the reports.
      description: File identification and handling on sending and receiving.
    CfgRouting:
      type: object
      properties:
        Entity:
          $ref: '#/components/schemas/CfgEntity'
        Rules:
          $ref: '#/components/schemas/CfgRules'
      description: Routing `CONFIG_TXT` (Riversoft STCP Gemini Rename).
    CfgRules:
      type: object
      properties:
        General:
          $ref: '#/components/schemas/CfgRulesGeneral'
        FileMatching:
          type: array
          items:
            $ref: '#/components/schemas/CfgRulesFileMatching'
      description: Routing scan and rules.
    CfgRulesGeneral:
      type: object
      properties:
        Name:
          type: string
          description: Name.
        Description:
          type: string
          description: Description.
        ScanDir:
          type: string
          description: Monitored directory.
        ScanSubDir:
          type: integer
          description: '`1` includes subdirectories.'
        ScanDirRegEx:
          type: string
          description: Regular expression of the included directories.
        ScanDirRegExNeg:
          type: string
          description: Regular expression of the ignored directories.
        ScanFileRegEx:
          type: string
          description: Regular expression of the included files.
        ScanFileRegExNeg:
          type: string
          description: Regular expression of the ignored files.
        ScanFirstRule:
          type: integer
        ScanCheckFileInUse:
          type: integer
          description: '`1` skips files in use.'
        ScanLockSem:
          type: string
        ScanLockSemTimeout:
          type: integer
        ScanLockSemOptions:
          type: integer
        LogErrorOption:
          type: integer
        LogLevelOnSuccess:
          type: integer
        LogLevelOnWarning:
          type: integer
        LogLevelOnInfo:
          type: integer
        LogLevelOnError:
          type: integer
        DelayRetry:
          type: integer
          description: Wait between retries.
        MaxRetries:
          type: integer
          description: Maximum number of retries.
        LastModified:
          type: string
      description: 'Scan: directory, filters, lock, retries and log levels.'
    CfgRulesFileMatching:
      type: object
      properties:
        Index:
          type: integer
          description: Rule order.
        Name:
          type: string
          description: Name.
        Description:
          type: string
          description: Description.
        Locked:
          type: integer
          description: '`1` = locked; `0` = unlocked.'
        FileRegEx:
          type: string
          description: File name regular expression.
        DirRegEx:
          type: string
          description: Directory regular expression.
        SrcRegEx:
          type: string
        ContentRegEx:
          type: string
          description: File content regular expression.
        General:
          $ref: '#/components/schemas/CfgFileMatchingGeneral'
        Filename:
          $ref: '#/components/schemas/CfgFileMatchingFilename'
        Copy:
          $ref: '#/components/schemas/CfgFileMatchingCopy'
        Backup:
          $ref: '#/components/schemas/CfgFileMatchingBackup'
      description: Rule applied to the files that match the filters.
    CfgFileMatchingGeneral:
      type: object
      properties:
        SourceUser:
          type: string
          description: Source user.
        DestinationUser:
          type: string
          description: Destination user.
        ExecProg:
          type: string
          description: Command run after processing.
        ExecProgBefore:
          type: string
          description: Command run before processing.
        ExecProgError:
          type: string
          description: Command run on error.
        CheckLockUnlockFileName:
          type: string
        CreateLockUnlockFileName:
          type: string
        CheckLockUnlockOption:
          type: integer
        RemoveAfterCopy:
          type: integer
          description: '`1` removes the source file after the copy.'
        RemoveAfterHours:
          type: integer
          description: Removes the file after this number of hours.
        ProcessAfterSeconds:
          type: integer
          description: Processes the file after this number of seconds without changes.
        Overwrite:
          type: integer
          description: '`1` overwrites the existing file at the destination.'
        InsertTimestamp:
          type: integer
        InsertTimestampPart:
          type: integer
        InsertTimestampFormat:
          type: string
          description: Format of the inserted timestamp.
        DelayNextFileProcess:
          type: integer
        StartDateHour:
          type: integer
          description: Start hour of the time window.
        StartDateMinute:
          type: integer
          description: Start minute of the time window.
        StartDateSecond:
          type: integer
          description: Start second of the time window.
        EndDateHour:
          type: integer
          description: End hour of the time window.
        EndDateMinute:
          type: integer
          description: End minute of the time window.
        EndDateSecond:
          type: integer
          description: End second of the time window.
        WeekDayInterval:
          type: integer
          description: Days of the week of the time window.
        FileLenOption:
          type: integer
        FileLenMin:
          type: integer
          description: Minimum file size.
        FileLenMax:
          type: integer
          description: Maximum file size.
        ReplaceFromFileOption:
          type: integer
        ContentLinesToRead:
          type: integer
        OtherOption:
          type: integer
        LastModified:
          type: string
        NextSection:
          type: string
          description: Next rule to apply.
      description: 'General rule actions: source and destination users, commands, removal, timestamp and time window.'
    CfgFileMatchingFilename:
      type: object
      properties:
        RenameFileTo:
          type: string
          description: New file name.
        Replaces:
          type: array
          items:
            $ref: '#/components/schemas/CfgFileMatchingReplace'
        ReplacesFromFile:
          type: array
          items:
            $ref: '#/components/schemas/CfgFileMatchingReplaceByFileContent'
        ReplacesByRegEx:
          type: array
          items:
            $ref: '#/components/schemas/CfgFileMatchingReplaceByRegEx'
      description: File renaming.
    CfgFileMatchingReplace:
      type: object
      properties:
        ReplaceFileDesc:
          type: string
        ReplaceFileNamePosFrom:
          type: integer
        ReplaceFileNamePosTo:
          type: integer
        ReplaceFileNameLen:
          type: integer
        ReplaceFileNameFromPathPosFrom:
          type: integer
        ReplaceFileNameFromPathPosTo:
          type: integer
        ReplaceFileNameFromPathLen:
          type: integer
        InsertTimestampPosFrom:
          type: integer
        InsertTimestampPosTo:
          type: integer
        InsertTimestampLen:
          type: integer
        InsertSeqNumberTo:
          type: integer
        InsertSeqNumberLen:
          type: integer
        InsertSeqNumberMin:
          type: integer
        InsertSeqNumberMax:
          type: integer
        InsertSeqNumberSeq:
          type: integer
        VarReplaceFileNamePosFrom:
          type: integer
        VarReplaceFileNamePosTo:
          type: integer
        VarReplaceFileNameLen:
          type: integer
        VarReplaceFileNameValue:
          type: string
      description: Replacement by position in the file name.
    CfgFileMatchingReplaceByFileContent:
      type: object
      properties:
        ReplaceFromFileDesc:
          type: string
        ReplaceFromFileRegEx:
          type: string
        ReplaceFromFilePosFrom:
          type: integer
        ReplaceFromFilePosTo:
          type: integer
        ReplaceFromFileLen:
          type: integer
        ReplaceFromFileNext:
          type: integer
      description: Replacement with data from the file content.
    CfgFileMatchingReplaceByRegEx:
      type: object
      properties:
        RegExReplaceDesc:
          type: string
        RegExReplaceFrom:
          type: string
          description: Regular expression searched.
        RegExReplaceTo:
          type: string
          description: Replacement text.
        RegExReplaceOcorr:
          type: integer
          description: Occurrences replaced.
      description: Replacement by regular expression.
    CfgFileMatchingCopy:
      type: object
      properties:
        CopyToDir:
          type: string
          description: Copy destination directory.
        CopyFileOption:
          type: integer
        CopyTempExtension:
          type: string
          description: Temporary extension during the copy.
        CopyFileRecSize:
          type: integer
        Replaces:
          type: array
          items:
            $ref: '#/components/schemas/CfgFileMatchingReplaceByPath'
        ReplacesByRegEx:
          type: array
          items:
            $ref: '#/components/schemas/CfgFileMatchingReplaceByRegEx'
      description: File copy.
    CfgFileMatchingReplaceByPath:
      type: object
      properties:
        PathDesc:
          type: string
        PathReplacePosFrom:
          type: integer
        PathReplacePosTo:
          type: integer
        PathReplaceLen:
          type: integer
        PathInsertTimestampPosFrom:
          type: integer
        PathInsertTimestampPosTo:
          type: integer
        PathInsertTimestampLen:
          type: integer
        PathReplaceFromFileNamePosFrom:
          type: integer
        PathReplaceFromFileNamePosTo:
          type: integer
        PathReplaceFromFileNameLen:
          type: integer
        PathVarReplacePosFrom:
          type: integer
        PathVarReplacePosTo:
          type: integer
        PathVarReplaceLen:
          type: integer
        PathVarReplaceValue:
          type: string
      description: Replacement by position in the destination path.
    CfgFileMatchingBackup:
      type: object
      properties:
        BkpToDir:
          type: string
          description: Backup directory.
        BkpFileOption:
          type: integer
        Replaces:
          type: array
          items:
            $ref: '#/components/schemas/CfgFileMatchingReplaceByPath'
        ReplacesByRegEx:
          type: array
          items:
            $ref: '#/components/schemas/CfgFileMatchingReplaceByRegEx'
      description: File backup.
  responses:
    BadRequest:
      description: 'Invalid request: empty body, `Content-Type` other than `application/json`, invalid JSON, entity validation
        or malformed `Authorization` header (the latter responds in plain text).'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            field: instance
            error: instance error
            error_description: NAME is required
    Unauthorized:
      description: 'Missing, invalid or expired token. Plain-text response: `Unauthorized`.'
      content:
        text/plain:
          schema:
            type: string
    AuthUnauthorized:
      description: Credentials not accepted, operator locked or invalid 2FA code.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: authentication error
            error_description: Unauthorized
    AuthForbidden:
      description: Operator without access or locked after exceeding the failure limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The operator lacks the required permission or access to the entity (groups).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            field: log report
            error: log report error
            error_description: Forbidden
    NotFound:
      description: Entity not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: '`Content-Type` other than `application/x-www-form-urlencoded`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
