Dokumentation
Design Endpoints
List Designs
GET
https://api.soundmadeseen.com/public/v1/designs/
This endpoint provides a list of designs belonging to the current team.
This endpoint accepts the following querystring parameters:
- order - sets the field that determines the order results are returned. May accept the following values: 'created', 'updated' or 'name'. Defaults to 'created'
- dir - sets the direction that determines the order results are returned. May have the values 'asc' and 'desc'. Defaults to 'desc'.
- page - responses of this request are paginated and have a page size of 12. Setting this parameter will return the appropriate page. Defaults to 1.
Response
If successful, returns an HTTP status code of 200 with a paginated response similar to the following:
{
"count": 2,
"current": 1,
"total_pages": 1,
"page_size": 12,
"start_index": 1,
"end_index": 2,
"extra_params": {},
"results": [
{
"key": "4jw7V7GvLLPqh7v9yASbTN",
"name": "Design in Story Aspect Ratio",
"design_type": "static",
"created": "2025-01-24T22:38:51.740453Z",
"updated": "2025-01-24T22:39:11.078920Z",
"video_size": {
"name": "Story",
"width": 1080,
"height": 1920
}
},
{
"key": "RoQBAc6iis4aFNSeGbdTv6",
"name": "Design in Landscape Aspect Ratio",
"design_type": "static",
"created": "2025-01-20T20:22:20.436508Z",
"updated": "2025-01-21T05:34:00.711499Z",
"video_size": {
"name": "Landscape",
"width": 1920,
"height": 1080
}
}]
}
Here are a few code examples:
Codebeispiele
import requests
# Replace with your actual API key
API_KEY = "MY_API_KEY"
URL = "https://api.soundmadeseen.com/public/v1/designs/"
# Headers
headers = {
"Authorization": f"Api-Key {API_KEY}"
}
# Make the GET request
response = requests.get(URL, headers=headers)
# Handle the response
if response.status_code == 200:
data = response.json()
print(f"Total Designs: {data['count']}")
print(f"Current Page: {data['current']}")
print(f"Total Pages: {data['total_pages']}")
print("Designs:")
for design in data["results"]:
print(f"- Key: {design['key']}")
print(f" Name: {design['name']}")
print(f" Design Type: {design['design_type']}")
print(f" Created: {design['created']}")
print(f" Updated: {design['updated']}")
print(f" Video Size: {design['video_size']['name']} ({design['video_size']['width']}x{design['video_size']['height']})")
print("")
else:
print("Failed to retrieve designs.")
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text}")
const axios = require('axios');
// Replace with your actual API key
const API_KEY = "MY_API_KEY";
const URL = "https://api.soundmadeseen.com/public/v1/designs/";
// Headers
const headers = {
"Authorization": `Api-Key ${API_KEY}`
};
// Make the GET request
axios
.get(URL, { headers })
.then(response => {
if (response.status === 200) {
const data = response.data;
console.log(`Total Designs: ${data.count}`);
console.log(`Current Page: ${data.current}`);
console.log(`Total Pages: ${data.total_pages}`);
console.log("Designs:");
data.results.forEach(design => {
console.log(`- Key: ${design.key}`);
console.log(` Name: ${design.name}`);
console.log(` Design Type: ${design.design_type}`);
console.log(` Created: ${design.created}`);
console.log(` Updated: ${design.updated}`);
console.log(` Video Size: ${design.video_size.name} (${design.video_size.width}x${design.video_size.height})`);
console.log("");
});
} else {
console.error("Unexpected response:", response.status, response.data);
}
})
.catch(error => {
if (error.response) {
console.error("Error response:", error.response.status, error.response.data);
} else {
console.error("Error:", error.message);
}
});
curl -X GET https://api.soundmadeseen.com/public/v1/designs/ \
-H "Authorization: Api-Key MY_API_KEY"
<?php
// Replace with your actual API key
$apiKey = "MY_API_KEY";
$url = "https://api.soundmadeseen.com/public/v1/designs/";
// Initialize cURL
$ch = curl_init();
// Set cURL options
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Api-Key $apiKey"
],
]);
// Execute the request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo "cURL Error: " . curl_error($ch);
} else {
if ($httpCode === 200) {
$data = json_decode($response, true);
echo "Total Designs: " . $data["count"] . "\n";
echo "Current Page: " . $data["current"] . "\n";
echo "Total Pages: " . $data["total_pages"] . "\n";
echo "Designs:\n";
foreach ($data["results"] as $design) {
echo "- Key: " . $design["key"] . "\n";
echo " Name: " . $design["name"] . "\n";
echo " Design Type: " . $design["design_type"] . "\n";
echo " Created: " . $design["created"] . "\n";
echo " Updated: " . $design["updated"] . "\n";
echo " Video Size: " . $design["video_size"]["name"] . " (" .
$design["video_size"]["width"] . "x" . $design["video_size"]["height"] . ")\n\n";
}
} else {
echo "Failed to retrieve designs. HTTP Code: $httpCode\n";
echo "Response: " . $response . "\n";
}
}
// Close cURL session
curl_close($ch);