openapi: 3.0.3
info:
  title: NovaFacies Open Source Project - Module 'AdminRights' v1
  description: >-
    API specification for Module 'AdminRights' in NovaFacies Open Source
    Project. For more information, see https://novafacies.org
  version: 1.0.0
  contact:
    name: NovaFacies Open Source Foundation
    url: https://novafacies.org/
    email: support@novafacies.org
  license:
    name: GNU GPLv3
    url: https://www.gnu.org/licenses/gpl-3.0.html
  x-filename-json: adminRights_api_v1.0.0.json
  x-filename-yaml: adminRights_api_v1.0.0.yaml
  x-filename-html: adminRights_api_v1.0.0.html
servers:
  - url: https://api.adminrights.novafacies.com/v1
    description: Production server
  - url: https://staging.api.adminrights.novafacies.com/v1
    description: Staging server
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This API expects a valid JWT token in the Authorization header. The
        authentication mechanism, including token issuance and validation, is
        handled by the Auth Module.
security:
  - BearerAuth: []
paths:
  /adminRights/get:
    post:
      summary: >-
        Retrieves rights for the admin role. Reference function with internal
        name: adminRights.getAdminRight
      description: >-
        Retrieves rights for the admin role. Reference function with internal
        name: adminRights.getAdminRight
      operationId: getAdminRight
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                admin_role_id:
                  type: string
                  description: See Module Description
                page:
                  type: integer
                  description: See Module Description
                page_size:
                  type: integer
                  description: See Module Description
              required:
                - admin_role_id
            examples:
              validRequest:
                value:
                  admin_role_id: role-admin-001
                  page: 1
                  page_size: 20
      responses:
        '200':
          description: success
          content:
            application/json:
              examples:
                success:
                  value:
                    status: success
                    admin_rights:
                      - admin_right_id: right-admin-001
                        admin_role_id: role-admin-001
                        admin_right_permissions:
                          all: full-access
                      - admin_right_id: right-admin-002
                        admin_role_id: role-admin-001
                        admin_right_permissions:
                          read: limited-access
                    total: 2
        '400':
          description: error
          content:
            application/json:
              examples:
                badRequest:
                  value:
                    message: error
