Antylogic
DemoApp login

399 operational guides

Docs sections
DocsDocumentation
Device

Serve a Docs asset

Check that a documentation image or video is delivered as a static file from Docs. The URL can be public or authenticated and points to an existing file under the configured assets root; the correct response is the resource binary, not business JSON.

In this article

Use this guide when you need to validate that a resource published in the documentation loads from `/api/public/docs/assets/{path}` or from `/api/app/docs/assets/{path}`.

The media variant is decided when the article is queried with `locale`, `platform` and `theme`; the direct asset download depends only on the path that appears after `/assets/`.

Before you start

  • The Docs routes are registered in the Antylogic backend.
  • The requested file exists under `DOCS_ASSETS_PATH`, `DocsRoutesConfig.AssetsPath` or the default assets directory.
  • For `/api/app/docs/assets/{path}` there is a valid session; `/api/public/docs/assets/{path}` does not require signing in.
  • The URL is usually obtained from `article.media[].src` in the documentation article detail.

Instructions

  1. 1.

    Locate the resource URL in the article

    Open or query the article that contains the image or video. In `media.src`, Antylogic will already have applied the right prefix and the platform and theme variant, for example `/api/public/docs/assets/iphone/light/en/...` for a public query on mobile with the light theme.

  2. 2.

    Open the public asset if it needs no session

    Use the public URL to confirm that the published resource is available without authentication. A current example is `/api/public/docs/assets/iphone/light/en/auth-native-login/auth-native-login-validation-clip.mp4`; it must display or download as a video, with no application page and no business JSON.

  3. 3.

    Validate the authenticated route from the app

    In the app, with the Harbor Demo User session active in Harbor Demo Group, `DocumentationPage` requests the media with the `/api/app/docs/assets/...` prefix. If the cookie or token is missing, the request is rejected before it reaches the Docs service.

  4. 4.

    Interpret publication errors

    If the asset does not load, review the segment after `/assets/`. `400` points to an invalid path or blocked traversal, `404` to a missing file, a directory or an empty path, `405` to a method not allowed and `503` to Docs not being configured.

Validations and limits

  • `media.src` starts with `/api/public/docs/assets/` or `/api/app/docs/assets/`.
  • The direct asset download does not change when `locale`, `platform`, `device`, `theme` or `q` are added.
  • The endpoint accepts `GET` and also `HEAD`, even though the wiki mainly documents `GET` for assets.
  • The public route can expose any file placed under the configured assets root; that root must not contain non-publishable material.
  • The authenticated route only adds general session authentication, with no granular permissions per organisation, location or role.
  • The endpoint can serve existing files even when they are not referenced by `articles.json`.

Expected result

The operator confirms that the documentation resolves a valid asset URL and that the backend serves the static file from the corresponding public or authenticated route.

Related articles