Test Endpoints
GET Method
Request
ENDPOINT
/test/API_KEYMETHOD
GETPath Params
| Field | Type | Description |
|---|---|---|
api_key * | string | Partner's API_KEY. |
GET /test/{api_key}
- cURL
- Python
- JavaScript
- Java
curl -X GET \
'https://api-auth.sandbox.qitech.app/test/{api_key}' \
-H 'AUTHORIZATION: {encoded_header_token}' \
-H 'API-CLIENT-KEY: {api_key}'
import requests
url = f"{base_url}/test/{api_key}"
response = requests.get(url=url, headers=signed_header)
print(response.json())
const url = `${base_url}/test/${api_key}`;
const response = await fetch(url, {
method: 'GET',
headers: {
'AUTHORIZATION': encoded_header_token,
'API-CLIENT-KEY': api_key,
},
});
const data = await response.json();
console.log(data);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(requestUrl + "/" + api_key)
.headers(Headers.of(headers))
.get()
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
Response
STATUS
200Response Body
{
"test_key": "97ad0301-869c-4481-98b6-294b139e09ae",
"success": "Congrats!"
}
POST Method
Request
ENDPOINT
test/API_KEYMETHOD
POSTPOST /test/{api_key}
- cURL
- Python
- JavaScript
- Java
curl -X POST \
'https://api-auth.sandbox.qitech.app/test/{api_key}' \
-H 'AUTHORIZATION: {encoded_header_token}' \
-H 'API-CLIENT-KEY: {api_key}' \
-H 'Content-Type: application/json' \
-d '{"name": "QI Tech"}'
import requests
url = f"{base_url}/test/{api_key}"
body = {"name": "QI Tech"}
response = requests.post(url=url, headers=signed_header, json=body)
print(response.json())
const url = `${base_url}/test/${api_key}`;
const response = await fetch(url, {
method: 'POST',
headers: {
'AUTHORIZATION': encoded_header_token,
'API-CLIENT-KEY': api_key,
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'QI Tech' }),
});
const data = await response.json();
console.log(data);
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(
mediaType, "{\"name\": \"QI Tech\"}");
Request request = new Request.Builder()
.url(requestUrl + "/" + api_key)
.headers(Headers.of(headers))
.post(body)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
Request Body
{
"name": "QI Tech"
}
Path Params
| Field | Type | Description |
|---|---|---|
api_key * | string | Partner's API_KEY. |
Response
STATUS
201Response Body
{
"name": "QI Tech",
"success": "Congrats!"
}