Media Library

get
Fetching the Media Library

https://yorgate.yordadev.network/v1/media/library
This endpoint retrieves all connected media sources into a unified library.
Request
Response
Request
Headers
Authorization
required
string
Your Shop's Client Credential Token.
Query Parameters
q
optional
string
Query string for refining search through media library.
Response
200: OK
{
"status": 200,
"payload": {
"yorcloud": [],
"gdrive": [
{
"media_id": "1lXw3cxQhPyKJv3akH758YJqAEBjSb2Bb",
"name": "ayee.jpg",
"mimeType": "image/jpeg",
"webView": "https://drive.google.com/thumbnail?id=1lXw3cxQhPyKJv3akH758YJqAEBjSb2Bb"
},
{
"media_id": "1-bUwpVaP6YqeZnXuKS8KjpSZPY-hhwTO",
"name": "SecretMemes",
"mimeType": "Folder",
"children": [
{
"media_id": "1cJzQTWnWFa4vHgKeTqrcSs4RTXNYJhvx",
"name": "Stickers",
"mimeType": "Folder",
"children": [
{
"media_id": "13VaF6X9Q-RQe0kWXZHkVMhz_uxMziPyD",
"name": "sticker_friend.jpg",
"mimeType": "image/jpeg",
"webView": "https://drive.google.com/thumbnail?id=13VaF6X9Q-RQe0kWXZHkVMhz_uxMziPyD"
}
]
},
{
"media_id": "1Ibsqgl3S3wrYDBmKTE0nOxh6eHkZtwUW",
"name": "elon.jpg",
"mimeType": "image/jpeg",
"webView": "https://drive.google.com/thumbnail?id=1Ibsqgl3S3wrYDBmKTE0nOxh6eHkZtwUW"
}
]
}
],
"odrive": []
},
"meta": {
"from": "127.0.0.1",
"agent": "PostmanRuntime/7.22.0"
}
}

Refining the Media Library Query

A query contains three parts: a term, an operator and a value for the returned query result. This example shows a basic query:

query_term operator values

Where:

  • query_term is the query term or field to search upon. To identify which query terms can be used to filter shared drives, refer to Shared drive query terms.

  • operator specifies the condition for the query term. To identify which operators you can use with each query term, refer to Query operators.

  • values are the specific values you want to use to filter your search results.