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

# List SSH keys

> Retrieve a list of SSH keys for the current authenticated user.



## OpenAPI

````yaml /api-spec/ias-public-api.yaml get /me/ssh-keys
openapi: 3.0.3
info:
  title: IAM Service API
  description: APIs for IAM Service.
  version: 2.4.0
servers:
  - url: https://console.gmicloud.ai/api/v1
    description: IAM Service API
security: []
paths:
  /me/ssh-keys:
    get:
      tags:
        - me
      summary: List SSH keys
      description: Retrieve a list of SSH keys for the current authenticated user.
      operationId: listSSHKeys
      parameters:
        - name: name
          in: query
          schema:
            type: string
          description: Filter SSH keys by name (case-insensitive partial match).
          example: My SSH key
          x-oapi-codegen-extra-tags:
            binding: omitempty
          x-go-type-skip-optional-pointer: true
        - name: fingerprint
          in: query
          schema:
            type: string
          description: >-
            Filter SSH keys by SHA-256 fingerprint (case-insensitive partial
            match).
          example: AbCdEfGhIjKlMnOpQrStUvWxYz1234567890
          x-oapi-codegen-extra-tags:
            binding: omitempty
          x-go-type-skip-optional-pointer: true
      responses:
        '200':
          description: Successfully retrieved the list of SSH keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/listSSHKeysResponse'
        '500':
          description: >
            - [group:**ssh-key**, code:**1201**]: Get SSH key list encountered
            DB error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrStatusMsg'
              examples:
                Get SSH key list encountered DB error:
                  summary: Get SSH key list encountered DB error.
                  value:
                    group: ssh-key
                    code: 1201
                    message: Get SSH key list encountered DB error.
                    traces:
                      - DB error occurred.
      security:
        - bearerAuth: []
components:
  schemas:
    listSSHKeysResponse:
      type: object
      x-go-name: listSSHKeysResponse
      properties:
        keys:
          type: array
          description: A list of SSH keys.
          items:
            $ref: '#/components/schemas/sshKeyListItem'
      required:
        - keys
    ErrStatusMsg:
      type: object
      properties:
        group:
          type: string
          description: >-
            API function group\n -Will be "request" if there are invalid request
            parameters.
          x-oapi-codegen-extra-tags:
            binding: required
        code:
          type: integer
          description: The substatus error code for the API response.
          x-oapi-codegen-extra-tags:
            binding: required
        message:
          type: string
          description: The substatus error Message for API response.
          x-go-type-skip-optional-pointer: true
        traces:
          type: array
          items:
            type: string
          description: The original error messages.
          x-go-type-skip-optional-pointer: true
        validationDetail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationDetail'
          description: >-
            Returned when there are invalid request
            paremeters(group="request")\n List of invalid fields and the reason
            of error.
          x-go-type-skip-optional-pointer: true
      example:
        group: request
        code: 0
        validationDetail:
          - field: email
            expression: required
            originalValue: ''
            reason: This field is required.
      required:
        - group
        - code
    sshKeyListItem:
      type: object
      x-go-name: sshKeyListItem
      description: Information about an SSH key.
      properties:
        id:
          type: string
          format: uuid
          x-go-type: uuid.UUID
          description: The unique identifier for the SSH key.
          example: 550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          description: The SSH key name.
          example: My SSH key
        fingerprint:
          type: string
          description: The SSH key fingerprint in SHA256 format.
          example: AbCdEfGhIjKlMnOpQrStUvWxYz1234567890
        createdAt:
          type: integer
          x-go-type: int64
          description: The UNIX timestamp in seconds when the SSH key was created (UTC).
          example: 1738812775
      required:
        - id
        - name
        - fingerprint
        - createdAt
    ValidationDetail:
      type: object
      properties:
        field:
          type: string
          description: The field of the request data.
          x-go-type-skip-optional-pointer: true
        expression:
          type: string
          description: The form of violation.
          x-go-type-skip-optional-pointer: true
        argument:
          type: string
          description: The number or data to support the expression.
          x-go-type-skip-optional-pointer: true
        originalValue:
          description: The original value from the request.
          x-go-type-skip-optional-pointer: true
        reason:
          type: string
          description: The reason for the validation error.
          x-go-type-skip-optional-pointer: true
      example:
        - field: fieldXXX
          expression: required
          originalValue: ''
          reason: This field is required.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        An access token used to authenticate a user and grant access to
        restricted APIs. It is issued by session APIs.

        For status codes related to this header, refer to the 

        [Common Headers
        Documentation](https://gmicloud.atlassian.net/wiki/spaces/CE/pages/47199534/Common+Headers#Authorization).

````