Create a CSV file with data for all the jobs in body
curl --request POST \
--url https://{host}/api/tsa/v2/tsa/reports \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json'import requests
url = "https://{host}/api/tsa/v2/tsa/reports"
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'}
};
fetch('https://{host}/api/tsa/v2/tsa/reports', 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://{host}/api/tsa/v2/tsa/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://{host}/api/tsa/v2/tsa/reports"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/tsa/v2/tsa/reports")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/tsa/v2/tsa/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/tsa/v2/tsa/reports");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddHeader("Content-Type", "application/json");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://{host}/api/tsa/v2/tsa/reports");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: <api-key>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);Create a CSV file with data for all the jobs in body
POST
/
v2
/
tsa
/
reports
Create a CSV file with data for all the jobs in body
curl --request POST \
--url https://{host}/api/tsa/v2/tsa/reports \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json'import requests
url = "https://{host}/api/tsa/v2/tsa/reports"
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'}
};
fetch('https://{host}/api/tsa/v2/tsa/reports', 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://{host}/api/tsa/v2/tsa/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://{host}/api/tsa/v2/tsa/reports"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/tsa/v2/tsa/reports")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/tsa/v2/tsa/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/tsa/v2/tsa/reports");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddHeader("Content-Type", "application/json");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://{host}/api/tsa/v2/tsa/reports");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: <api-key>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);Was this page helpful?