Assets API
This reference describes the Instruqt Assets API and helps you get started.
The Instruqt Assets API lets you store track specific files on the platform - assets. Assets API is HTTP based and in order to consume it you must have a valid authentication token(will be referred as token on this page).
The API supports uploading, fetching and getting information about your asset.
HTTP Method: POST
URL:
https://play.instruqt.com/assets/tracks/
track_id
- track_id - id of a track asset belongs to
Name | Value |
---|---|
Authorization | Bearer token |
Asset MD5 hash value encoded to string will be returned in response body.
HTTP Method: GET
URL:
https://play.instruqt.com/assets/tracks/
track_id
/
asset_hash
- track_id - id of a track asset belongs to
Name | Value |
---|---|
Authorization | Bearer token |
Asset will be returned in response body as a binary stream.
Response headers
Name | Value |
---|---|
Content-Length | Size of a requested asset in bytes |
Content-Type | Content-type of an asset, f.e. image/png |
HTTP Method: HEAD
URL:
https://play.instruqt.com/assets/tracks/
track_id
/
asset_hash
- track_id - id of a track asset belongs to
Empty
Name | Value |
---|---|
Content-Length | Size of a requested asset in bytes |
Code | Meaning |
---|---|
200 | Request was successful |
404 | Requested asset not found |
500 | Internal Instruqt error or error in the underlying storage. |
You can refer to an uploaded asset inside a markdown using the same URL which is used to fetch an uploaded asset
https://play.instruqt.com/assets/tracks/
track_id
/
asset_hash
This example embeds an image in the
assignment.md
sidebar text. This is useful for showing a screenshot or other image to your learner as part of the challenge instructions:YAML/Markdown
---
slug: my-challenge
id: un6vygpcp3mj
type: challenge
title: My Challenge
tabs:
- title: Google tab
type: website
url: https://google.com
difficulty: basic
timelimit: 600
---
Hello there, assets!

Last modified 11mo ago