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

# Get a device group by ID

> Return the device group: its `target` filter (the same shape create/update accept) plus the device IDs that filter currently resolves to. Read the `target` here before a PUT to change one field while preserving the rest of the targeting.

<span className="badge-read">Key: Read</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /device-groups/{deviceGroupId}
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /device-groups/{deviceGroupId}:
    get:
      tags:
        - DeviceGroups
      summary: Get a device group by ID
      description: >-
        Return the device group: its `target` filter (the same shape
        create/update accept) plus the device IDs that filter currently resolves
        to. Read the `target` here before a PUT to change one field while
        preserving the rest of the targeting.
      operationId: getDeviceGroup
      parameters:
        - name: deviceGroupId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDeviceGroup_Output'
components:
  schemas:
    GetDeviceGroup_Output:
      type: object
      properties:
        id:
          description: Device group ID
          type: string
        name:
          description: Device group name
          type: string
        target:
          type: object
          description: >-
            The device-group target filter — the same shape accepted by
            create/update. Read this, change what you need, and send it back on
            PUT to preserve targeting when renaming.
          propertyNames:
            type: string
          additionalProperties: {}
        deviceIds:
          type: array
          description: IDs of devices currently resolved by this device group target
          items:
            type: string
      required:
        - id
        - name
        - target
        - deviceIds
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````