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

# Get an agent by name

> Response will contain the requested agent if the caller is authorized to view it



## OpenAPI

````yaml get /org/{org}/agent/{name}
openapi: 3.0.3
info:
  title: Control Plane Core API
  description: Copyright © 2023 Control Plane Corporation. All rights reserved.
  version: 1.0.0
servers:
  - url: https://api.cpln.io
    description: ''
security:
  - {}
  - serviceAccountKey: []
  - jwt: []
externalDocs:
  url: https://docs.controlplane.com/
  description: End-user documentation
paths:
  /org/{org}/agent/{name}:
    get:
      tags:
        - agent
      summary: Get an agent by name
      description: >-
        Response will contain the requested agent if the caller is authorized to
        view it
      parameters:
        - in: path
          name: org
          required: true
          schema:
            type: string
        - in: path
          name: name
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/agent'
        '403':
          description: Not found or not allowed to view
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    agent:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
          maxLength: 64
        kind:
          type: string
          readOnly: true
        version:
          type: integer
          readOnly: true
        description:
          type: string
          maxLength: 250
        tags:
          type: object
        created:
          type: string
          format: date-time
          readOnly: true
        lastModified:
          type: string
          format: date-time
          readOnly: true
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
          readOnly: true
        status:
          $ref: '#/components/schemas/agent_status'
          readOnly: true
      additionalProperties: false
    error:
      type: object
      properties:
        status:
          type: integer
        message:
          type: string
        code:
          type: string
        details:
          type: object
        id:
          type: string
      additionalProperties: false
    link:
      type: object
      properties:
        rel:
          type: string
        href:
          type: string
      additionalProperties: false
    agent_status:
      type: object
      properties:
        bootstrapConfig:
          type: object
          properties:
            registrationToken:
              type: string
            agentId:
              type: string
            agentLink:
              type: string
            hubEndpoint:
              type: string
            protocolVersion:
              type: string
              enum:
                - v1
                - v2
          additionalProperties: false
        protocolVersion:
          type: string
          enum:
            - v1
            - v2
      additionalProperties: false
  securitySchemes:
    serviceAccountKey:
      type: apiKey
      in: header
      name: Authorization
      description: Service account key can be used as API keys
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: IDP-provided token

````