Fields, values, counts and ranges for a query
curl --request GET \
--url https://patch.gg/api/v1/assets/facetsconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/assets/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/assets/facets"
response = requests.get(url)
print(response.text){
"total": 123,
"runtime": "<string>",
"global": {
"type": {},
"source": {},
"license": {},
"prep": {},
"ai": {}
},
"types": [
{
"type": "<string>",
"label": "<string>",
"count": 123,
"folder": "<string>",
"fields": [
{
"f": "<string>",
"label": "<string>",
"kind": "number",
"count": 123,
"unit": "<string>",
"counts": {},
"range": [
123,
123
]
}
],
"capabilities": [
{
"id": "<string>",
"label": "<string>",
"count": 123,
"supported": true
}
],
"traits": {}
}
],
"ops": [
"<string>"
],
"where_forms": [
"<string>"
],
"unapplied": [
"<string>"
]
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Assets
Fields, values, counts and ranges for a query
GET
/
assets
/
facets
Fields, values, counts and ranges for a query
curl --request GET \
--url https://patch.gg/api/v1/assets/facetsconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/assets/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/assets/facets"
response = requests.get(url)
print(response.text){
"total": 123,
"runtime": "<string>",
"global": {
"type": {},
"source": {},
"license": {},
"prep": {},
"ai": {}
},
"types": [
{
"type": "<string>",
"label": "<string>",
"count": 123,
"folder": "<string>",
"fields": [
{
"f": "<string>",
"label": "<string>",
"kind": "number",
"count": 123,
"unit": "<string>",
"counts": {},
"range": [
123,
123
]
}
],
"capabilities": [
{
"id": "<string>",
"label": "<string>",
"count": 123,
"supported": true
}
],
"traits": {}
}
],
"ops": [
"<string>"
],
"where_forms": [
"<string>"
],
"unapplied": [
"<string>"
]
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Query Parameters
Text to search for
Maximum string length:
200Example:
"crate"
Asset types (repeat or comma-separate)
Example:
"model"
Source ids or names, e.g. polyhaven
SPDX ids, or "safe" (every license in the registry; the default)
Capabilities the asset must keep on the runtime, e.g. collision (a higher one counts)
Runtime the capabilities and variants are for
Example:
"patch-web@1"
indexed, converting, ready or failed (failed is hidden by default)
Filters on facets, fieldvalue: "triangles<=5000", "texture_px between 512,2048", "cap has collision". Repeat for several.
Only AI-generated, or none
Available options:
true, false