Get Task
get
https://api.bountyblok.io
/v1/get_task
Get Task
cURL
C#
Javascript
Python
PHP
1
curl --request GET
2
--url 'https://api.bountyblok.io/v1/get_task?task_id=1606DC72-A915-4975-95BA-64CAE14800E0'
3
--header 'authorization: Bearer <<YOUR_API_KEY>>'
4
--data '{}'
5
Copied!
1
var client = new RestClient("https://api.bountyblok.io/v1/get_task?task_id=1606DC72-A915-4975-95BA-64CAE14800E0");
2
var request = new RestRequest(Method.GET);
3
request.AddHeader("authorization", "Bearer <<YOUR_API_KEY>>");
4
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
5
IRestResponse response = client.Execute(request);
6
Copied!
1
var data = "{}";
2
3
var xhr = new XMLHttpRequest();
4
5
xhr.addEventListener("readystatechange", function () {
6
if (this.readyState === this.DONE) {
7
console.log(this.responseText);
8
}
9
});
10
11
xhr.open("GET", "https://api.bountyblok.io/v1/get_task?task_id=1606DC72-A915-4975-95BA-64CAE14800E0");
12
xhr.setRequestHeader("authorization", "Bearer <<YOUR_API_KEY_HERE>>");
13
14
xhr.send(data);
15
Copied!
1
import http.client
2
3
conn = http.client.HTTPSConnection("api.bountyblok.io")
4
5
payload = "{}"
6
7
headers = { 'authorization': "Bearer <<YOUR_API_KEY>>" }
8
9
conn.request("GET", "/v1/get_task?task_id=1606DC72-A915-4975-95BA-64CAE14800E0", payload, headers)
10
11
res = conn.getresponse()
12
data = res.read()
13
14
print(data.decode("utf-8"))
15
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://api.bountyblok.io/v1/get_task?task_id=1606DC72-A915-4975-95BA-64CAE14800E0",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 30,
11
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
12
CURLOPT_CUSTOMREQUEST => "GET",
13
CURLOPT_POSTFIELDS => "{}",
14
CURLOPT_HTTPHEADER => array(
15
"authorization: Bearer <<YOUR_API_KEY_HERE>>"
16
),
17
));
18
19
$response = curl_exec($curl);
20
$err = curl_error($curl);
21
22
curl_close($curl);
23
24
if ($err) {
25
echo "cURL Error #:" . $err;
26
} else {
27
echo $response;
28
}
29
Copied!
Last modified 2yr ago
Copy link