NAV
shell

Introduction

Welcome to the REST API of the Digitalwerk Store. You can use this API to access the Digitalwerk Store without user interaction. This API is the right thing for you if you want to automate worflows e.g. publish your ADTF plugins using a deployment script or you want to search and download ADTF components programmatically.

You can view code examples for all API methods in the dark area to the right. The examples are CURL commands executed in a Windows command line interpreter but should also run on any unix systems with CURL installed.

Authentication

Set the HTTP Authorization header with a Bearer prefix before the access token.

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>"

In order to access the API you need a Digitalwerk account (sign up). After signing up go to the Digitalwerk Store, log in and open your user profile (a link in the top right area), there you will find your access token which you need to supply on all API requests. The API enpoint expects an HTTP header with the name Authorization and a value of Bearer <YOUR ACCESS TOKEN>

Platform

Identifies the combination of operating system and hardware architecture ADTF is compiled for. When searching for Components you need to specify the ID of the platform you want to run your ADTF system on.

Listing

Request (Windows):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  "https://digitalwerk.store/api/v1/platforms.json"

Request (Linux):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  "https://digitalwerk.store/api/v1/platforms.json"

Response:

{
  "data":
  [
    {
      "id": 1,
      "name": "win64_vc141"
    },
    {
      "id": 2,
      "name": "linux64"
    },
    {
      "id": 3,
      "name": "linux_aarch64"
    }
  ]
}

In order to find out which platforms are available you can use this API method.

HTTP Request

GET https://digitalwerk.store/api/v1/platforms.json

This endpoint retrieves all platforms.

ADTF Version

Released ADTF versions, plugins may have been created with. Supplying the ID of an ADTF version as a search parameter returns only Components which are compatible with the given ADTF version.

Listing

Request (Windows):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  "https://digitalwerk.store/api/v1/adtf_versions.json"

Request (Linux):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  "https://digitalwerk.store/api/v1/adtf_versions.json"

Response:

{
  "data":
  [
    {
      "id": 1,
      "major": 3,
      "minor": 9,
      "patch": 0
    },
    {
      "id": 2,
      "major": 3,
      "minor": 9,
      "patch": 1
    }
  ]
}

If you want to find out which ADTF version are available you can use this API method.

HTTP Request

GET https://digitalwerk.store/api/v1/adtf_versions.json

This endpoint retrieves all ADTF versions.

Create

Request (Windows):

# You can also specify a file containing the JSON object using the `-d @/tmp/file.json` syntax.
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  -H "Content-Type: application/json" ^
  -d "{\"adtf_version\": {\"major\": \"4\", \"minor\": \"0\", \"patch\": \"0\"}}" ^
  https://digitalwerk.store/api/v1/adtf_versions.json

Request (Linux):

# You can also specify a file containing the JSON object using the `-d @/tmp/file.json` syntax.
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"adtf_version": {"major": "4", "minor": "0", "patch": "0"}}' \
  https://digitalwerk.store/api/v1/adtf_versions.json

Response:

{
  "data":
  {
    "id": 26,
    "major": 4,
    "minor": 0,
    "patch": 0
  }
}

If you are entitled to create a new ADTF version you can use this API method.

HTTP Request

POST https://digitalwerk.store/api/v1/adtf_versions.json

The payload of the POST request must be a JSON object. Please make sure to set the Content-Type header to: application/json otherwise the request won't be accepted.

Parameters

Parameter Type Mandatory Description
major Integer Yes The first part of the version
minor Integer Yes The second part of the version
patch Integer Yes The third part of the version

Component Type

Each Component has a certain type which can be one of these: Filter, Service, Streaming-Source or Streaming-Sink. For more details have a look at the ADTF Guides especially the section Master the SDK. If you know in advance what component type you are looking for, you can supply the ID of the component type as a search parameter.

Listing

Request (Windows):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  "https://digitalwerk.store/api/v1/component_types.json"

Request (Linux):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  "https://digitalwerk.store/api/v1/component_types.json"

Response:

{
  "data":
  [
    {
      "id": 1,
      "name": "Filter"
    },
    {
      "id": 2,
      "name": "Service"
    },
    {
      "id": 3,
      "name": "Streaming-Source"
    },
    {
      "id": 4,
      "name": "Streaming-Sink"
    }
  ]
}

If you want to find out which component types are available you can use this API method.

HTTP Request

GET https://digitalwerk.store/api/v1/component_types.json

This endpoint retrieves all component types.

Component

Components are what you can search for inside the Digitalwerk Store. A Component in the sense of ADTF is either a Streaming-Source, a Filter, a Streaming-Sink or a Service. They represent the basic building blocks of a session inside the ADTF Configuration Editor. Components are always part of a Plugin.

List

Request (Windows):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  "https://digitalwerk.store/api/v1/components.json?platform_id=1&search_term=Qt3D"

Request (Linux):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  "https://digitalwerk.store/api/v1/components.json?platform_id=1&search_term=Qt3D"

Response:

{
  "data":
  [
    {
      "id": 2,
      "name": "Qt3D Billboard",
      "class_id": "billboard.qt3d.cid",
      "description": "This streaming source helps to...",
      "component_type_id": 1,
      "plugin_id": 42,
      "plugin_name": "3DDisplay Plugin",
      "plugin_version": "0.0.2"
    },
    {
      "id": 1,
      "name": "Qt3D Display",
      "class_id": "qt3d_display.qt3d.cid",
      "description": "The Qt3DDisplay class loads the corresponding main QML file...",
      "component_type_id": 1,
      "plugin_id": 42,
      "plugin_name": "3DDisplay Plugin",
      "plugin_version": "0.0.2"
    }
  ],
  "links":
    {
      "first":"https://digitalwerk.store/api/v1/components.json?platform_id=1&search_term=Qt3D&page=1",
      "last":"https://digitalwerk.store/api/v1/components.json?platform_id=1&search_term=Qt3D&page=5",
      "prev":"https://digitalwerk.store/api/v1/components.json?platform_id=1&search_term=Qt3D&page=1",
      "next":"https://digitalwerk.store/api/v1/components.json?platform_id=1&search_term=Qt3D&page=3"
    }
}

List all components for the given platform. Filter by component type if desired and show only compatible components when an ADTF version is given. A search term can be matched against the components name. Twenty items are displayed per page. Use the next link to get the next page. The list contains only the newest version of every component. The list will be sorted by name in ascedning order.

HTTP Request

GET https://digitalwerk.store/api/v1/components.json?platform_id=<ID>

URL Parameters

Parameter Mandatory Description
platform_id Yes The ID of the platform to narrow the search
search_term No The pattern to search for, the search in case insensitive
adtf_version_id No Return only components compatible with the chosen ADTF version
component_type_id No Return components of this type only
page No Generated by the server if paging is required (see JSON links object). The specific page of the search result you want to receive

Plugin

Plugins contain one or more components. Once downloaded and extracted you can use these new components within the ADTF Configuration Editor.

Show

Request (Windows):

# Make sure to use -L to follow redirects
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  "https://digitalwerk.store/api/v1/plugins/1.json"

Request (Linux):

# Make sure to use -L to follow redirects
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  "https://digitalwerk.store/api/v1/plugins/1.json"

Response:

{
  "data":
    {
      "name": "3DDisplay Plugin",
      "version_major": 0,
      "version_minor": 0,
      "version_patch": 1,
      "downloads": 23,
      "state": "verified",
      "project_url": "",
      "issue_tracker_url": "",
      "support_email": "",
      "contains_debug_binary": true,
      "sha256": "0d86b9872714c0e2aef425432764cf0594d9b3d670f2a7e8cb0e92ae2d274e51",
      "company_id": null,
      "adtf_version_id": 10,
      "platform_id": 1,
      "created_at": "2020-10-06T13:10:31.265Z"
  }
}

Show details for the given plugin ID.

HTTP Request

GET https://digitalwerk.store/api/v1/plugins/<ID>.json

Download

Request (Windows):

# Make sure to use -L to follow redirects
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  -L -o "C:/tmp/adtf_plugin.zip" ^
  "https://digitalwerk.store/api/v1/plugins/1/download.json"

Request (Linux):

# Make sure to use -L to follow redirects
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  -L -o "C:/tmp/adtf_plugin.zip" \
  "https://digitalwerk.store/api/v1/plugins/1/download.json"

Response:

the plugin as a Zip file

Downloads the plugin with the given ID.

HTTP Request

GET https://digitalwerk.store/api/v1/plugins/<ID>/download.json

Make sure that the request follows redirects and the result is saved to a file which has a .zip ending.

Upload

Request (Windows):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  -F "plugin[zip_file]=@C:/path/to/plugin.zip" ^
  -F "plugin[group_id]=<GROUP ID>" ^
  "https://digitalwerk.store/api/v1/plugins.json"

Request (Linux):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  -F "plugin[zip_file]=@/path/to/plugin.zip" \
  -F "plugin[group_id]=<GROUP ID>" \
  "https://digitalwerk.store/api/v1/plugins.json"

Response:

the JSON representaion of the created ADTF plugin

Upload a ZIP file representing an ADTF plugin.

HTTP Request

POST https://digitalwerk.store/api/v1/plugins.json

Parameters

Parameter Type Mandatory Description
plugin[zip_file] String Yes The path to the ZIP file
plugin[group_id] Integer Yes The group to be assigned

Remote Files

The Digitalwerk Store offers also a general download section where you can get the lastest ADTF releases.

Listing

Request (Windows):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  "https://digitalwerk.store/api/v1/remote_files.json"

Request (Linux):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  "https://digitalwerk.store/api/v1/remote_files.json"

Response:

{
  "data": 
  [
    {
      "checksum": "be9dcbcc2441ee249d122fdf7b9139c14516ea4c8623b9446b7957f17a0edda1",
      "download_link": "https://artifactory.digitalwerk.net:443/artifactory/Product-Releases/ADTF/3.9.0/Linux/armv8/gcc/5.4/ADTF-3.9.0.tgz",
      "id": 14,
      "platform": "Linux ARM",
      "product_name": "ADTF",
      "release_date": "2021-01-28T09:11:00.000Z",
      "size": 1503237784,
      "version": "3.9.0"
    }
  ]
}

If you want to find out which downloads are available you can use this API method.

HTTP Request

GET https://digitalwerk.store/api/v1/remote_files.json

This endpoint retrieves all downloads.

Create

If you are entitled to create a new download you can use this API method.

Request (Windows):

# You can also specify a file containing the JSON object using the `-d @/tmp/file.json` syntax.
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  -H "Content-Type: application/json" ^
  -d "{\"remote_file\": {\"product_name\": \"ADTF\", \"version\": \"3.10.0\", \"platform\": \"Windows x64\", \"release_date\": \"2021-01-28T10:05:00.000Z\", \"download_link\": \"https://artifactory.digitalwerk.net:443/artifactory/Product-Releases/ADTF/3.10.0/Windows/x86_64/VisualStudio/15/ADTF-3.10.0.zip\", \"size\": \"1964946532\", \"checksum\": \"652c08883aec8926b67b71d4e3d709b78d1a8a74a586d08e9cd1ad2642ab09b2\"}}" ^
  https://digitalwerk.store/api/v1/remote_files.json

Request (Linux):

# You can also specify a file containing the JSON object using the `-d @/tmp/file.json` syntax.
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"remote_file": {"product_name": "ADTF", "version": "3.10.0", "platform": "Windows x64", "release_date": "2021-01-28T10:05:00.000Z", "download_link": "https://artifactory.digitalwerk.net:443/artifactory/Product-Releases/ADTF/3.10.0/Windows/x86_64/VisualStudio/15/ADTF-3.10.0.zip", "size": "1964946532", "checksum": "652c08883aec8926b67b71d4e3d709b78d1a8a74a586d08e9cd1ad2642ab09b2"}}' \
  https://digitalwerk.store/api/v1/remote_files.json

Response:

{
  "data":
  {
    "id": 30,
    "product_name": "ADTF",
    "version": "3.6.10",
    "platform": "Linux x64",
    "download_link": "https://artifactory.digitalwerk.net:443/artifactory/Product-Releases/ADTF/3.10.0/Windows/x86_64/VisualStudio/15/ADTF-3.10.0.zip",
    "release_date": "2021-01-28T10:05:00.000Z",
    "size": 1964946532,
    "checksum": "652c08883aec8926b67b71d4e3d709b78d1a8a74a586d08e9cd1ad2642ab09b2"

  }
}

HTTP Request

POST https://digitalwerk.store/api/v1/remote_files.json

The payload of the POST request must be a JSON object. Please make sure to set the Content-Type header to: application/json otherwise the request won't be accepted.

Parameters

Parameter Type Mandatory Description
product_name String Yes
version String Yes
platform String Yes
download_link String Yes
release_date DateTime Yes
size Integer Yes The size of the file in bytes
checksum String Yes SHA-256 checksum

User

This endpoint gives you more information about your user.

Groups

Request (Windows):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" ^
  "https://digitalwerk.store/api/v1/users/groups.json"

Request (Linux):

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" \
  "https://digitalwerk.store/api/v1/users/groups.json"

Response:

{
  "data":
  [
      {
          "id": 1,
          "name": "Public"
      },
      {
          "id": 2,
          "name": "Company Members"
      },
      {
          "id": 3,
          "name": "AADC"
      }
  ]
}

This endpoint retrieves all groups of the current user. When you upload a plugin you have to choose who can see your plugin. This is accomplished by assigning a certain group to your plugin. To do so you must know the available group IDs which you can retrieve with this query.

HTTP Request

GET https://digitalwerk.store/api/v1/users/groups.json

Errors

The Digitalwerk Store API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your access key is wrong.
403 Forbidden -- You are not allowed to access this resource.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access a resource with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The resource requested has been removed from our servers.
422 Failed -- Unprocessable Entity response status code indicates it was unable to process the contained instruction
429 Too Many Requests -- You're requesting too many resource! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.