Marketing API
Assets
List All Assets
this api endpoint ( get get ) retrieves all your assets the response is paginated; therefore, you should use the 'page' parameter for navigating through the results in subsequent requests on successful completion, it returns an array of asset object docid\ lrpr7r0iozzuquwvx8xus the number of available results and the flags used for filtering permissions assets view query parameters page fetch the results from a specific page it defaults to 1 per page the number of results to fetch per page the maximum is 2000 and if it defaults to 50 filter optional text used for filtering subscribers by filename, extension and type folders the possible value is true if provided it returns all assets with type folder files the possible value is true if provided it returns all assets except folders product id the id of a product to use for filtering if provided, it will return the assets that are associated with this product folder id the id of a folder asset to use for filtering if provided, it will return the assets that are located in the folder require "uri" require "net/http" url = uri("https //api tamio com/v2/assets/list?page=1\&per page=10") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read body curl location request get 'https //api tamio com/v2/assets/list?page=1\&per page=10' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders }; fetch("https //api tamio com/v2/assets/list?page=1\&per page=10", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "assets" \[ { "filename" "awesome image png", "filesize" 51401, "extension" "png", "version" null, "updated at" 1669250582, "created at" 1669216610, "type" "image", "alt text" null, "id" "635b53fe 6d43 499a 9678 de4bd7501f5f", "object" "asset", "thumbnails" \[], "folder" "0be87b96 2439 4ed9 8fe9 565301dc1d96", "number of children" 0, "number of downloads" 0, "status" "active" } ], "total results" 1, "status" 200, "page" 1, "per page" 10, "filter" null, "from" null, "to" null, "mailing list" null }