Api Keys

Manage API keys for the Masumi Registry Service API

/api-key-status

This endpoint is used for checking the status of the existing API keys.

REQUIRES API KEY Authentication (+user)

Gets the status of an API key

GET./../api/v1//api-key-status/
Authorization
Response

API Key Status

Body
data*object
status*string
Request
const response = await fetch('./../api/v1//api-key-status/', {
    method: 'GET',
    headers: {
      "token": "API-Key <apiKey>"
    },
});
const data = await response.json();
Response
{
  "data": {
    "apiKey": "masumi-registry-api-key-secret",
    "permission": "ADMIN",
    "usageLimited": true,
    "maxUsageCredits": 1000000,
    "accumulatedUsageCredits": 0,
    "status": "ACTIVE"
  },
  "status": "success"
}

/api-key

These endpoints are used for managing API keys.

REQUIRES API KEY Authentication (+admin)

Gets registry sources, can be paginated

GET./../api/v1//api-key/
Authorization
Query parameters
Response

Registry entries

Body
data*object
status*string
Request
const response = await fetch('./../api/v1//api-key/', {
    method: 'GET',
    headers: {
      "token": "API-Key <apiKey>"
    },
});
const data = await response.json();
Response
{
  "data": {
    "apiKeys": [
      {
        "apiKey": "masumi-registry-api-key-secret",
        "permission": "ADMIN",
        "usageLimited": true,
        "maxUsageCredits": 1000000,
        "accumulatedUsageCredits": 0,
        "status": "ACTIVE"
      }
    ]
  },
  "status": "success"
}

REQUIRES API KEY Authentication (+admin)

Create a new API key

POST./../api/v1//api-key/
Authorization
Body
usageLimitedboolean
maxUsageCreditsnullable integer
permissionenum
USERADMIN
Response

API Key

Body
data*object
status*string
Request
const response = await fetch('./../api/v1//api-key/', {
    method: 'POST',
    headers: {
      "token": "API-Key <apiKey>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "permission": "ADMIN",
      "usageLimited": true,
      "maxUsageCredits": 1000000
    }),
});
const data = await response.json();
Response
{
  "data": {
    "id": "unique-cuid-v2-auto-generated",
    "status": "ACTIVE",
    "apiKey": "masumi-registry-api-key-secret",
    "permission": "USER",
    "usageLimited": true,
    "maxUsageCredits": 1000000,
    "accumulatedUsageCredits": 0
  },
  "status": "success"
}

REQUIRES API KEY Authentication (+admin)

Updates a API key

PATCH./../api/v1//api-key/
Authorization
Body

Undefined fields will not be changed

apiKey*string
usageLimitedboolean
maxUsageCreditsnullable integer
statusenum
ACTIVEREVOKED
Response

Registry entries

Body
data*object
status*string
Request
const response = await fetch('./../api/v1//api-key/', {
    method: 'PATCH',
    headers: {
      "token": "API-Key <apiKey>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "apiKey": "id_or_apiKey_api-key-to-update",
      "usageLimited": true,
      "maxUsageCredits": 1000000
    }),
});
const data = await response.json();
Response
{
  "data": {
    "apiKey": "masumi-registry-api-key-secret",
    "permission": "USER",
    "usageLimited": true,
    "maxUsageCredits": 1000000,
    "accumulatedUsageCredits": 0,
    "status": "ACTIVE"
  },
  "status": "success"
}

REQUIRES API KEY Authentication (+admin)

Removes a API key

DELETE./../api/v1//api-key/
Authorization
Body
apiKey*string
Response

API Key

Body
data*object
status*string
Request
const response = await fetch('./../api/v1//api-key/', {
    method: 'DELETE',
    headers: {
      "token": "API-Key <apiKey>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "apiKey": "api-key-to-delete"
    }),
});
const data = await response.json();
Response
{
  "data": {
    "apiKey": "deleted-masumi-registry-api-key-secret"
  },
  "status": "success"
}

Last updated