Skip to Content
Xeonr Developer Docs

Import Legacy API Keys

POST
/xeonr.auth.api.v1.ApiKeysService/ImportLegacyApiKeys

Imports a product's existing keys by hash under a registered prefix. Idempotent on key_hash: a hash already present is reported, not changed. Entries are validated individually and a rejected entry does not fail the batch.

Service accounts only.

Required scopes: auth:api-keys:import

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

legacyPrefix?string

A prefix previously registered with RegisterLegacyPrefix.

Length2 <= length <= 16
keys?array<>
Items1 <= items <= 500
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.ApiKeysService/ImportLegacyApiKeys" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "imported": 0,
  "alreadyPresent": 0,
  "failed": 0,
  "results": [
    {
      "externalRef": "string",
      "keyHash": "string",
      "keyId": "string",
      "alreadyPresent": true,
      "error": "string"
    }
  ]
}