aYOUne
← Konfiguration API

UserFunctions

Singular: UserFunction — Base-URL: https://config-api.ayoune.app — Zugriff: CRUD

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": {
    "tags": [],
    "shared": false,
    "code": "",
    "language": "javascript",
    "triggerMode": "manual",
    "version": 0,
    "status": "draft",
    "allowedModels": [],
    "allowedQueues": [],
    "allowedUrls": [],
    "_credentials": [],
    "_id": "65e0b081121b7d48fe1581ec",
    "createdBy": "6045f4d25704710012485569",
    "useQuery": false,
    "script": "",
    "lastExecutionTime": 0,
    "totalExecutionTime": 0,
    "numExecutions": 0,
    "createdAt": "2024-02-29T16:27:45.326Z",
    "updatedAt": "2024-02-29T16:27:45.326Z",
    "runtime": {
      "timeout": 30000,
      "memoryLimit": 128
    },
    "envVars": [],
    "versions": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/userfunctions/65e0b081121b7d48fe1581ec",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Queries",
        "title": "MODEL_QUERY",
        "href": "https://api.ayoune.app/config/queries",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.queries"
      }
    ],
    "debugId": "6a62defbf27d6098834b1da6",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_USERFUNCTION",
        "href": "https://api.ayoune.app/config/userfunctions/65e0b081121b7d48fe1581ec/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_USERFUNCTION",
        "href": "https://api.ayoune.app/config/userfunctions/65e0b081121b7d48fe1581ec/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.95.0",
      "core": "2026.258.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "339",
      "reset": "1784865648",
      "resetDate": "Fri Jul 24 2026"
    },
    "responseTime": 106.795623,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend