List folders
const url = 'https://api.ebitex.io/assets/management/v1/folders';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ebitex.io/assets/management/v1/folders \ --header 'Authorization: Bearer <token>'Lists every folder of the organization as a flat list: its id, name, parent folder, the number of assets directly in it and the number of folders directly under it. Build the tree from parentFolderId. To find or create a folder by path, use PUT /folders/ensure.
Key: an Assets management key (assets.management.read or above).
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”[{ "id": "…", "name": "…", "parentFolderId": null, "assetCount": 3, "childFolderCount": 1 }]
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.
payment_required: the organization’s subscription needs attention.
scope_denied: the key is not an Assets management key. permission_denied: a read key was used for a write. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.
too_many_failed_authentications: too many bad keys from this address; rate_limited: too many requests from the organization. Retry-After says how long to wait.