Get Website Custom Variables
curl --request GET \
--url https://api.aimtell.com/prod/site/variables/{id} \
--header 'X-Authorization-Api-Key: <api-key>'import requests
url = "https://api.aimtell.com/prod/site/variables/{id}"
headers = {"X-Authorization-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Authorization-Api-Key': '<api-key>'}};
fetch('https://api.aimtell.com/prod/site/variables/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aimtell.com/prod/site/variables/{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 => [
"X-Authorization-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aimtell.com/prod/site/variables/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Authorization-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aimtell.com/prod/site/variables/{id}")
.header("X-Authorization-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/site/variables/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Authorization-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 1234,
"id_site": 12345,
"name": "site_identifier",
"value": "website12345",
"created_at": "2020-08-26 17:05:15",
"updated_at": "2020-08-26 17:05:15",
"snippet": "{custom_variable:site_identifier}"
},
{
"id": 1235,
"id_site": 12345,
"name": "domain",
"value": "website12345.com",
"created_at": "2020-11-10 20:08:21",
"updated_at": "2020-11-10 20:08:21",
"snippet": "{custom_variable:domain}"
},
{
"id": 1236,
"id_site": 20599,
"name": "source",
"value": "aimtell",
"created_at": "2020-08-26 17:26:51",
"updated_at": "2020-08-26 17:26:51",
"snippet": "{custom_variable:source}"
}
]{
"result": "error",
"message": "Error #136."
}{
"result": "error",
"message": "Please specify a valid auth_token."
}Settings
Get Website Custom Variables
Gets a Website’s Custom Variables
GET
/
prod
/
site
/
variables
/
{id}
Get Website Custom Variables
curl --request GET \
--url https://api.aimtell.com/prod/site/variables/{id} \
--header 'X-Authorization-Api-Key: <api-key>'import requests
url = "https://api.aimtell.com/prod/site/variables/{id}"
headers = {"X-Authorization-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Authorization-Api-Key': '<api-key>'}};
fetch('https://api.aimtell.com/prod/site/variables/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aimtell.com/prod/site/variables/{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 => [
"X-Authorization-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aimtell.com/prod/site/variables/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Authorization-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aimtell.com/prod/site/variables/{id}")
.header("X-Authorization-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/site/variables/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Authorization-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 1234,
"id_site": 12345,
"name": "site_identifier",
"value": "website12345",
"created_at": "2020-08-26 17:05:15",
"updated_at": "2020-08-26 17:05:15",
"snippet": "{custom_variable:site_identifier}"
},
{
"id": 1235,
"id_site": 12345,
"name": "domain",
"value": "website12345.com",
"created_at": "2020-11-10 20:08:21",
"updated_at": "2020-11-10 20:08:21",
"snippet": "{custom_variable:domain}"
},
{
"id": 1236,
"id_site": 20599,
"name": "source",
"value": "aimtell",
"created_at": "2020-08-26 17:26:51",
"updated_at": "2020-08-26 17:26:51",
"snippet": "{custom_variable:source}"
}
]{
"result": "error",
"message": "Error #136."
}{
"result": "error",
"message": "Please specify a valid auth_token."
}⌘I

