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

# Get devices by member ID | Comp AI API

> Returns all devices assigned to a specific member within the authenticated organization. Devices are fetched from FleetDM using the member's dedicated.



## OpenAPI

````yaml /openapi.json get /v1/devices/member/{memberId}
openapi: 3.0.0
info:
  title: Comp AI API
  description: >-
    Compliance automation API for SOC 2, ISO 27001, HIPAA, GDPR, evidence
    collection, policy workflows, Trust Access, security questionnaires,
    integrations, cloud checks, and device compliance.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.trycomp.ai
    description: Production API Server
security: []
tags:
  - name: Attachments
    description: >-
      Generate signed download links for files attached to compliance tasks,
      comments, evidence records, and workflow reviews.
  - name: Audit Logs
    description: >-
      Retrieve audit trails for compliance activity, evidence changes, access
      decisions, and customer-facing security review workflows.
  - name: CloudSecurity
    description: >-
      Run AWS, Azure, and GCP cloud security scans, detect enabled services,
      review findings, and connect cloud posture results to compliance work.
    x-group: Cloud Security
  - name: Comments
    description: >-
      Create and manage collaboration comments on compliance entities such as
      tasks, policies, risks, vendors, and findings.
  - name: Context
    description: >-
      Manage organization context that helps Comp AI tailor policies,
      assessments, and compliance automation to the business.
  - name: Controls
    description: >-
      Manage controls, map them to policies, tasks, framework requirements, and
      evidence document types, and track implementation progress.
  - name: Device Agent
    description: >-
      Register employee devices, submit device compliance check-ins, download
      agent builds, and manage endpoint security status.
  - name: Devices
    description: >-
      Read and manage employee device inventory and Fleet compliance data used
      for endpoint security controls.
  - name: Evidence Export
    description: >-
      Export task evidence, automation evidence, and reviewer-ready evidence
      bundles as PDF or ZIP files.
  - name: Evidence Export (Auditor)
    description: Export all organization evidence for an auditor review package.
  - name: Evidence Forms
    description: >-
      Collect, review, upload, and export structured evidence submissions for
      compliance tasks and document requirements.
  - name: Findings
    description: >-
      Create, review, update, and track audit findings, remediation activity,
      and finding history for an organization.
  - name: Frameworks
    description: >-
      Manage SOC 2, ISO 27001, HIPAA, GDPR, and custom framework instances,
      requirements, scores, and sync history.
  - name: ISMS
  - name: Integrations
    description: >-
      Connect vendor systems, configure OAuth apps, run compliance checks, sync
      employees, manage variables, and collect automated evidence.
  - name: Knowledge Base
    description: >-
      Upload source documents, process them for retrieval, and manage reusable
      manual answers that power questionnaires and AI policy workflows.
  - name: Offboarding Checklist
  - name: Org Chart
    description: >-
      Manage organization chart metadata and evidence used for governance,
      accountability, and audit readiness.
  - name: Organization
    description: >-
      Manage organization profile data, API keys, logos, ownership, role
      notifications, and access approval settings.
  - name: People
    description: >-
      Invite and manage workforce members, training status, device compliance,
      email preferences, and employee evidence records.
  - name: Policies
    description: >-
      Create, version, publish, export, map, and improve compliance policies
      with AI-assisted drafting and approval workflows.
  - name: Questionnaire
    description: >-
      Parse security questionnaires, generate answers from approved evidence,
      save reviewer edits, stream progress, and export completed files.
  - name: Risks
    description: >-
      Create, update, and report on organizational risks with ownership,
      departments, and compliance remediation status.
  - name: Roles
    description: >-
      Create custom roles and resolve permission sets for organization-level
      access control.
  - name: SOA
    description: >-
      Create, auto-fill, review, approve, and export ISO 27001 Statement of
      Applicability documents.
    x-group: Statement of Applicability
  - name: Security Penetration Tests
    description: >-
      Create AI-powered penetration test runs, track progress, inspect findings
      and events, and download markdown or PDF reports.
  - name: Task Automations
    description: >-
      Create, version, run, and inspect automated evidence collection workflows
      attached to compliance tasks.
  - name: Task Management
    description: >-
      Manage task items and attachments linked to operational entities such as
      risks and vendors.
  - name: Tasks
    description: >-
      Manage compliance task lifecycle, assignments, review approvals, evidence
      uploads, policy links, and activity history.
  - name: Timelines
    description: >-
      Track audit and compliance readiness timelines, phases, and review
      milestones for an organization.
  - name: Training
    description: >-
      Record security awareness and HIPAA training completion status and
      generate completion certificates.
  - name: Trust Access
    description: >-
      Manage external Trust Center access requests, NDA signing, grants,
      tokenized document downloads, public FAQs, and reviewer access.
  - name: Trust Portal
    description: >-
      Configure the live Trust Center, custom domain, public overview, FAQs,
      compliance resources, documents, links, and vendor disclosures.
  - name: Uploads
  - name: Vendors
    description: >-
      Manage third-party vendors, global vendor search, risk assessment
      triggers, and Trust Center vendor visibility.
paths:
  /v1/devices/member/{memberId}:
    get:
      tags:
        - Devices
      summary: Get devices by member ID
      description: >-
        Returns all devices assigned to a specific member within the
        authenticated organization. Devices are fetched from FleetDM using the
        member's dedicated fleetDmLabelId.
      operationId: DevicesController_getDevicesByMember_v1
      parameters:
        - name: memberId
          required: true
          in: path
          description: Member ID to get devices for
          schema:
            example: mem_abc123def456
            type: string
      responses:
        '200':
          description: Member devices retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevicesByMemberResponseDto'
        '401':
          description: Unauthorized - Invalid authentication or insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
        '404':
          description: Organization or member not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Member with ID mem_abc123def456 not found in organization
                      org_abc123def456
        '500':
          description: Internal server error - FleetDM integration issue
      security:
        - apikey: []
components:
  schemas:
    DevicesByMemberResponseDto:
      type: object
      properties:
        data:
          description: Array of devices assigned to the member
          type: array
          items:
            $ref: '#/components/schemas/DeviceResponseDto'
        count:
          type: number
          description: Total number of devices for this member
          example: 3
        member:
          description: Member information
          allOf:
            - $ref: '#/components/schemas/MemberResponseDto'
        authType:
          type: string
          description: How the request was authenticated
          enum:
            - api-key
            - session
          example: api-key
        authenticatedUser:
          type: object
          description: Authenticated user information (present for session auth)
          example:
            id: usr_abc123def456
            email: user@company.com
      required:
        - data
        - count
        - member
        - authType
    DeviceResponseDto:
      type: object
      properties:
        created_at:
          type: string
          description: Device created at
          example: '2024-01-01T00:00:00Z'
        updated_at:
          type: string
          description: Device updated at
          example: '2024-01-15T00:00:00Z'
        software:
          type: array
          description: Software list
          items:
            type: object
        software_updated_at:
          type: string
          description: Software updated at
          example: '2024-01-10T00:00:00Z'
        id:
          description: >-
            Device ID (numeric for Fleet devices, string UUID for device-agent
            devices)
          oneOf:
            - type: number
              example: 123
            - type: string
              example: clx1abc123
        detail_updated_at:
          type: string
          description: Detail updated at
          example: '2024-01-10T00:00:00Z'
        label_updated_at:
          type: string
          description: Label updated at
          example: '2024-01-10T00:00:00Z'
        policy_updated_at:
          type: string
          description: Policy updated at
          example: '2024-01-10T00:00:00Z'
        last_enrolled_at:
          type: string
          description: Last enrolled at
          example: '2024-01-01T00:00:00Z'
        seen_time:
          type: string
          description: Last seen time
          example: '2024-01-15T12:00:00Z'
        refetch_requested:
          type: boolean
          description: Refetch requested
          example: false
        hostname:
          type: string
          description: Hostname
          example: johns-macbook
        uuid:
          type: string
          description: Device UUID
          example: abc123def456
        platform:
          type: string
          description: Platform
          example: darwin
        osquery_version:
          type: string
          description: Osquery version
          example: 5.10.2
        orbit_version:
          type: string
          description: Orbit version
          example: 1.19.0
        fleet_desktop_version:
          type: string
          description: Fleet desktop version
          example: 1.19.0
        scripts_enabled:
          type: boolean
          description: Scripts enabled
          example: true
        os_version:
          type: string
          description: OS version
          example: macOS 14.2.1
        build:
          type: string
          description: Build
          example: 23C71
        platform_like:
          type: string
          description: Platform like
          example: darwin
        code_name:
          type: string
          description: Code name
          example: sonoma
        uptime:
          type: number
          description: Uptime in seconds
          example: 86400
        memory:
          type: number
          description: Memory in bytes
          example: 17179869184
        cpu_type:
          type: string
          description: CPU type
          example: x86_64
        cpu_subtype:
          type: string
          description: CPU subtype
          example: x86_64h
        cpu_brand:
          type: string
          description: CPU brand
          example: Intel(R) Core(TM) i7-9750H
        cpu_physical_cores:
          type: number
          description: CPU physical cores
          example: 6
        cpu_logical_cores:
          type: number
          description: CPU logical cores
          example: 12
        hardware_vendor:
          type: string
          description: Hardware vendor
          example: Apple Inc.
        hardware_model:
          type: string
          description: Hardware model
          example: MacBookPro16,1
        hardware_version:
          type: string
          description: Hardware version
          example: '1.0'
        hardware_serial:
          type: string
          description: Hardware serial
          example: C02XW0AAJGH6
        computer_name:
          type: string
          description: Computer name
          example: John's MacBook Pro
        public_ip:
          type: string
          description: Public IP
          example: 203.0.113.1
        primary_ip:
          type: string
          description: Primary IP
          example: 192.168.1.100
        primary_mac:
          type: string
          description: Primary MAC
          example: '00:11:22:33:44:55'
        distributed_interval:
          type: number
          description: Distributed interval
          example: 10
        config_tls_refresh:
          type: number
          description: Config TLS refresh
          example: 3600
        logger_tls_period:
          type: number
          description: Logger TLS period
          example: 300
        team_id:
          type: object
          description: Team ID
          example: 1
          nullable: true
        pack_stats:
          type: array
          description: Pack stats
          items:
            type: object
        team_name:
          type: object
          description: Team name
          example: Engineering
          nullable: true
        users:
          type: array
          description: Users
          items:
            type: object
        gigs_disk_space_available:
          type: number
          description: Disk space available in GB
          example: 250.5
        percent_disk_space_available:
          type: number
          description: Percent disk space available
          example: 75.2
        gigs_total_disk_space:
          type: number
          description: Total disk space in GB
          example: 500
        disk_encryption_enabled:
          type: boolean
          description: Disk encryption enabled
          example: true
        issues:
          type: object
          description: Issues
          additionalProperties: true
        mdm:
          type: object
          description: MDM info
          additionalProperties: true
        refetch_critical_queries_until:
          type: object
          description: Refetch critical queries until
          example: '2024-01-20T00:00:00Z'
          nullable: true
        last_restarted_at:
          type: string
          description: Last restarted at
          example: '2024-01-10T08:00:00Z'
        policies:
          description: Policies
          type: array
          items:
            $ref: '#/components/schemas/FleetPolicyDto'
        labels:
          type: array
          description: Labels
          items:
            type: object
        packs:
          type: array
          description: Packs
          items:
            type: object
        batteries:
          type: array
          description: Batteries
          items:
            type: object
        end_users:
          type: array
          description: End users
          items:
            type: object
        last_mdm_enrolled_at:
          type: string
          description: Last MDM enrolled at
          example: '2024-01-01T00:00:00Z'
        last_mdm_checked_in_at:
          type: string
          description: Last MDM checked in at
          example: '2024-01-15T12:00:00Z'
        status:
          type: string
          description: Device status
          example: online
        display_text:
          type: string
          description: Display text
          example: Johns MacBook Pro
        display_name:
          type: string
          description: Display name
          example: John's MacBook Pro
      required:
        - created_at
        - updated_at
        - software
        - software_updated_at
        - id
        - detail_updated_at
        - label_updated_at
        - policy_updated_at
        - last_enrolled_at
        - seen_time
        - refetch_requested
        - hostname
        - uuid
        - platform
        - osquery_version
        - orbit_version
        - fleet_desktop_version
        - scripts_enabled
        - os_version
        - build
        - platform_like
        - code_name
        - uptime
        - memory
        - cpu_type
        - cpu_subtype
        - cpu_brand
        - cpu_physical_cores
        - cpu_logical_cores
        - hardware_vendor
        - hardware_model
        - hardware_version
        - hardware_serial
        - computer_name
        - public_ip
        - primary_ip
        - primary_mac
        - distributed_interval
        - config_tls_refresh
        - logger_tls_period
        - team_id
        - pack_stats
        - team_name
        - users
        - gigs_disk_space_available
        - percent_disk_space_available
        - gigs_total_disk_space
        - disk_encryption_enabled
        - issues
        - mdm
        - refetch_critical_queries_until
        - last_restarted_at
        - policies
        - labels
        - packs
        - batteries
        - end_users
        - last_mdm_enrolled_at
        - last_mdm_checked_in_at
        - status
        - display_text
        - display_name
    MemberResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Member ID
          example: mem_abc123def456
        userId:
          type: string
          description: User ID associated with member
          example: usr_abc123def456
        role:
          type: string
          description: Member role
          example: admin
        department:
          type: object
          description: Member department
          example: engineering
          nullable: true
        isActive:
          type: boolean
          description: Whether member is active
          example: true
        fleetDmLabelId:
          type: object
          description: FleetDM label ID for member devices
          example: 123
          nullable: true
        organizationId:
          type: string
          description: Organization ID this member belongs to
          example: org_abc123def456
        createdAt:
          format: date-time
          type: string
          description: When the member was created
          example: '2024-01-01T00:00:00Z'
      required:
        - id
        - userId
        - role
        - department
        - isActive
        - fleetDmLabelId
        - organizationId
        - createdAt
    FleetPolicyDto:
      type: object
      properties:
        id:
          type: number
          description: Policy ID
          example: 123
        name:
          type: string
          description: Policy name
          example: Password Policy
        query:
          type: string
          description: Policy query
          example: SELECT * FROM users;
        critical:
          type: boolean
          description: Whether policy is critical
          example: true
        description:
          type: string
          description: Policy description
          example: Ensures strong passwords
        author_id:
          type: number
          description: Author ID
          example: 456
        author_name:
          type: string
          description: Author name
          example: John Doe
        author_email:
          type: string
          description: Author email
          example: john@example.com
        team_id:
          type: object
          description: Team ID
          example: 789
          nullable: true
        resolution:
          type: string
          description: Policy resolution
          example: Update password settings
        platform:
          type: string
          description: Platform
          example: darwin
        calendar_events_enabled:
          type: boolean
          description: Calendar events enabled
          example: false
        created_at:
          type: string
          description: Created at
          example: '2024-01-01T00:00:00Z'
        updated_at:
          type: string
          description: Updated at
          example: '2024-01-15T00:00:00Z'
        response:
          type: string
          description: Policy response
          example: compliant
      required:
        - id
        - name
        - query
        - critical
        - description
        - author_id
        - author_name
        - author_email
        - team_id
        - resolution
        - platform
        - calendar_events_enabled
        - created_at
        - updated_at
        - response
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````