aYOUne
← CMS API

Downloads

Singular: Download — Base-URL: https://cms-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": {
    "options": {
      "waterMarkOptions": {
        "x": 300,
        "y": 30,
        "size": 12,
        "opacity": 0.5,
        "color": "#000000"
      },
      "showLogo": true,
      "coverSize": 96,
      "shareUrl": "",
      "redirectUrl": "",
      "customWaterMarkText": ""
    },
    "forSale": false,
    "protected": false,
    "_id": "65e0afc8121b7d48fe155634",
    "autoUpdate": false,
    "maxDownloads": -1,
    "downloadCount": 0,
    "tags": [],
    "key": "",
    "createdBy": "6045f4d25704710012485569",
    "versions": [],
    "createdAt": "2024-02-29T16:24:40.730Z",
    "updatedAt": "2024-02-29T16:24:40.730Z",
    "keys": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://cms-api.ayoune.app/downloads/65e0afc8121b7d48fe155634",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Products",
        "title": "MODEL_PRODUCT",
        "href": "https://api.ayoune.app/pim/products",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pim.products"
      },
      {
        "rel": "DownloadCategories",
        "title": "MODEL_DOWNLOADCATEGORY",
        "href": "https://api.ayoune.app/cms/downloadcategories",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "cms.downloadcategories"
      }
    ],
    "debugId": "6a62dc7401c81db07e1db034",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_DOWNLOAD",
        "href": "https://api.ayoune.app/cms/downloads/65e0afc8121b7d48fe155634/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_DOWNLOAD",
        "href": "https://api.ayoune.app/cms/downloads/65e0afc8121b7d48fe155634/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.25.5",
      "core": "2026.258.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2424",
      "reset": "1784867449",
      "resetDate": "Fri Jul 24 2026"
    },
    "responseTime": 27.025718,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend