Skip to main content
The CDN API lets you upload image and media assets that are then referenced by key in other resources such as tracks, cars, simulators, and brands. The upload endpoint accepts a multipart/form-data request with two parts: a JSON metadata object (cdnRequest) and the binary file (cdnFile). The file is stored under a path derived from the type and targetName you provide.
This endpoint requires a CRUD+ role. You must include your X-API-Key header.

Upload an asset

Uploads a file to the CDN. Returns the string "Success" on success or "Failed" if the upload could not be completed.
The request must use Content-Type: multipart/form-data with two named parts: cdnRequest fields
string
required
Asset category. Controls which directory the file is stored under. Must be one of the CdnType enum values — see the table below.
string
required
Filename to use on the CDN (must not be blank). The stored path is {type}/{targetName} — for example TRACK/nurburgring-gp-map.svg. This combined path is what you supply as the logo, trackMap, or similar field in other API calls.

CdnType values

Responses


Example request

The example below uploads an SVG track map. After a successful upload, you can reference it as TRACK/nurburgring-gp-map.svg in the trackMap field when creating or updating a track layout.
cURL
Response — success
201
Response — failure
400

Asset key format

Once uploaded, an asset is referenced throughout the API by combining the type and targetName with a / separator:
For example: Supply this combined key in the relevant field (logo, trackMap, trackImages, logoWide, etc.) when creating or updating any resource that references a CDN asset.