---
updatedAt: 2026-05-31T12:17:20.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/administration/llms.txt
---

# Get Key Pair

Returns the details of a key pair.

Since: 7.6.0

Notes: Requires Artifactory Pro

Security: Requires an authenticated user, or anonymous (if "Anonymous Access" is globally enabled).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JFrog Artifactory Security API",
    "description": "REST API for managing security settings in JFrog Artifactory, including users, permissions, API keys, GPG keys, certificates, and encryption. \n\nNote - From Artifactory release 7.49.3, the security APIs are being decoupled from Artifactory and moving to JFrog Platform Access. This means that the security APIs below are planned to be deprecated at a later stage. We recommend using the available new APIs for all your security and access needs moving forward.\n",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support"
    }
  },
  "servers": [
    {
      "url": "https://{jfrog_url}/artifactory/api",
      "description": "JFrog Platform",
      "variables": {
        "jfrog_url": {
          "default": "myserver.jfrog.io",
          "description": "Your JFrog Platform hostname (e.g., mycompany.jfrog.io)"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "GPG Key Pairs",
      "description": "GPG key pair management for signing operations"
    }
  ],
  "paths": {
    "/security/keypair/{keyPairName}": {
      "get": {
        "tags": [
          "GPG Key Pairs"
        ],
        "summary": "Get Key Pair",
        "description": "Returns the details of a key pair.\n\nSince: 7.6.0\n\nNotes: Requires Artifactory Pro\n\nSecurity: Requires an authenticated user, or anonymous (if \"Anonymous Access\" is globally enabled).",
        "operationId": "getKeyPair",
        "parameters": [
          {
            "$ref": "#/components/parameters/keyPairName"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the key pair details including pair name, type, alias, and public key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPairSummary"
                },
                "examples": {
                  "keyPair": {
                    "summary": "Key pair details",
                    "value": {
                      "pairName": "alpine-local-key",
                      "pairType": "RSA",
                      "alias": "artifactory-alpine-local",
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq...\n-----END PUBLIC KEY-----"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "description": "Permission Denied - This operation requires an authenticated user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - The specified key pair was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    },
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-JFrog-Art-Api"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "parameters": {
      "keyPairName": {
        "name": "keyPairName",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The name of the key pair"
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "Bad Credentials - The provided authentication is invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "HTTP status code"
                },
                "message": {
                  "type": "string",
                  "description": "Error message"
                }
              }
            }
          }
        }
      },
      "KeyPairSummary": {
        "type": "object",
        "properties": {
          "alias": {
            "type": "string"
          },
          "pairName": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "pairType": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```