All API accepts application/json
content and returns response with application/json
as content type.
Base URL
Base or server url for the Sembark APIs is https://api.sembark.com/integrations/v1
.
Sample Request
Here are some samples codes in different language for your reference.
CAUTION
Your MUST include the Accept
header with value as application/json
in all your requests.
curl --location --request GET 'https://api.sembark.com/integrations/v1/ping' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <TOKEN_HERE>'
var axios = require("axios");
var config = {
method: "get",
url: "https://api.sembark.com/integrations/v1/ping",
headers: {
Accept: "application/json",
Authorization: "Bearer <TOKEN_HERE>",
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var request = require("request");
var options = {
method: "GET",
url: "https://api.sembark.com/integrations/v1/ping",
headers: {
Accept: "application/json",
Authorization: "Bearer <TOKEN_HERE>",
},
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.sembark.com/integrations/v1/ping',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_TIMEOUT => 0,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer <TOKEN_HERE>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;