curl --request GET \
--url https://api.hakumedia.ai/v2/platform-targets/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/platform-targets/{id}', 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/{id}"
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/{id}",
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;
}{
"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 Single Platform Target
curl --request GET \
--url https://api.hakumedia.ai/v2/platform-targets/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/platform-targets/{id}', 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/{id}"
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/{id}",
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;
}{
"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.
Path Parameters
Identifier of the platform target you'd like to get.
Query Parameters
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
The name of the platform target.
"Focus LG G Series"
A preset platform target including devices of a certain form factor. Possible values are "any" (also called "specific"), "mobile","tablet","mobile_and_tablet", and "desktop". When this field is set to a value other than "any" or "specific", the browser and OS targets will all be enabled and cannot be disabled or customized.
"any"
A list of desktop internet browsers to target. The list may include any combination of "chrome", "safari", "firefox", "opera", "edge", "ie", and "others". The "others" option encompasses all other possible desktop browsers not in this list.
["chrome", "firefox", "others"]
A list of mobile internet browsers to target. The list may include any combination of "chrome", "safari", "firefox", "opera", "blackberry", "uc", "edge", "samsung", and "others". The "others" option encompasses all other possible mobile browsers not on this list.
The list of desktop operating systems to target. The list may include any combination of "mac", "windows", "chromeos", "ubuntu", "linux", and "others". The "others" option encompasses all other possible desktop operating systems not in this list.
["chromeos", "others"]
The list of mobile operating systems to target. The list may include any combination of "android", "ios", "blackberry", "windows_phone", and "others". The "others" option encompasses all other possible mobile operating systems not in this list.
An object containing a breakdown of the available browser targets, organized by mobile and desktop. When creating or updating the target, setting this field's value to true will enable every browser target for both mobile and desktop options. Specific browsers may be targeted by providing their name and setting the name's value to true to include the browser in the target or false to exclude the browser.
Cannot set this field to false, because if no browsers are allowed to match then there will never be a positive match to the target.
Show child attributes
Show child attributes
An object containing a breakdown of the available operating system targets, organized by mobile and desktop. When creating or updating the target, setting this field's value to true will enable every browser target for both mobile and desktop options. Specific operating systems may be targeted by providing their name and setting the name's value to true to include the OS in the target or false to exclude the OS.
Cannot set this field to false, because if no operating systems are allowed to match then there will never be a positive match to the target.
Show child attributes
Show child attributes
The list of device-specific patterns to target. For example, "Apple*" will target all Apple devices and "Samsung Galaxy S5" will only target devices with that name. Device targeting is not available for the "desktop" platform.
["Focus LG G"]
An object containing a breakdown of the resolution targets. The resolution targets allow you to target different screen sizes.
Show child attributes
Show child attributes
A string denoting the current resource being requested or affected.
"platform_target"
The current resource identifier (ID).
3654
The relative URL of the current resource being requested or affected.
"/v2/platform-targets/3654"