AppMage

API Registry

This endpoint group provides browser-facing access to API registry entries for the current subscription. It supports listing, creating, updating, deleting, and option lookups for registry items, and it also exposes a check for whether the current subscription has global publish rights. Responses intentionally exclude secretKey values when data is returned to the browser.

Endpoints

POST /api/rpc (Method: ApiRegistryRpc.getData)

  • Description: List API registry entries for the current subscription. Secret values are removed from the response before it is returned.

  • Request Body:

    {
      "method": "ApiRegistryRpc.getData",
      "params": {
        "filter": {
          "q": "string",
          "tags": ["string"],
          "type": "string",
          "enabled": true
        },
        "page": 1,
        "pageSize": 50,
        "sort": {}
      }
    }
  • Parameters:

    Name Type Required Description
    filter Object No Optional filter object. Supported fields include q, tags, type, and enabled. Additional properties are permitted.
    page Number No Page number. Must be a positive integer. Defaults to 1.
    pageSize Number No Page size. Must be a positive integer. Defaults to 50.
    sort Object No Optional sort object. Any additional properties are permitted.
  • Response:

    {
      "success": true,
      "data": {
        "data": [
          {
            "_id": "string",
            "name": "string",
            "description": "string",
            "documentation": "string",
            "type": "rest",
            "baseUrl": "https://example.com",
            "authType": "none",
            "authKeyName": "string",
            "secretScope": "subscription",
            "endpoints": [],
            "tags": [],
            "enabled": true,
            "publishGlobal": false
          }
        ]
      }
    }

    The returned list is sanitized so secretKey is not included in any entry. The surrounding result object is whatever ApiRegistryService.list(...) returns.

  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "ApiRegistryRpc.getData",
        "params": {
          "filter": {},
          "page": 1,
          "pageSize": 50
        }
      }'

POST /api/rpc (Method: ApiRegistryRpc.create)

  • Description: Create a new API registry entry and return the created entry without secretKey.

  • Request Body:

    {
      "method": "ApiRegistryRpc.create",
      "params": {
        "name": "string",
        "description": "string",
        "documentation": "string",
        "type": "rest",
        "baseUrl": "https://example.com",
        "authType": "none",
        "authKeyName": "",
        "secretKey": "",
        "secretScope": "subscription",
        "endpoints": [],
        "tags": [],
        "enabled": true,
        "publishGlobal": false
      }
    }
  • Parameters:

    Name Type Required Description
    name String Yes Entry name. Must be a non-empty string.
    description String Yes Entry description. Must be a non-empty string.
    documentation String No Optional documentation text. Defaults to an empty string.
    type String No Entry type. Allowed values are rest and mcp. Defaults to rest.
    baseUrl String Yes Base URL for the API. Must be a valid URL.
    authType String No Authentication type. Allowed values are header, query, bearer, and none. Defaults to none.
    authKeyName String No Authentication key name. Defaults to an empty string.
    secretKey String No Secret key value. Accepted by the schema, but not returned in the browser-facing response.
    secretScope String No Secret scope. Allowed values are subscription and agent. Defaults to subscription.
    endpoints Array No List of endpoint definitions. Defaults to an empty array.
    tags Array No List of tags. Defaults to an empty array.
    enabled Boolean No Whether the registry entry is enabled. Defaults to true.
    publishGlobal Boolean No Whether the registry entry is published globally. Defaults to false.
  • Response:

    {
      "success": true,
      "data": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "documentation": "string",
        "type": "rest",
        "baseUrl": "https://example.com",
        "authType": "none",
        "authKeyName": "string",
        "secretScope": "subscription",
        "endpoints": [],
        "tags": [],
        "enabled": true,
        "publishGlobal": false
      }
    }

    The returned object is the created entry with secretKey removed.

  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "ApiRegistryRpc.create",
        "params": {
          "name": "My API",
          "description": "Registry entry",
          "baseUrl": "https://example.com"
        }
      }'

POST /api/rpc (Method: ApiRegistryRpc.update)

  • Description: Update an existing API registry entry and return the updated entry without secretKey.

  • Request Body:

    {
      "method": "ApiRegistryRpc.update",
      "params": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "documentation": "string",
        "type": "rest",
        "baseUrl": "https://example.com",
        "authType": "none",
        "authKeyName": "",
        "secretKey": "",
        "secretScope": "subscription",
        "endpoints": [],
        "tags": [],
        "enabled": true,
        "publishGlobal": false
      }
    }
  • Parameters:

    Name Type Required Description
    _id String Yes Entry identifier.
    name String Yes Entry name. Must be a non-empty string.
    description String Yes Entry description. Must be a non-empty string.
    documentation String No Optional documentation text. Defaults to an empty string.
    type String No Entry type. Allowed values are rest and mcp. Defaults to rest.
    baseUrl String Yes Base URL for the API. Must be a valid URL.
    authType String No Authentication type. Allowed values are header, query, bearer, and none. Defaults to none.
    authKeyName String No Authentication key name. Defaults to an empty string.
    secretKey String No Secret key value. Accepted by the schema, but not returned in the browser-facing response.
    secretScope String No Secret scope. Allowed values are subscription and agent. Defaults to subscription.
    endpoints Array No List of endpoint definitions. Defaults to an empty array.
    tags Array No List of tags. Defaults to an empty array.
    enabled Boolean No Whether the registry entry is enabled. Defaults to true.
    publishGlobal Boolean No Whether the registry entry is published globally. Defaults to false.
  • Response:

    {
      "success": true,
      "data": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "documentation": "string",
        "type": "rest",
        "baseUrl": "https://example.com",
        "authType": "none",
        "authKeyName": "string",
        "secretScope": "subscription",
        "endpoints": [],
        "tags": [],
        "enabled": true,
        "publishGlobal": false
      }
    }

    The returned object is the updated entry with secretKey removed.

  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "ApiRegistryRpc.update",
        "params": {
          "_id": "entry-id",
          "name": "My API",
          "description": "Updated registry entry",
          "baseUrl": "https://example.com"
        }
      }'

POST /api/rpc (Method: ApiRegistryRpc.delete)

  • Description: Delete an API registry entry.

  • Request Body:

    {
      "method": "ApiRegistryRpc.delete",
      "params": {
        "_id": "string"
      }
    }
  • Parameters:

    Name Type Required Description
    _id String Yes Entry identifier to delete.
  • Response:

    {
      "success": true,
      "data": {}
    }

    The exact response payload depends on what ApiRegistryService.delete(...) returns; this RPC forwards that result directly.

  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "ApiRegistryRpc.delete",
        "params": {
          "_id": "entry-id"
        }
      }'

POST /api/rpc (Method: ApiRegistryRpc.getApiOptions)

  • Description: Return { value, label } pairs for use in TagInput and SearchSelect controls.
  • Request Body:
    {
      "method": "ApiRegistry