Fordefi Audit Log API

These endpoints allow you to manage audit logs. Audit logs are used to track the actions of users in your organization.

OpenAPI Specification

fordefi-audit-log-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Fordefi Address Book Audit Log API
  version: 0.2.0
  description: These endpoints allow you to list the contacts in your address book.<br><br>To add/remove contacts, visit the Fordefi web console. See the <a href='https://docs.fordefi.com/user-guide/address-book'>user guide</a> for more info.
servers:
- url: https://api.fordefi.com/
  description: Production
security:
- bearerAuth: []
tags:
- name: Audit Log
  description: "These endpoints allow you to manage audit logs.\n        <br><br>\n        Audit logs are used to track the actions of users in your organization.\n        "
paths:
  /api/v1/audit-log:
    get:
      tags:
      - Audit Log
      summary: List Audit Log Records
      description: Get a list of audit log records.
      operationId: list_audit_log_records_api_v1_audit_log_get
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: The page number to fetch.
          default: 1
          title: Page
        description: The page number to fetch.
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 0
          description: The number of items per page.
          default: 50
          title: Size
        description: The number of items per page.
      - name: skip_count
        in: query
        required: false
        schema:
          type: boolean
          description: Whether to skip counting the total number of items.
          default: false
          title: Skip Count
        description: Whether to skip counting the total number of items.
      - name: created_by
        in: query
        required: false
        schema:
          title: Created By
          type: array
          items:
            type: string
            format: uuid
      - name: created_before
        in: query
        required: false
        schema:
          title: Created Before
          type: string
          format: date-time
      - name: created_after
        in: query
        required: false
        schema:
          title: Created After
          type: string
          format: date-time
      - name: category
        in: query
        required: false
        schema:
          title: Category
          type: array
          items:
            $ref: '#/components/schemas/AuditLogCategory'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAuditLogRecordsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreconditionFailedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Unexpected Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '401':
          description: Unauthorized User
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '403':
          description: Forbidden User
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
  /api/v1/audit-log/export:
    get:
      tags:
      - Audit Log
      summary: Export Audit Log
      description: Get a CSV-format list of audit log records.
      operationId: export_audit_log_api_v1_audit_log_export_get
      parameters:
      - name: created_by
        in: query
        required: false
        schema:
          title: Created By
          type: array
          items:
            type: string
            format: uuid
      - name: created_before
        in: query
        required: false
        schema:
          title: Created Before
          type: string
          format: date-time
      - name: created_after
        in: query
        required: false
        schema:
          title: Created After
          type: string
          format: date-time
      - name: category
        in: query
        required: false
        schema:
          title: Category
          type: array
          items:
            $ref: '#/components/schemas/AuditLogCategory'
      responses:
        '200':
          description: Exported audit log in CSV format
          content:
            text/csv:
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreconditionFailedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Unexpected Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '401':
          description: Unauthorized User
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '403':
          description: Forbidden User
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
components:
  schemas:
    UserState:
      type: string
      enum:
      - active
      - onboarding_pending_code_generation
      - onboarding_pending_activation
      - reset_device_pending_code_generation
      - reset_device_pending_activation
      - pending_approval
      - deleted
      title: UserState
    PreconditionFailedError:
      properties:
        title:
          type: string
          title: Title
          description: Human-readable error message.
        detail:
          type: string
          title: Detail
          description: Detailed error message.
        full_detail:
          title: Full Detail
          description: Full error message with additional details, if available.
          type: string
        request_id:
          title: Request Id
          description: Request ID - for debugging purposes.
          type: string
        system_error_code:
          title: System Error Code
          description: An additional system error code in Fordefi.
          type: string
      type: object
      required:
      - title
      - detail
      title: PreconditionFailedError
    UserRole:
      type: string
      enum:
      - admin
      - trader
      - viewer
      title: UserRole
    UserRef:
      oneOf:
      - $ref: '#/components/schemas/PersonRef'
      - $ref: '#/components/schemas/ApiUserRef'
      - $ref: '#/components/schemas/ApiSignerRef'
      - $ref: '#/components/schemas/EndUserRef'
      - $ref: '#/components/schemas/SystemUserRef'
      description: Represents a reference to a user in the Fordefi platform
      discriminator:
        propertyName: user_type
        mapping:
          api_signer: '#/components/schemas/ApiSignerRef'
          api_user: '#/components/schemas/ApiUserRef'
          end_user: '#/components/schemas/EndUserRef'
          person: '#/components/schemas/PersonRef'
          system: '#/components/schemas/SystemUserRef'
    ListAuditLogRecordsResponse:
      properties:
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        size:
          type: integer
          title: Size
        audit_log_records:
          items:
            $ref: '#/components/schemas/AuditLogRecord'
          type: array
          title: Audit Log Records
      type: object
      required:
      - total
      - page
      - size
      - audit_log_records
      title: ListAuditLogRecordsResponse
    AuditLogCategory:
      type: string
      enum:
      - policy
      - quorum_threshold
      - user_management
      - vaults
      - address_book
      - address_group
      - backup
      - webhook
      - vault_group
      - user_group
      - aml_policy
      - chains
      - device_backup
      - import_keys
      - authentication
      - dapp_group
      title: AuditLogCategory
    ValidationError:
      properties:
        title:
          type: string
          title: Title
          description: Human-readable error message.
        detail:
          items:
            $ref: '#/components/schemas/ValidationErrorDetail'
          type: array
          title: Detail
        full_detail:
          title: Full Detail
          description: Full error message with additional details, if available.
          type: string
        request_id:
          title: Request Id
          description: Request ID - for debugging purposes.
          type: string
      type: object
      required:
      - title
      - detail
      title: ValidationError
    ApiUserRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the user in the Fordefi platform.
        user_type:
          type: string
          const: api_user
          title: User Type
          description: The type of the user.
        name:
          type: string
          title: Name
          description: The name of the user.
        state:
          type: string
          enum:
          - active
          - deleted
          title: State
          description: The state of the user.
        role:
          $ref: '#/components/schemas/UserRole'
          description: The role of the user.
      type: object
      required:
      - id
      - user_type
      - name
      - state
      - role
      title: ApiUserRef
    EndUserRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the user in the Fordefi platform.
        user_type:
          type: string
          const: end_user
          title: User Type
          description: The type of the user.
        external_id:
          type: string
          title: External Id
          description: External id of the user.
          example: user|1234
        state:
          type: string
          enum:
          - active
          - deleted
          title: State
          description: The state of the user.
      type: object
      required:
      - id
      - user_type
      - external_id
      - state
      title: EndUserRef
    PersonRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the user in the Fordefi platform.
        user_type:
          type: string
          const: person
          title: User Type
          description: The type of user. Can be a person, or (in programmatic scenarios) an API user or API Signer.
        name:
          title: Name
          description: The name of the user.
          example: John Doe
          type: string
        email:
          type: string
          title: Email
          description: The email of the user.
        state:
          $ref: '#/components/schemas/UserState'
          description: The state of the user in the organization.
        role:
          $ref: '#/components/schemas/UserRole'
          description: The role of the user.
      type: object
      required:
      - id
      - user_type
      - email
      - state
      - role
      title: PersonRef
    ApiSignerRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the user in the Fordefi platform.
        user_type:
          type: string
          const: api_signer
          title: User Type
          description: The type of the user.
        name:
          type: string
          title: Name
          description: The name of the user.
        state:
          type: string
          enum:
          - active
          - onboarding_pending_code_generation
          - onboarding_pending_activation
          - deleted
          title: State
          description: The state of the user.
      type: object
      required:
      - id
      - user_type
      - name
      - state
      title: ApiSignerRef
    SystemUserRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the user in the Fordefi platform.
        user_type:
          type: string
          const: system
          title: User Type
          description: The type of the user.
        name:
          type: string
          title: Name
          description: The name is Fordefi CARE
      type: object
      required:
      - id
      - user_type
      - name
      title: SystemUserRef
    RateLimitError:
      properties: {}
      type: object
      title: RateLimitError
    BaseError:
      properties:
        title:
          type: string
          title: Title
          description: Human-readable error message.
        detail:
          type: string
          title: Detail
          description: Detailed error message.
        full_detail:
          title: Full Detail
          description: Full error message with additional details, if available.
          type: string
        request_id:
          title: Request Id
          description: Request ID - for debugging purposes.
          type: string
      type: object
      required:
      - title
      - detail
      title: BaseError
    ValidationErrorDetail:
      properties:
        loc:
          items:
            anyOf:
            - type: integer
            - type: string
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationErrorDetail
    AuditLogRecord:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the object in the Fordefi platform.
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: The timestamp of the audit log record.
        request_id:
          type: string
          title: Request Id
          description: The request ID of the audit log record.
        category:
          $ref: '#/components/schemas/AuditLogCategory'
          description: The category of the audit log record.
        action:
          type: string
          title: Action
          description: The action of the audit log record.
        created_by:
          $ref: '#/components/schemas/UserRef'
          description: The user who created the audit log record.
        description:
          type: string
          title: Description
          description: The description of the audit log record.
        client_ip:
          type: string
          title: Client Ip
          description: The client IP of the audit log record.
      type: object
      required:
      - id
      - timestamp
      - request_id
      - category
      - action
      - created_by
      - description
      - client_ip
      title: AuditLogRecord
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT