Skip to content

DAM Developer Overview

In this article we will look at DAM from a developers perspective and provide you with the overview and references you need to get started.

Before getting started

In this concept article you can find an overview of DAM, delving into its fundamental concepts and detailing its key features. If you haven't already, we highly recommend reading it.

You should also review our versioning strategy to understand how we manage releases. Additionally, you may find it helpful to read about our approach to software development at Bizzkit.

API overview

DAM is composed of a REST API that includes endpoints concerning files, folders, attributes, predefined settings, and so forth. For a complete list of endpoints and models, refer to the Swagger API documentation.

Swagger API reference

Notable endpoints

Below is a table highlighting some of the most notable endpoints:

Endpoint Method Summary
/api/{culture}/attributes GET Gets all MediaBank Attributes.
/api/{culture}/attributes-values/search POST Search for attribute values for a list of files. Only found fileIds are returned.
/api/_/cultures GET List content cultures.
/api/{culture}/files/search POST Queries the file index for files.
/api/{culture}/files/{fileId} PUT Update the master data for the given file.
/api/{culture}/files/{fileId}/location PUT Moves a file from its current folder to another folder.
/api/{culture}/folders POST Creates a folder.
/api/{culture}/folders DELETE Deletes specified folders.
/api/{culture}/folders/root GET Gets the id of the single root folder that exists.
/api/{culture}/folders/{folderId} DELETE Deletes a folder and its subtree (subfolders and/or files) along with every information relating to it.
/api/{culture}/folders/{folderId}/children GET Returns the sub folders of a given folder.
/api/{culture}/folders/{folderId}/files/{sortOptions} GET Returns the files of a given folder.
/api/_/settings/cdn GET Get image transformation CDN settings.
/api/_/test/echo GET Returns the passed string and the given API version specified back to the caller.
/api/_/transformation-functions GET List transformation functions stored in the system.
/api/_/transformation-functions POST Creates a new Transformation function.
/api/_/webhooks/{eventType} POST Creates a subscription to an event.

This is just a brief highlight—please refer to the full Swagger API reference for the complete specification.

Preview API

The API also provides a preview version where new functionality can be tested. However, be aware that this preview version may include features that are still under development and subject to change. As such, it is not recommended for use in production environments. Use it primarily for testing and providing feedback on upcoming features. Read more here.

Using the API

Given a valid authentication token here is an example of calling the Test-endpoint:

curl -X GET https://myenv-damapi.bizzkit.biz/api/_/test/echo?echoString=Hello `
-H "Authorization: Bearer ..." `

Replace the URL with the URL to your environment and replace ... with the authtoken from the example mentioned above.

1
2
3
4
5
# authtoken defined and initialized previously
@api = https://myenv-damapi.bizzkit.biz

GET {{api}}/api/_/test/echo?echoString=Hello HTTP/1.1
Authorization: Bearer {{authtoken}} 

Replace the URL with the URL to your environment.

Using the Bizzkit .NET SDK

For easy integration with Microsoft .NET, Bizzkit offers SDK packages. These packages include auto-generated Swagger clients and a factory class to simplify authentication. They automate token renewal and provide type-safe methods for the API endpoints.

All SDK package names start with the prefix Bizzkit.Sdk., and the SDK packages incorporate the following elements:

  • A client factory
  • A dedicated client
  • Options to configure the client factory

Info

Preview versions are identified as Bizzkit.Sdk.[product].Preview, such as Bizzkit.Sdk.Iam.Preview or Bizzkit.Sdk.Pim.Preview.

To access the Bizzkit NuGet packages in your preferred development environment, you need to reference the Bizzkit Partner feed. You can, for example, do this by adding a nuget.config file to your project with the following configuration:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
    <add key="bizzkit-partner" value="https://pkgs.dev.azure.com/bizzkit-platform/7dad82b4-f2ae-4a3a-ab87-3fc791e4ea62/_packaging/bizzkit-partner-feed/nuget/v3/index.json" />
  </packageSources>
  <packageSourceMapping>
    <packageSource key="nuget">
      <package pattern="*" />
    </packageSource>
    <packageSource key="bizzkit-partner">
      <package pattern="Bizzkit*" />
    </packageSource>
  </packageSourceMapping>
</configuration>

This configuration clears existing package sources and adds the Bizzkit Partner feed alongside the official NuGet source.

Once the feed is configured, you can install the required NuGet package using the following command:

dotnet add package Bizzkit.Sdk.Dam

To simplify the authentication process, all NuGet packages associated with Bizzkit applications come with a factory class. This class streamlines the creation of an authenticated Swagger-generated client.

Example

using Bizzkit.Sdk.Dam;

var factory = new DamClientFactory(new DamConnectionOptions
{
    BaseUrl = "https://myenv-damapi.bizzkit.biz",
    Authority = "https://myenv-auth.bizzkit.biz",
    ClientId = "BizzkitClient",
    ClientSecret = "BizzkitSecret",
    Scope = "damapi/"
});

var client = await factory.CreateAuthenticatedClientAsync();

As noted earlier, the SDK client is mainly an auto-generated client based on the OpenAPI interface, meaning all methods map directly to the API.

Below is an example of calling the Test endpoint using the SDK client (with the factory and client already created):

var test = await client.Test_EchoAsync("Hello");
Console.WriteLine(test);

Warning

Please keep in mind that all examples provided are for illustrative purposes only. They are not intended to represent best practices and should not be used in production without a thorough code review.

Transformation functions

Transformation functions allow you to serve different versions of original images, like thumbnails. You can create transformation functions via the API or through BAIA.

To construct a CDN URL, you'll need:

For more details, visit this guide.

Events

During normal operation, DAM emits certain kinds of events that are used internally to perform a range of operations but can also be used externally to build a tight integration. The way these events can be consumed is through web hooks. Please refer to this article for more information.

Job runner

DAM includes a job runner, facilitated by Hangfire, which is used for caching, transformations, clean-up and so on. You can access the Hangfire UI via Settings -> Background Services within the user interface. Please refer to this article for more information.

File chooser

The DAM system acts as a file provider for external systems. To use a file, the external system must save a reference to it, which is created when a user selects a file through the DAM interface. This file selection occurs by opening the DAM UI in "chooser mode." For detailed technical instructions on implementing such a file chooser in your external system, please refer to Implement a file chooser and File picking.