Zum Inhalt springen
aYOUne
← Automation API

ApprovalRequests

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

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": {
    "_id": "6acf1de669829e3b920ba8c8",
    "externalKey": "knowledge-source:6acf1de0e4a348febb9877c1",
    "resourceType": "KnowledgeSource",
    "_requestedBy": "5a76d07e2d8b3270ff6df587",
    "_resource": "6acf1de0e4a348febb9877c1",
    "createdAt": "2026-10-14T06:15:02.451Z",
    "currentStage": 0,
    "description": "Das Dokument scheint sich auf einen spezifischen Wartungsvertrag zu beziehen, der für die Unternehmensbereiche nicht relevant ist. Bitte reichen Sie Dokumente ein, die sich auf die Kernkompetenzen oder Dienstleistungen des Unternehmens beziehen.",
    "requestType": "custom",
    "requestedAt": "2026-10-14T06:15:02.449Z",
    "resourceContext": {
      "curationStatus": "quarantined",
      "reason": "doubtful-verdict",
      "fit": {
        "score": 0,
        "verdict": "reject",
        "reason": "Das Dokument scheint sich auf einen spezifischen Wartungsvertrag zu beziehen, der für die Unternehmensbereiche nicht relevant ist. Bitte reichen Sie Dokumente ein, die sich auf die Kernkompetenzen oder Dienstleistungen des Unternehmens beziehen.",
        "_suggestedLibraries": [],
        "suggestedDepartmentKeys": [],
        "evaluatedAt": "2026-10-14T06:15:00.823Z",
        "method": "llm:gpt-4o-mini-2024-07-18"
      },
      "library": {
        "_id": "6a156ab832cbff4a8f662eb3",
        "name": "Stenografie"
      },
      "libraryOrigin": "classification",
      "libraryOriginLabel": "Vorschlag der Klassifikation (Ähnlichkeitssuche über die Einbettungen). Der Fit-Bewerter hat KEINE Bibliothek zugeordnet.",
      "duplicateOf": null,
      "approverSource": "tenant-admin",
      "deepLink": "/ai/knowledgesources/6acf1de0e4a348febb9877c1"
    },
    "shares": [],
    "stages": [
      {
        "order": 0,
        "label": "Kurator-Freigabe",
        "_eligibleApprovers": [
          "6045f4d25704710012485569",
          "5ee06fc3860473001cfb290e",
          "6abffbdf964b6234ed8779c8"
        ],
        "minApprovers": 1,
        "status": "pending",
        "_id": "6acf1de6fd55c20b629789c2",
        "decisions": [],
        "shares": []
      }
    ],
    "status": "pending",
    "title": "Wissensquelle in Quarantäne prüfen: [abnahme] Notiz.txt",
    "updatedAt": "2026-10-14T06:15:02.451Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://automation-api.ayoune.app/approvalrequests/6acf1de669829e3b920ba8c8",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "AutomationExecutions",
        "title": "MODEL_AUTOMATIONEXECUTION",
        "href": "https://api.ayoune.app/automation/automationexecutions",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "automation.automationexecutions"
      }
    ],
    "debugId": "6ad82f3e8178abf9777ab565",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_APPROVALREQUEST",
        "href": "https://api.ayoune.app/automation/approvalrequests/6acf1de669829e3b920ba8c8/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_APPROVALREQUEST",
        "href": "https://api.ayoune.app/automation/approvalrequests/6acf1de669829e3b920ba8c8",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.23.0",
      "core": "2026.387.1"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9739",
      "reset": "1792556193",
      "resetDate": "Wed Oct 21 2026"
    },
    "responseTime": 45.095779,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend