Get JWK

Overview

Retrieves detailed information about a specific JWK (JSON Web Key) including its key material. This endpoint returns the complete JWK data including cryptographic key material.

Endpoint

GET /apiops/projects/{projectName}/jwks/{jwkName}/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

Header Value Required
Authorization Bearer {token} Yes

Path Parameters

Parameter Type Required Description
projectName string Yes Project name
jwkName string Yes Name of the JWK

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "name": "my-jwk",
      "description": "JWK for API authentication",
      "projectId": "project-id",
      "sourceType": "URL",
      "sourceId": null,
      "sourceUrl": "https://example.com/.well-known/jwks.json",
      "type": "RSA",
      "kid": "key-id-1",
      "rsa": {
        "n": "modulus-value",
        "e": "AQAB",
        "d": "private-exponent",
        "p": "prime1",
        "q": "prime2"
      }
    }
  ]
}

Response Fields

Field Type Description
success boolean Indicates if the request was successful
resultList array[object] List containing the JWK (single item)

JWK Object

Field Type Description
name string JWK name
description string JWK description
projectId string Project ID where JWK belongs
sourceType string Source type: URL, COPY_PASTE, CERTIFICATE, PUBLIC_KEY, PRIVATE_KEY, KEYSTORE, GENERATE
sourceId string ID of the source (certificate, key, or keystore) if applicable
sourceUrl string URL of the source if sourceType is URL
type string JWK type: RSA, EC, OCT, OKP
kid string Key ID (kid) of the JWK. For URL and COPY_PASTE source types, this specifies which key to use when the source contains multiple keys (JWK Set)
rsa object RSA key material (if type is RSA)
ec object Elliptic Curve key material (if type is EC)
oct object Octet sequence key material (if type is OCT)
okp object Octet Key Pair key material (if type is OKP)

Notes

  • This endpoint returns the complete JWK including key material
  • Key material is decrypted and returned in the response
  • Use List JWKs endpoint for a lightweight list without key material

Error Response (400 Bad Request)

{
  "error": "bad_request",
  "error_description": "JWK (name: my-jwk) is not found!"
}

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/MyProject/jwks/my-jwk/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Key Material:
    • Full key material is returned in the response
    • Private keys are included for RSA, EC, and OKP types
    • Handle key material securely
  • Performance:
    • This endpoint returns complete JWK data
    • Use List JWKs for better performance when key material is not needed
  • Permissions:
    • Requires ROLE_API_SECURITY permission
    • User must have access to the project