numeno/api-admin

## Introduction Use the Numeno Administration API to create API Keys and set their permissions (which we call Scopes). This API is meant to be used by administrators of your organization. ## Scopes Scopes are used to let API Keys access only certain parts of the API. Scopes are expressed as a st

dev-main 2024-12-17 21:33 UTC

This package is auto-updated.

Last update: 2025-06-17 22:34:14 UTC


README

Introduction

Use the Numeno Administration API to create API Keys and set their permissions (which we call Scopes). This API is meant to be used by administrators of your organization.

Scopes

Scopes are used to let API Keys access only certain parts of the API.

Scopes are expressed as a string of the form api:resource:action.

For example, from the Numeno Article Recommender API (art-rec):

  • art-rec:feeds:read - can read any Feed (eg. GET /feeds, /feeds/:id, /feeds/:id/streams, etc.)
  • art-rec:feeds:write - can write (and read) any Feed
  • art-rec:feeds:* - can perform any action on Feeds
  • art-rec:*:read - can read any resource on art-rec
  • *:*:* - can do everything

For more information, please visit https://numeno.ai/.

Installation & Usage

Requirements

PHP 7.4 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "minimum-stability": "dev",
  "require": {
    "numeno/api-admin": "dev-main"
  }
}

Then run composer install

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: ApiKeyAuth
$config = NumenoAdmin\Configuration::getDefaultConfiguration()->setApiKey('X-Numeno-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = NumenoAdmin\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Numeno-Key', 'Bearer');


$apiInstance = new NumenoAdmin\Api\DefaultApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$key_new = new \NumenoAdmin\Model\KeyNew(); // \NumenoAdmin\Model\KeyNew

try {
    $result = $apiInstance->createKey($key_new);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->createKey: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.numeno.ai/admin

Class Method HTTP request Description
DefaultApi createKey POST /v1/keys Create a new Key for your organization
DefaultApi deleteKey DELETE /v1/keys/{key} Delete a Key
DefaultApi getKey GET /v1/keys/{key} Get detailed info about a Key
DefaultApi getKeys GET /v1/keys Get a list of all Keys for your organization
DefaultApi getScopes GET /v1/scopes Get the Scopes for this API
DefaultApi healthCheck GET /health Check the health of the API
DefaultApi updateKey PUT /v1/keys/{key} Update a Key

Models

Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-Numeno-Key
  • Location: HTTP header

Author

support@numeno.ai

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
    • Package version: 0.0.5
    • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen