curl --request GET \
--url https://api.hakumedia.ai/v2/platform-targets \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/platform-targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/platform-targets"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/platform-targets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"object": "list",
"has_more": false,
"limit": 10,
"offset": 0,
"url": "/v2/platform-targets",
"data": [
{
"name": "Focus LG G Series",
"platform": "any",
"desktop_browser_targets": [
"chrome",
"firefox",
"others"
],
"mobile_browser_targets": [
"<unknown>"
],
"desktop_os_targets": [
"chromeos",
"others"
],
"mobile_os_targets": [
"<unknown>"
],
"browser_targets": {
"desktop": {
"chrome": true,
"safari": false,
"firefox": true,
"opera": false,
"edge": false,
"ie": false,
"others": true
},
"mobile": {
"chrome": true,
"safari": false,
"firefox": false,
"opera": false,
"blackberry": false,
"uc": false,
"edge": false,
"samsung": false,
"others": false
}
},
"os_targets": {
"desktop": {
"mac": false,
"windows": false,
"chromeos": true,
"ubuntu": false,
"linux": false,
"others": true
},
"mobile": {
"android": true,
"ios": false,
"blackberry": false,
"windows_phone": false,
"others": false
}
},
"device_targets": [
"Focus LG G"
],
"resolution_targets": {
"small": true,
"medium": true,
"large": true,
"small_resolution_end": 599,
"medium_resolution_end": 1199
},
"object": "platform_target",
"id": 3654,
"self": "/v2/platform-targets/3654"
}
]
}Get a List of Platform Targets
You can use the fields query parameter to restrict the fields to be retrieved.
curl --request GET \
--url https://api.hakumedia.ai/v2/platform-targets \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/platform-targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/platform-targets"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/platform-targets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"object": "list",
"has_more": false,
"limit": 10,
"offset": 0,
"url": "/v2/platform-targets",
"data": [
{
"name": "Focus LG G Series",
"platform": "any",
"desktop_browser_targets": [
"chrome",
"firefox",
"others"
],
"mobile_browser_targets": [
"<unknown>"
],
"desktop_os_targets": [
"chromeos",
"others"
],
"mobile_os_targets": [
"<unknown>"
],
"browser_targets": {
"desktop": {
"chrome": true,
"safari": false,
"firefox": true,
"opera": false,
"edge": false,
"ie": false,
"others": true
},
"mobile": {
"chrome": true,
"safari": false,
"firefox": false,
"opera": false,
"blackberry": false,
"uc": false,
"edge": false,
"samsung": false,
"others": false
}
},
"os_targets": {
"desktop": {
"mac": false,
"windows": false,
"chromeos": true,
"ubuntu": false,
"linux": false,
"others": true
},
"mobile": {
"android": true,
"ios": false,
"blackberry": false,
"windows_phone": false,
"others": false
}
},
"device_targets": [
"Focus LG G"
],
"resolution_targets": {
"small": true,
"medium": true,
"large": true,
"small_resolution_end": 599,
"medium_resolution_end": 1199
},
"object": "platform_target",
"id": 3654,
"self": "/v2/platform-targets/3654"
}
]
}Authorizations
API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.
Query Parameters
The number of objects returned in the response, sometimes called "take". The max value is 100.
The position to start the retrieval of objects, sometimes called "skip".
A list of IDs by which to filter the list of objects returned. Formatted as a list of the IDs separated by commas. (For example: "1134, 1153, 1138, 1176")
Restrict the fields you wish to retrieve by listing the desired fields formatted as a comma-separated list. Fields like "object", "self", and "id" are always returned.
Response
successful operation
For list resources, the value of 'object' will always be 'list'.
"list"
True if there are more data beyond the offset and limit.
false
The number of resources to return. Sometimes called 'take'.
10
The number of resources in sequence to ignore, sometimes called 'skip'.
0
The URL of the current resource list.
"/v2/platform-targets"
Show child attributes
Show child attributes