aYOUne
← KI / AI API

AIHooks

Singular: AIHook — Base-URL: https://ai.ayoune.app — Zugriff: CRUD — Maschinenlesbare Beschreibung (JSON · YAML)

play_circle Jetzt ausprobieren beta

Requests werden über den consumer-app Proxy an *.ayoune.app weitergeleitet. Tokens bleiben im Browser und werden pro Call mitgesendet.

Beispiel-Response (aufgezeichnet) Beispiel

Eine echte, zuvor aufgezeichnete GET /:id-Antwort dieses Endpunkts — nicht der Live-Call oben. Sensible Felder sind maskiert.

{
  "payload": {
    "triggerOn": {
      "tools": [],
      "agents": [],
      "events": []
    },
    "_id": "6a353bd55a44977e01d466dd",
    "name": "Audit Logger",
    "description": "Logs all AI operations for compliance audit trail",
    "status": "active",
    "hookType": "post-query",
    "actionType": "log",
    "onFailure": "allow",
    "sortOrder": 99,
    "global": false,
    "isTemplate": false,
    "isDraft": true,
    "validationRules": [],
    "createdAt": "2026-06-19T12:53:41.391Z",
    "updatedAt": "2026-06-19T12:53:41.391Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://ai.ayoune.app/aihooks/6a353bd55a44977e01d466dd",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "UserFunctions",
        "title": "MODEL_USERFUNCTION",
        "href": "https://api.ayoune.app/config/userfunctions",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.userfunctions"
      },
      {
        "rel": "AIHooks",
        "title": "MODEL_AIHOOK",
        "href": "https://api.ayoune.app/ai/aihooks",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ai.aihooks"
      }
    ],
    "debugId": "6a8a6b1d216dcd463ba8213a",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_AIHOOK",
        "href": "https://api.ayoune.app/ai/aihooks/6a353bd55a44977e01d466dd/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_AIHOOK",
        "href": "https://api.ayoune.app/ai/aihooks/6a353bd55a44977e01d466dd/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.162.0",
      "core": "2026.315.1"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9787",
      "reset": "1787459872",
      "resetDate": "Sun Aug 23 2026"
    },
    "responseTime": 137.749748,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

MethodePathBeschreibungRight
GET /aihooks Liste mit Filtern/Paginierung ai.aihooks.view
GET /aihooks/:id Einzelner Datensatz ai.aihooks.view
POST /aihooks Neuen Datensatz erstellen ai.aihooks.new
PUT /aihooks Datensatz aktualisieren ai.aihooks.edit
DELETE /aihooks/:id Datensatz löschen ai.aihooks.delete

SDK

import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');

// Alle abrufen
const list = await ay.ai.aIHooks.find().limit(10).exec();

// Einzelnen Datensatz
const one = await ay.ai.aIHooks.findById('OBJECT_ID').exec();

// Erstellen
const created = await ay.ai.aIHooks.create({ name: 'Foo' });

Weiterführend