> ## 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.

# Ein Asset lesen

> Liefert ein Asset über seine Id. Ein Wert, der keine GUID ist, passt nicht auf die Route und wird wie jede unbekannte Route beantwortet: 404 `NOT_FOUND` mit `detail` „No endpoint matches 'GET …'.“.

Braucht das Recht `api_read` (*Lesen*). Der Abfrageparameter `search` wird gelesen, hat auf dieser Operation aber keine Wirkung.




## OpenAPI

````yaml /api-reference/openapi.de.yaml get /asset/{id}
openapi: 3.0.3
info:
  title: Docusnap365 REST-API
  version: v1
  description: >
    Die öffentliche REST-API von Docusnap365 zum Lesen, Abfragen und Schreiben
    von Assets.


    **Ablauf einer Anfrage.** Jede Anfrage durchläuft diese Prüfungen in dieser
    Reihenfolge: den API-Schlüssel (401, wenn er fehlt oder ungültig ist), die
    Rechte des Schlüssels (403, wenn ihm das Recht für die Operation fehlt), das
    Anfrage-Kontingent (429, oder 503, wenn das Kontingent nicht geprüft werden
    kann), danach die Operation selbst. Die Rechte vergeben Sie beim Anlegen des
    API-Schlüssels unter *Verwaltung › Integrationen › API-Schlüssel*: *Lesen*
    (`api_read`) oder *Lesen und Schreiben* (`api_write`).


    **Anfrage-Kontingent.** Jeder Aufruf einer Operation zählt als eine Anfrage.
    Das Kontingent teilt sich die Subscription mit dem MCP-Server. Sobald eine
    Anfrage gezählt ist, begleiten die `X-RateLimit-*`-Kopfzeilen die Antwort,
    auch eine Fehlerantwort; eine Subscription ohne Obergrenze bekommt keine.


    **Fehler.** Fehler sind `application/problem+json` (RFC 9457) mit den
    Feldern `type`, `title`, `status`, `detail`, `instance`, `errorCode`,
    `traceId` und `errors`. `detail` darf nicht ausgewertet werden. Ausnahmen:
    Die Antwort 401 hat weder Körper noch Content-Type, auch wenn der
    API-Schlüssel fehlt. Und auf dem Schreibweg wird ein Fehler des
    Ingest-Dienstes unverändert zurückgegeben und trägt stattdessen
    `errorMessage`.
servers:
  - url: https://api.docusnap365.com/api/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Assets
    description: Einzelne Assets lesen und schreiben.
  - name: Query
    description: Assets mit Filter, Sortierung, Expands und seitenweiser Ausgabe abfragen.
paths:
  /asset/{id}:
    get:
      tags:
        - Assets
      summary: Ein Asset lesen
      description: >
        Liefert ein Asset über seine Id. Ein Wert, der keine GUID ist, passt
        nicht auf die Route und wird wie jede unbekannte Route beantwortet: 404
        `NOT_FOUND` mit `detail` „No endpoint matches 'GET …'.“.


        Braucht das Recht `api_read` (*Lesen*). Der Abfrageparameter `search`
        wird gelesen, hat auf dieser Operation aber keine Wirkung.
      operationId: getAssetById
      parameters:
        - name: id
          in: path
          required: true
          description: Die Id des Assets.
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/select'
      responses:
        '200':
          description: Das Asset.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Extra-Remaining:
              $ref: '#/components/headers/X-RateLimit-Extra-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetDto'
        '400':
          description: >-
            `select` ist kein JSON-Array aus Zeichenketten, oder ein Feld steht
            nicht zur Verfügung.
          x-error-codes:
            - INVALID_FORMAT
            - UNKNOWN_PATH
            - VALIDATION_FAILED
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenRead'
        '404':
          description: >-
            Kein Asset mit dieser Id, oder das Asset ist für den Benutzer nicht
            sichtbar.
          x-error-codes:
            - NOT_FOUND
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
              examples:
                Ein Asset, das es nicht gibt:
                  value:
                    type: urn:ds365:error:not-found
                    title: Not Found
                    status: 404
                    detail: >-
                      Asset '3f2504e0-4f89-11d3-9a0c-0305e82c3301' was not
                      found.
                    instance: /api/v1/asset/3f2504e0-4f89-11d3-9a0c-0305e82c3301
                    errorCode: NOT_FOUND
                    traceId: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
                    errors:
                      - code: NOT_FOUND
                        data:
                          entityType: asset
                          id: 3f2504e0-4f89-11d3-9a0c-0305e82c3301
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    select:
      name: select
      in: query
      required: false
      description: >-
        JSON-Array aus Zeichenketten mit den Feldern, die geliefert werden, zum
        Beispiel `["name","status"]`. Die Id wird immer mitgelesen. Ein anderer
        Wert wird mit 400 `INVALID_FORMAT` abgelehnt.
      schema:
        type: string
  headers:
    X-RateLimit-Limit:
      description: >-
        Enthaltene Anfragen je Kontingentperiode. Wird für eine Subscription
        ohne Obergrenze nicht gesendet.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: >-
        Noch verfügbare enthaltene und zusätzliche Anfragen der laufenden
        Periode.
      schema:
        type: integer
    X-RateLimit-Extra-Remaining:
      description: >-
        Noch verfügbare zusätzliche Anfragen. Sie werden mit der Periode nicht
        zurückgesetzt.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Beginn der nächsten Kontingentperiode als Unix-Zeit in Sekunden.
      schema:
        type: integer
        format: int64
    Retry-After:
      description: >-
        Beginn der nächsten Kontingentperiode als HTTP-Datum. Derselbe Zeitpunkt
        wie `X-RateLimit-Reset`.
      schema:
        type: string
  schemas:
    AssetDto:
      title: Asset
      type: object
      additionalProperties: true
      description: >
        Ein Asset. Mit `select` auf `POST /assets/query` enthält ein Element nur
        die gewählten Eigenschaften und die nach oben gezogenen Expands unter
        ihrem Namen (`object_data` als Objekt, die übrigen als Liste).
      properties:
        id:
          type: string
          format: uuid
        entityId:
          type: string
          format: uuid
          nullable: true
        schemaId:
          type: string
          format: uuid
          description: Der Typ des Assets.
        parentId:
          type: string
          format: uuid
          nullable: true
        name:
          type: string
        objectType:
          type: string
        type:
          type: string
        iconId:
          type: string
        sourceType:
          type: string
        organizationId:
          type: string
          format: uuid
          nullable: true
        locationId:
          type: string
          format: uuid
          nullable: true
        platformId:
          type: string
          format: uuid
          nullable: true
        domainId:
          type: string
          format: uuid
          nullable: true
        version:
          type: integer
          format: int32
        status:
          type: string
        isManually:
          type: boolean
        createdAt:
          type: string
          format: date-time
          nullable: true
        createdBy:
          type: string
          format: uuid
          nullable: true
        createdByDisplayName:
          type: string
        modifiedAt:
          type: string
          format: date-time
          nullable: true
        modifiedBy:
          type: string
          format: uuid
          nullable: true
        modifiedByDisplayName:
          type: string
        deletedAt:
          type: string
          format: date-time
          nullable: true
        deletedBy:
          type: string
          format: uuid
          nullable: true
        deletedByDisplayName:
          type: string
        expands:
          type: object
          nullable: true
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ExpandRow'
          description: >-
            Die Expands nach Namen. Nur in der vollständigen Form, nicht, wenn
            `select` sie nach oben gezogen hat.
    ProblemDetails:
      title: Problembeschreibung
      type: object
      description: >-
        Ein Fehler nach RFC 9457. `errors` ist nie leer; bei einem Fehler ist
        `errors[0].code` gleich `errorCode`.
      properties:
        type:
          type: string
          description: >-
            Ein URN, abgeleitet aus `errorCode`, zum Beispiel
            `urn:ds365:error:not-found`. Er lässt sich nicht auflösen.
        title:
          type: string
          description: Ein fester englischer Text je Code.
        status:
          type: integer
          description: Der HTTP-Statuscode.
        detail:
          type: string
          description: >-
            Ein technischer englischer Satz. Der Text kann sich ändern und soll
            nicht ausgewertet werden.
        instance:
          type: string
          description: Der Anfragepfad.
        errorCode:
          type: string
          description: >-
            Der Fehlercode. Die Codes einer Operation stehen in `x-error-codes`
            ihrer Antwort.
        traceId:
          type: string
          description: Die Trace-Id der Anfrage. Dem Support nennen.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ProblemErrorItem'
    ExpandRow:
      title: Expand-Zeile
      type: object
      additionalProperties: true
      description: >-
        Eine Zeile eines Expands. Spalten ohne Wert fehlen. JSON-Spalten
        (`data`) werden als JSON geliefert.
    ProblemErrorItem:
      title: Fehlerelement
      type: object
      required:
        - code
      properties:
        code:
          type: string
          description: Der besondere Code dieses Elements.
        path:
          type: string
          description: >-
            Das Feld oder der Parameter, den der Fehler betrifft. Fehlt, wenn er
            die ganze Anfrage betrifft.
        data:
          type: object
          additionalProperties: true
          description: >-
            Weitere Werte, zum Beispiel `entityType` und `id` eines fehlenden
            Assets oder `missingScopes`. Fehlt, wenn leer.
  responses:
    Unauthorized:
      description: Der API-Schlüssel fehlt oder ist ungültig.
      x-error-codes:
        - UNAUTHORIZED
    ForbiddenRead:
      description: >-
        Dem Schlüssel fehlt das Recht `api_read` (*Lesen*), oder die
        Berechtigungsschicht der Datenbank hat den Zugriff verweigert.
      x-error-codes:
        - FORBIDDEN
        - PERMISSION_DENIED
        - MODULE_NOT_IN_EDITION
        - TENANT_FROZEN
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          examples:
            Ein Schlüssel ohne das nötige Recht:
              value:
                type: urn:ds365:error:forbidden
                title: Forbidden
                status: 403
                detail: 'Missing required scopes: api_read'
                instance: /api/v1/assets
                errorCode: FORBIDDEN
                traceId: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
                errors:
                  - code: FORBIDDEN
                    data:
                      missingScopes:
                        - api_read
    TooManyRequests:
      description: >-
        Das Anfrage-Kontingent der Subscription ist aufgebraucht, enthaltene und
        zusätzliche Anfragen gleichermaßen. Wiederholen nach dem Zeitpunkt in
        `Retry-After`. Auch eine abgelehnte Anfrage wird gezählt.
      x-error-codes:
        - REST_REQUEST_QUOTA_EXCEEDED
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Extra-Remaining:
          $ref: '#/components/headers/X-RateLimit-Extra-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          examples:
            Das Kontingent ist aufgebraucht:
              value:
                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-12-01T00:00:00.0000000+00:00.
                instance: /api/v1/assets
                errorCode: REST_REQUEST_QUOTA_EXCEEDED
                traceId: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
                errors:
                  - code: REST_REQUEST_QUOTA_EXCEEDED
                    data:
                      requestsLimit: 10000
                      requestsUsed: 10000
                      quotaResetAt: '2026-12-01T00:00:00+00:00'
    InternalError:
      description: >-
        Ein unerwarteter Fehler. `detail` ist ein fester Satz; bei einer Meldung
        die `traceId` angeben.
      x-error-codes:
        - INTERNAL_ERROR
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    ServiceUnavailable:
      description: >-
        Das Kontingent konnte nicht geprüft werden und die Anfrage wurde deshalb
        nicht bedient, oder die Datenbank ist vorübergehend ausgefallen. Ein
        erneuter Versuch kann gelingen.
      x-error-codes:
        - SERVICE_UNAVAILABLE
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Der API-Schlüssel der Subscription. Jede Operation nennt in
        `x-pat-scopes` das Recht, das sie braucht: `api_read` (in der Oberfläche
        *Lesen*) oder `api_write` (*Lesen und Schreiben*). Der Schlüssel wird
        unter *Verwaltung › Integrationen › API-Schlüssel* angelegt.

````

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