Test Endpoint
Can be used to test API connectivity and authentication.
Request parameters
curl https://eu1.api.av.ionxsolutions.com/v1/ping \
--header 'X-API-Key: YOUR_API_KEY'
const axios = require('axios');
const api = axios.create({
baseURL: 'https://eu1.api.av.ionxsolutions.com/v1/'
});
api.get(`ping`, {
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
}).then(res => {
console.log('Test OK');
}).catch(err => {
console.log('error', err);
});
using var client = new HttpClient();
client.BaseAddress = new Uri("https://eu1.api.av.ionxsolutions.com/v1/");
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var response = await client.GetAsync("ping");
response.EnsureSuccessStatusCode();
Console.WriteLine("Test OK");
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;
String apiKey = "YOUR_API_KEY";
String url = "https://eu1.api.av.ionxsolutions.com/v1/ping";
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(url)
.addHeader("X-API-Key", apiKey)
.get()
.build();
Response response = client.newCall(request).execute();
if (response.isSuccessful()) {
System.out.println(response.message());
} else {
System.err.println("Request failed. Status code: " + response.code());
System.err.println("Response message: " + response.message());
System.err.println(response.body().string());
}
import requests
url = 'https://eu1.api.av.ionxsolutions.com/v1/ping'
api_key = 'YOUR_API_KEY'
headers = {
'X-API-Key': api_key
}
response = requests.get(url, headers=headers)
print('Test OK')
package main
import (
"fmt"
"net/http"
)
func main() {
apiKey := "YOUR_API_KEY"
url := "https://eu1.api.av.ionxsolutions.com/v1/ping"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("X-API-Key", apiKey)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
if resp.StatusCode == 200 {
fmt.Println("Test OK")
} else {
fmt.Printf("Request failed. Status code: %d\n", resp.StatusCode)
}
}
require 'net/http'
require 'uri'
url = URI.parse("https://eu1.api.av.ionxsolutions.com/v1/ping")
request = Net::HTTP::Get.new(url)
request['X-API-Key'] = 'YOUR_API_KEY'
response = Net::HTTP.start(url.hostname, url.port, use_ssl: true) do |http|
http.request(request)
end
puts 'Test OK'
<?php
$url = 'https://eu1.api.av.ionxsolutions.com/v1/ping';
$api_key = 'YOUR_API_KEY';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 0);
$headers = array();
$headers[] = 'X-API-Key: '.$api_key;
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($curl);
if ($result === false) {
curl_close($curl);
die('Curl error: '.curl_error($curl).'('.curl_errno($curl).')');
}
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($http_code != 200) {
die('HTTP error: Status code '.$http_code);
}
echo "Test OK";
$Uri = "https://eu1.api.av.ionxsolutions.com/v1/ping"
$Headers = @{
"X-API-Key" = "YOUR_API_KEY"
};
$Result = Invoke-WebRequest -Uri $Uri -Method Get -Headers $Headers
Write-Host ($Result.StatusDescription)
Responses
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.6.1",
"title": "Internal Server Error",
"status": 500,
"detail": "Something went wrong",
"traceId": "00-17d017df2498eac9e698f1a06747a161-c9d4f32199479052-01"
}
Last modified: 08 November 2024