Assets¶
Retrieve public asset metadata and available formats. List results use the PagedAssetSchema wrapper; a single asset uses AssetSchema.
Examples¶
These examples request animal assets. All query values should be URL-encoded when supplied dynamically. Browser fetching depends on API CORS configuration.
<?php
$url = 'https://galleryapi.dabbble.app/v1/assets?pageSize=20&category=ANIMALS&orderBy=NEWEST';
$headers = "Accept: application/json\r\n";
$context = stream_context_create(['http' => [
'timeout' => 20, 'header' => $headers
]]);
$body = @file_get_contents($url, false, $context);
if ($body === false) { exit('API request failed.'); }
$data = json_decode($body, true);
if (!is_array($data)) { exit('Invalid JSON response.'); }
echo '<pre>' . htmlspecialchars(json_encode($data, JSON_PRETTY_PRINT),
ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</pre>';
?>
// Save as example.mjs and run: node example.mjs
async function main() {
const response = await fetch('https://galleryapi.dabbble.app/v1/assets?pageSize=20&category=ANIMALS&orderBy=NEWEST', {
headers: { Accept: 'application/json' },
signal: AbortSignal.timeout(20000)
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
}
main().catch(error => { console.error(error.message); process.exitCode = 1; });
<pre id="results">Loading…</pre>
<script type="module">
const output = document.getElementById('results');
try {
const response = await fetch('https://galleryapi.dabbble.app/v1/assets?pageSize=20&category=ANIMALS&orderBy=NEWEST');
if (!response.ok) throw new Error(`HTTP ${response.status}`);
output.textContent = JSON.stringify(await response.json(), null, 2);
} catch (error) {
output.textContent = 'Unable to load data.';
console.error(error);
}
</script>
import json
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
headers = {'Accept': 'application/json'}
request = Request('https://galleryapi.dabbble.app/v1/assets?pageSize=20&category=ANIMALS&orderBy=NEWEST', headers=headers)
try:
with urlopen(request, timeout=20) as response:
data = json.load(response)
print(json.dumps(data, indent=2))
except (HTTPError, URLError, TimeoutError, ValueError) as error:
print(f'API request failed: {error}')
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(20) };
client.DefaultRequestHeaders.Accept.ParseAdd("application/json");
try
{
using var response = await client.GetAsync("https://galleryapi.dabbble.app/v1/assets?pageSize=20&category=ANIMALS&orderBy=NEWEST");
response.EnsureSuccessStatusCode();
using var document = JsonDocument.Parse(await response.Content.ReadAsStringAsync());
Console.WriteLine(document.RootElement);
}
catch (Exception error) when (error is HttpRequestException
or TaskCanceledException or JsonException)
{
Console.Error.WriteLine(error.Message);
}
Endpoint Reference¶
Path parameter asset_url is a string. The specification does not establish whether it expects a slug, identifier or full URL. Confirm the deployment's accepted value and encode it as a path component.
Query arrays have no explicit serialization override; OpenAPI's normal query-array representation uses repeated keys, such as format=GLTF2&format=OBJ. Check deployment behaviour when combining filters.
GET /v1/assets/{asset_url}¶
Get Asset
Authentication: No security requirement declared.
| Parameter | Location | Type | Required | Details |
|---|---|---|---|---|
asset_url | path | string | Yes |
| Status | Description | Response schema |
|---|---|---|
200 | OK | AssetSchema |
GET /v1/assets¶
Get Assets
Authentication: No security requirement declared.
| Parameter | Location | Type | Required | Details |
|---|---|---|---|---|
orderBy | query | FilterOrder or null | No | |
category | query | FilterCategory or null | No | |
curated | query | boolean or null | No | |
format | query | array of FilterFormat or null | No | Filter by format |
keywords | query | string or null | No | |
name | query | string or null | No | |
description | query | string or null | No | |
tag | query | array of string | No | |
triangleCountMin | query | integer or null | No | |
triangleCountMax | query | integer or null | No | |
maxComplexity | query | FilterComplexity or null | No | |
zipArchiveUrl | query | string or null | No | |
inCollection | query | boolean or null | No | |
authorName | query | string or null | No | |
authorId | query | string or null | No | |
license | query | FilterLicense or null | No | |
pageToken | query | string or null | No | |
pageSize | query | string or null | No |
| Status | Description | Response schema |
|---|---|---|
200 | OK | PagedAssetSchema |
Filter Values¶
Use the exact enum spelling. The schema declares negative-prefixed format values but does not describe their semantics. Likewise, it does not explain every sorting option or which lists they meaningfully apply to.
FilterCategory¶
MISCELLANEOUS, ANIMALS, ARCHITECTURE, ART, CULTURE, EVENTS, FOOD, HISTORY, HOME, NATURE, OBJECTS, PEOPLE, PLACES, SCIENCE, SPORTS, TECH, TRANSPORT, TRAVEL, ""
FilterComplexity¶
COMPLEX, MEDIUM, SIMPLE
FilterFormat¶
TILT, BLOCKS, GLTF, GLTF1, GLTF2, OBJ, FBX, VOX, -TILT, -BLOCKS, -GLTF, -GLTF1, -GLTF2, -OBJ, -FBX, -VOX
FilterLicense¶
REMIXABLE, ALL_CC, CREATIVE_COMMONS_BY_3_0, CREATIVE_COMMONS_BY_ND_3_0, CREATIVE_COMMONS_BY_4_0, CREATIVE_COMMONS_BY_ND_4_0, CREATIVE_COMMONS_BY, CREATIVE_COMMONS_BY_ND, CREATIVE_COMMONS_0
FilterOrder¶
NEWEST, OLDEST, BEST, CREATE_TIME, -CREATE_TIME, UPDATE_TIME, -UPDATE_TIME, TRIANGLE_COUNT, -TRIANGLE_COUNT, LIKED_TIME, -LIKED_TIME, LIKES, -LIKES, DOWNLOADS, -DOWNLOADS, DISPLAY_NAME, -DISPLAY_NAME, AUTHOR_NAME, -AUTHOR_NAME
Response Schemas¶
Required fields and nullable fields are different: a required field can still accept null. Nested download metadata is documented in Files & Formats.
PagedAssetSchema¶
| Field | Type | Required | Details |
|---|---|---|---|
assets | array of AssetSchema | Yes | |
totalSize | integer | Yes | |
nextPageToken | string or null | No |
AssetSchema¶
| Field | Type | Required | Details |
|---|---|---|---|
authorId | string or null | No | |
authorName | string | Yes | |
name | string | Yes | |
description | string or null | Yes | |
createTime | string (date-time) | Yes | |
updateTime | string (date-time) or null | Yes | |
url | string or null | Yes | |
assetId | string | Yes | |
displayName | string or null | Yes | |
visibility | string | Yes | |
tags | array of string | No | Default: []. |
isCurated | boolean or null | No | |
thumbnail | Thumbnail or null | Yes | |
triangleCount | integer | Yes | |
license | string | Yes | |
licenseVersion | string or null | Yes | |
isIcosaGalleryCompatible | boolean | Yes | |
presentationParams | object or null | No | |
formats | array of AssetFormat | Yes |