Lists all renders of an user.
Here’s a sample request to list all user’s renders:
GET /v1/renders
fetch(`https://api.templated.io/v1/renders`, { method: 'GET', headers: { 'Authorization': `Bearer ${API_KEY}` }}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));
import requests api_key = 'API_KEY'url = 'https://api.templated.io/v1/renders'headers = {'Authorization': f'Bearer {api_key}'} response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json())else: print('Request failed. Response code:', response.status_code) print(response.text)
import java.net.HttpURLConnection;import java.net.URL;import java.io.BufferedReader;import java.io.InputStreamReader;import java.net.URLEncoder; public class ListRenders { public static void main(String[] args) { try { String apiKey = "API_KEY"; URL url = new URL("https://api.templated.io/v1/renders"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Authorization", "Bearer " + apiKey); int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String inputLine; StringBuilder response = new StringBuilder(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); } else { System.out.println("Request failed. Response Code: " + responseCode); } } catch (Exception e) { e.printStackTrace(); } }}
<?php$apiKey = 'API_KEY';$url = "https://api.templated.io/v1/renders"; $options = [ 'http' => [ 'header' => "Authorization: Bearer {$apiKey}\r\n", 'method' => 'GET' ]]; $context = stream_context_create($options);$result = file_get_contents($url, false, $context); if ($result === FALSE) { echo "Error fetching data";} else { $data = json_decode($result, true); print_r($data);}?>