Skip to content

TypeScript API / contentia/assets/api / buildAssetsApi

Function: buildAssetsApi() ​

ts
function buildAssetsApi(options): AssetsApi;

Build a JSON:API handler for the assets repository.

The handler requires an access policy (authorize), which runs before every action except GET /. It authenticates no one itself: validate credentials inside the policy, or mount the handler behind contentia/server/api, which checks a Bearer token first.

Parameters ​

ParameterType
optionsAssetsApiOptions

Returns ​

AssetsApi