Get Check API Status
This endpoint retrieves the status of a service. It is useful for checking whether the service or application is operational.
Configure the API Endpoint
https://api.betatel.com/api/v1/connect-hub/status
- Method:
GET
Set Up the Headers
Param | Value | Description |
---|---|---|
Content-type | application/json | Specifies the payload format. |
Example Response
Status Code: 200 OK
Content-Type: application/json
Example Response
{
"status": "Running",
"version": "2.1.0",
"uptime": "2d 0h 0m 5s"
}
Field | Type | Description |
---|---|---|
status | string | The current status of the app |
version | string | The version of the app |
uptime | string | The uptime of the app |
Code Snippets
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
Example - cURL
curl --location 'https://api.betatel.com/api/v1/connect-hub/status' \
--header 'Content-Type: application/json'
Example - Python
import http.client
conn = http.client.HTTPSConnection("api.betatel.com")
headers = {
'Content-Type': 'application/json'
}
conn.request("GET", "/api/v1/connect-hub/status", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example - Node.js
const axios = require('axios');
axios.get('https://api.betatel.com/api/v1/connect-hub/status', {
headers: {
'Content-Type': 'application/json'
}
})
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error);
});
Example - PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.betatel.com/api/v1/connect-hub/status',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Example - Java
HttpResponse<String> response = Unirest.get("https://api.betatel.com/api/v1/connect-hub/status")
.header("Content-Type", "application/json")
.asString();
System.out.println(response.getBody());
Example - C#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.betatel.com/api/v1/connect-hub/status");
request.Headers.Add("Content-Type", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());