Language
curl --request POST \
--url 'https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'domainId=5001' \
--data-urlencode 'url=https://tracker.example.com/imp?ip=$$IP$$&geo=$$COUNTRY$$' \
--data-urlencode 'event=IMPRESSION'
import requests
response = requests.request("POST", "https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do", headers={"X-Api-Key": "YOUR_API_KEY"}, data={"domainId": "5001", "url": "https://tracker.example.com/imp?ip=$$IP$$&geo=$$COUNTRY$$", "event": "IMPRESSION"})
print(response.json())
const response = await fetch('https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do', {
method: 'POST',
headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({"domainId":"5001","url":"https://tracker.example.com/imp?ip=$$IP$$&geo=$$COUNTRY$$","event":"IMPRESSION"}),
});
console.log(await response.json());
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.method("POST", HttpRequest.BodyPublishers.ofString("domainId=5001&url=https%3A%2F%2Ftracker.example.com%2Fimp%3Fip%3D%24%24IP%24%24%26geo%3D%24%24COUNTRY%24%24&event=IMPRESSION"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["domainId"] = "5001", ["url"] = "https://tracker.example.com/imp?ip=$$IP$$&geo=$$COUNTRY$$", ["event"] = "IMPRESSION" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do", strings.NewReader(`domainId=5001&url=https%3A%2F%2Ftracker.example.com%2Fimp%3Fip%3D%24%24IP%24%24%26geo%3D%24%24COUNTRY%24%24&event=IMPRESSION`))
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}
<?php
$ch = curl_init("https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-Api-Key: YOUR_API_KEY", "Content-Type: application/x-www-form-urlencoded"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'domainId=5001&url=https%3A%2F%2Ftracker.example.com%2Fimp%3Fip%3D%24%24IP%24%24%26geo%3D%24%24COUNTRY%24%24&event=IMPRESSION');
echo curl_exec($ch);
curl_close($ch);
require 'net/http'
require 'json'
uri = URI("https://YOUR-NETWORK-DOMAIN/rest-api/server-side-tracker/banner/add.do")
request = Net::HTTP::Post.new(uri)
request['X-Api-Key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/x-www-form-urlencoded'
request.set_form_data('domainId' => "5001", 'url' => "https://tracker.example.com/imp?ip=$$IP$$&geo=$$COUNTRY$$", 'event' => "IMPRESSION")
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
puts response.body