> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brelio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Historial de decisiones

> Historial de decisiones sobre los datos de la clínica, de la más reciente a la más antigua: quién, cuándo y con qué condiciones.

**Cuándo usarla:** Para auditar quién activó o desactivó un área, o quién aceptó datos de pacientes para una conexión.



## OpenAPI

````yaml /api-reference/openapi.es.json get /platform-policy/decisions
openapi: 3.1.0
info:
  title: API de Brelio
  version: '1'
  description: >-
    Todo lo que una persona hace en Brelio lo puede hacer un programa, con los
    mismos permisos, auditoría y límites. Cada endpoint se deriva del catálogo
    de operaciones.
servers:
  - url: https://api.brelio.app/v1
security: []
paths:
  /platform-policy/decisions:
    get:
      tags:
        - platform-policy
      summary: Historial de decisiones
      description: >-
        Historial de decisiones sobre los datos de la clínica, de la más
        reciente a la más antigua: quién, cuándo y con qué condiciones.


        **Cuándo usarla:** Para auditar quién activó o desactivó un área, o
        quién aceptó datos de pacientes para una conexión.
      operationId: platform-policy.decisions.list
      parameters:
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            maxLength: 200
          description: '`next_cursor` de la página anterior. Omítelo para la primera página.'
        - name: limit
          in: query
          required: false
          schema:
            default: 25
            type: integer
            minimum: 1
            maximum: 100
          description: Tamaño de página, de 1 a 100.
        - name: subjectType
          in: query
          required: false
          schema:
            type: string
            enum:
              - organization
              - credential
        - name: subjectId
          in: query
          required: false
          schema:
            type: string
            maxLength: 200
      responses:
        '200':
          description: Correcto
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        subjectType:
                          type: string
                          enum:
                            - organization
                            - credential
                        subjectId:
                          type: string
                        area:
                          anyOf:
                            - type: string
                              enum:
                                - agenda
                                - team
                                - patients
                                - clinical
                                - billing
                            - type: 'null'
                        decision:
                          type: string
                          enum:
                            - granted
                            - revoked
                        termsVersion:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        decidedBy:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              anyOf:
                                - type: string
                                - type: 'null'
                          required:
                            - id
                            - name
                          additionalProperties: false
                        decidedAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          description: ISO 8601, en UTC.
                      required:
                        - id
                        - subjectType
                        - subjectId
                        - area
                        - decision
                        - termsVersion
                        - decidedBy
                        - decidedAt
                      additionalProperties: false
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Pásalo como `cursor` para leer la página siguiente; null
                      en la última página.
                  has_more:
                    type: boolean
                required:
                  - data
                  - next_cursor
                  - has_more
                additionalProperties: false
        '401':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '402':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearer: []
components:
  schemas:
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - code
        - detail
        - request_id
        - params
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        code:
          type: string
        detail:
          type: string
        request_id:
          type: string
        hint:
          type: string
        retryAfterSeconds:
          type: integer
        params:
          type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        Clave de API de Brelio (de organización o personal) o un token de acceso
        de WorkOS.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.