> ## Documentation Index
> Fetch the complete documentation index at: https://www.docusnap.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mehrere Assets anlegen oder aktualisieren

> Wie `POST /asset`, für bis zu **100** Assets in einem Aufruf und einer
Transaktion. Die Antwort trägt je Bündel ein Ergebnis in `results`, in
der Reihenfolge der Anfrage; zugeordnet wird über `idPair.fakeId`, also
die `id` des Bündels. `isSuccess` der Gesamtantwort sagt nur, dass die
Liste verarbeitet wurde – ob jedes Asset gespeichert wurde, steht in
`results[].isSuccess` und `failedCount`.

Berechtigung: *Lesen und Schreiben*.




## OpenAPI

````yaml /api-reference/openapi.de.yaml post /asset/bulk
openapi: 3.0.4
info:
  title: Docusnap365 REST API
  version: v1
  description: |
    Öffentliche REST-API von Docusnap365. Lesender Zugriff auf die Assets
    eines Mandanten mit Filter, Sortierung, seitenweiser Ausgabe über Cursor
    und Laden von Asset-Details (Expands); schreibender Zugriff über das
    Anlegen und Aktualisieren von Assets.

    **Authentifizierung.** API-Schlüssel im Header `x-api-key`. Schlüssel
    legen Besitzer und Administratoren in Docusnap365 unter *Verwaltung ›
    Integrationen › API-Schlüssel* an, mit dem Zugriff *Lesen* oder *Lesen und
    Schreiben*. Lesende Endpunkte verlangen *Lesen*, schreibende *Lesen und
    Schreiben*.

    **Sichtbarkeit.** Der Schlüssel gehört einem Benutzer; dessen Rechte
    gelten. Zurückgegeben wird ausschließlich, was die Filter dieses Benutzers
    auf Organisation, Plattform, Domäne und Standort zulassen. Fehlende Rechte
    erzeugen keinen Fehler, sondern eine kleinere Ergebnismenge. Geliefert
    werden nur **aktive** Assets; gelöschte, archivierte und ausgeblendete sind
    nicht erreichbar, auch nicht über einen Filter auf `status`. Assets eines
    deaktivierten Typs werden nicht zurückgegeben.

    **Kontingent.** Jede Anfrage zählt gegen das Kontingent der Subscription
    (*API- & MCP-Anfragen*). Bei begrenztem Kontingent trägt jede Antwort die
    Header `X-RateLimit-Limit`, `X-RateLimit-Remaining`,
    `X-RateLimit-Extra-Remaining` und `X-RateLimit-Reset`; ist es erschöpft,
    antwortet die API mit `429` und `Retry-After`.

    **Fehler.** Alle Fehler kommen als `application/problem+json` mit
    `errorCode`, `errors[]` und `traceId`.
servers:
  - url: https://api.docusnap365.com/api/v1
    description: Produktion
security:
  - apiKey: []
tags:
  - name: Assets
    description: Assets lesen, abfragen, anlegen und aktualisieren.
paths:
  /asset/bulk:
    post:
      tags:
        - Assets
      summary: Mehrere Assets anlegen oder aktualisieren
      description: |
        Wie `POST /asset`, für bis zu **100** Assets in einem Aufruf und einer
        Transaktion. Die Antwort trägt je Bündel ein Ergebnis in `results`, in
        der Reihenfolge der Anfrage; zugeordnet wird über `idPair.fakeId`, also
        die `id` des Bündels. `isSuccess` der Gesamtantwort sagt nur, dass die
        Liste verarbeitet wurde – ob jedes Asset gespeichert wurde, steht in
        `results[].isSuccess` und `failedCount`.

        Berechtigung: *Lesen und Schreiben*.
      operationId: ingestAssetBulk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/AssetBundle'
            example:
              - id: 11111111-1111-1111-1111-111111111111
                schemaId: 00000000-0000-0000-0000-000000000000
                object:
                  name: SRV01
                  schemaId: 00000000-0000-0000-0000-000000000000
                  completenessLevel: 80
                objectData:
                  serialNumber: CZC811922L
              - id: 22222222-2222-2222-2222-222222222222
                schemaId: 00000000-0000-0000-0000-000000000000
                object:
                  name: SRV02
                  schemaId: 00000000-0000-0000-0000-000000000000
                  completenessLevel: 80
                objectData:
                  serialNumber: CZC811923M
      responses:
        '200':
          description: Liste verarbeitet; Ergebnis je Bündel in `results`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestBulkResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    AssetBundle:
      type: object
      description: >
        Ein Asset beim Anlegen oder Aktualisieren. Die Feldnamen `object` und
        `objectData` sind Teil der Schnittstelle.
      required:
        - schemaId
      properties:
        id:
          type: string
          format: uuid
          description: >
            Frei gewählte Kennung der Anfrage. Wird nicht gespeichert und kommt
            als `idPair.fakeId` zurück; ohne Angabe wird eine erzeugt.
        schemaId:
          type: string
          format: uuid
          description: Typ des Assets. Pflicht, auch wenn `object.schemaId` gesetzt ist.
        object:
          $ref: '#/components/schemas/AssetCore'
        objectData:
          type: object
          additionalProperties: true
          description: >
            Daten des Typs, nach dessen Datendefinition. Wird ganz ersetzt,
            nicht ergänzt; weggelassen bleibt es unverändert, `{}` leert es.
        essentials:
          $ref: '#/components/schemas/EssentialsBundle'
        facets:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              additionalProperties: true
          description: ITAM- und ISMS-Daten des Assets, je Bereich eine Liste.
      additionalProperties: false
    IngestBulkResult:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/IngestResult'
          description: Ein Ergebnis je Bündel, in der Reihenfolge der Anfrage.
        successCount:
          type: integer
        failedCount:
          type: integer
        isSuccess:
          type: boolean
          description: >-
            Die Liste wurde verarbeitet. Ob jedes Asset gespeichert wurde, steht
            in `results[].isSuccess`.
        errorMessage:
          type: string
          nullable: true
      additionalProperties: true
    AssetCore:
      type: object
      description: Stammangaben eines Assets beim Schreiben.
      required:
        - name
      properties:
        id:
          type: string
          format: uuid
          description: ID eines bekannten Assets, um gezielt dieses zu aktualisieren.
        schemaId:
          type: string
          format: uuid
          description: Typ des Assets.
        parentId:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 256
          description: Pflicht, auch beim Aktualisieren; wird immer übernommen.
        sourceType:
          type: string
          example: manual
        completenessLevel:
          type: integer
          format: int32
          minimum: 0
          maximum: 100
          description: >-
            Wie vollständig die Quelle ist; schützt vollständigere Datensätze.
            Ohne Angabe 0.
        organizationId:
          type: string
          format: uuid
        locationId:
          type: string
          format: uuid
        platformId:
          type: string
          format: uuid
        domainId:
          type: string
          format: uuid
        status:
          type: string
      additionalProperties: true
    EssentialsBundle:
      type: object
      description: Kurzansicht des Assets.
      properties:
        sections:
          type: object
          additionalProperties: true
          description: Abschnitte je Art (`quickinfo`, `statistics`).
      additionalProperties: false
    IngestResult:
      type: object
      description: Ergebnis für ein Bündel.
      properties:
        id:
          type: string
          format: uuid
          nullable: true
          description: ID des Assets.
        idPair:
          type: object
          properties:
            fakeId:
              type: string
              format: uuid
              description: Die `id` des Bündels.
            dbId:
              type: string
              format: uuid
              description: ID des Assets in Docusnap365.
        schemaId:
          type: string
          format: uuid
        isCreate:
          type: boolean
          description: '`true`, wenn das Asset angelegt wurde.'
        isSuccess:
          type: boolean
        errorMessage:
          type: string
          nullable: true
          description: >-
            Grund, wenn das Asset nicht gespeichert wurde – z. B. weil ein
            vollständigerer Datensatz geschützt ist.
      additionalProperties: true
    Problem:
      type: object
      description: Fehler nach RFC 9457.
      properties:
        type:
          type: string
          example: urn:ds365:error:unknown-path
        title:
          type: string
          example: Unknown field path
        status:
          type: integer
          example: 400
        detail:
          type: string
        instance:
          type: string
          example: /api/v1/assets/query
        errorCode:
          type: string
          description: Für die Anwendung gedacht.
          example: UNKNOWN_PATH
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              path:
                type: string
                description: >-
                  Stelle der Anfrage, etwa `filter`, `sort`, `select` oder ein
                  Parametername.
              data:
                type: object
                additionalProperties: true
        traceId:
          type: string
          description: Bei Rückfragen an den Support angeben.
  responses:
    BadRequest:
      description: >
        Ungültige Anfrage – Body nicht lesbar, Pflichtfeld fehlt, unbekanntes
        Feld (`UNKNOWN_PATH`), Wert passt nicht zum Feld
        (`FIELD_TYPE_MISMATCH`), Operator passt nicht (`UNSUPPORTED_OPERATOR`),
        `select`/`search` ist kein JSON-Array (`INVALID_FORMAT`), unbekannter
        Expand-Name (`VALIDATION_FAILED`), Cursor beschädigt (`INVALID_CURSOR`)
        oder abgelaufen (`CURSOR_EXPIRED`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Die Anfrage konnte keinem Benutzer zugeordnet werden (`UNAUTHORIZED`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: >
        API-Schlüssel fehlt oder trägt nicht den nötigen Zugriff (`FORBIDDEN`;
        `data.missingScopes` nennt, was fehlt) – oder der Cursor gehört einem
        anderen Benutzer oder Mandanten (`CURSOR_USER_MISMATCH`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    TooManyRequests:
      description: >
        Kontingent erschöpft (`REST_REQUEST_QUOTA_EXCEEDED`); die Anfrage wurde
        nicht ausgeführt und trotzdem gezählt.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Extra-Remaining:
          $ref: '#/components/headers/RateLimitExtraRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: urn:ds365:error:rest-request-quota-exceeded
            title: Request quota exceeded
            status: 429
            detail: >-
              The request quota of 10000 requests per period is exhausted until
              2026-10-17T09:52:44.0000000+00:00.
            instance: /api/v1/assets
            errorCode: REST_REQUEST_QUOTA_EXCEEDED
            errors:
              - code: REST_REQUEST_QUOTA_EXCEEDED
                data:
                  requestsLimit: 10000
                  requestsUsed: 10000
                  quotaResetAt: '2026-10-17T09:52:44+00:00'
            traceId: 00-…
    ServerError:
      description: >-
        Unerwarteter Fehler (`INTERNAL_ERROR`). Bei Rückfragen die `traceId`
        angeben.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    ServiceUnavailable:
      description: >
        Das Kontingent konnte nicht geprüft werden (`SERVICE_UNAVAILABLE`); die
        Anfrage wurde nicht ausgeführt. Später wiederholen.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  headers:
    RetryAfter:
      description: Beginn des nächsten Zeitraums als HTTP-Datum.
      schema:
        type: string
    RateLimitLimit:
      description: Im Zeitraum enthaltene Anfragen. Fehlt ohne Begrenzung.
      schema:
        type: integer
    RateLimitRemaining:
      description: Noch verfügbare Anfragen, enthaltene und zugekaufte zusammen.
      schema:
        type: integer
    RateLimitExtraRemaining:
      description: Davon noch verfügbares Zusatzkontingent.
      schema:
        type: integer
    RateLimitReset:
      description: Beginn des nächsten Zeitraums als Unix-Zeitstempel (Sekunden).
      schema:
        type: integer
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >
        API-Schlüssel aus Docusnap365 (*Verwaltung › Integrationen ›
        API-Schlüssel*). Lesende Endpunkte verlangen den Zugriff *Lesen*,
        schreibende *Lesen und Schreiben*.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.