curl -X GET "https://api-sandbox.whitelabel.com/v1/reports/<report_id>" \
-H "X-Organization-Code: <X-Organization-Code>" \
-H "public-api-key: <public-api-key>" \
-H "private-secret-key: <private-secret-key>"
const response = await fetch(`https://api-sandbox.whitelabel.com/v1/reports/${report_id}`, {
method: 'GET',
headers: { 'public-api-key': '<public-api-key>', 'private-secret-key': '<private-secret-key>' }
});
const data = await response.json();
import requests
response = requests.request(
"GET",
"https://api-sandbox.whitelabel.com/v1/reports/{report_id}",
headers={ "public-api-key": "<public-api-key>", "private-secret-key": "<private-secret-key>" },
)
data = response.json()
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api-sandbox.whitelabel.com/v1/reports/<report_id>");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["public-api-key: <public-api-key>", "private-secret-key: <private-secret-key>"]);
$response = curl_exec($ch);
curl_close($ch);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api-sandbox.whitelabel.com/v1/reports/<report_id>", nil)
req.Header.Set("public-api-key", "<public-api-key>")
req.Header.Set("private-secret-key", "<private-secret-key>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api-sandbox.whitelabel.com/v1/reports/<report_id>"))
.header("public-api-key", "<public-api-key>")
.header("private-secret-key", "<private-secret-key>")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require "net/http"
require "uri"
uri = URI("https://api-sandbox.whitelabel.com/v1/reports/<report_id>")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
request["public-api-key"] = "<public-api-key>"
request["private-secret-key"] = "<private-secret-key>"
response = http.request(request)
puts response.body