Introduction
Welcome to the powerful TekBASE - Reseller API! Our TekBASE is the most popular all-in-one management tool for game-, stream-, voice- and dedicated servers in Germany. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Authentication
To authorize, use this code:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/<Reseller-ID>/');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
]);
curl_close($ch);
?>
curl "https://api.tekbase.de/v1/reseller/<Reseller-ID>/" \
-H 'authenticate: apikey=<API-Key>'
Make sure to replace
<Reseller-ID>
and<API-Key>
with your Reseller ID and API key.
TekBASE uses API keys to allow access to the Reseller API. You can see the Reseller ID and API key in our customer panel. TekBASE expects for the API key to be included in all API requests to the server in a header that looks like the following:
authenticate: apikey=<API-Key>
TekBASE Licenses
Here you can manage your created licenses and assign them to IP/Domains.
Count all licenses
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/12345/count/);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
]);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
curl_close($ch);
?>
curl "https://api.tekbase.de/v1/reseller/12345/count/" \
-H 'authenticate: apikey=<API-Key>' \
The above command returns JSON structured like this:
{
"total": "5",
"unlocked": "2"
}
Returns the number of total and unlocked licenses.
HTTP Request
GET https://api.tekbase.de/v1/reseller/{resellerid}/count/
URI Parameters
Parameter | Type | Description |
---|---|---|
resellerid | string¹ | Unique Reseller-ID from TekLab.de customer panel. |
Reply
Parameter | Type | Description |
---|---|---|
total | number | Number of all existing licenses. |
unlocked | number | Number of all unlocked licenses. |
Get all licenses
<?php
$json_array = [];
/* optimized request
$json_array = [
'fields' => [
'customer' => 'kd10001'
],
'db' => [
'limit' => '10',
'orderby' => 'id',
'sort' => 'ASC'
]
];
*/
$string = json_encode($json_array);
$string = urlencode($string);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/12345/?json='.$string);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
]);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
curl_close($ch);
?>
curl "https://api.tekbase.de/v1/reseller/12345/" \
-H 'authenticate: apikey=<API-Key>' \
--data-urlencode 'json={}'
# optimized request
# --data-urlencode 'json={"fields":{"customer":"kd10001"},"db":{"limit":"10","orderby":"id","sort":"ASC"}}'
The above command returns JSON structured like this:
[
{
"id": 1,
"customer": "kd10001",
"siteip": "123.123.123.123",
"siteurl": "domaina.xyz",
"sitepath": "/var/www/html/tekbase",
"version": "std",
"cms": "1",
"shop": "1",
"gwislots": "50",
"rwislots": "50",
"swislots": "50",
"vwislots": "50",
"type": "0",
"orderdate": "1555757684",
"price": "19.00",
"current": "8600",
"status": "1"
},
{
"id": 2,
"customer": "kd10001",
"siteip": "123.123.123.234",
"siteurl": "domainb.xyz",
"sitepath": "/var/www/vhosts/domainb.xyz/tekbase",
"version": "privat",
"cms": "1",
"shop": "0",
"gwislots": "10",
"rwislots": "10",
"swislots": "10",
"vwislots": "10",
"type": "0",
"orderdate": "1554514691",
"price": "9.00",
"current": "8600",
"status": "1"
}
]
Returns all existing license objects.
HTTP Request
GET https://api.tekbase.de/v1/reseller/{resellerid}/
URI Parameters
Parameter | Type | Description |
---|---|---|
resellerid | string¹ | Unique Reseller-ID from TekLab.de customer panel. |
Request
The fields
key in the request contains an array of field objects with this structure:
Parameter | Type | Description |
---|---|---|
customer | number¹ | Can be used to filter licenses by customer ID. |
status | number¹ | This indicates whether the license was active or closed. (0 = closed, 1 = active) |
The db
key in the request contains an array of database request optimizations, similar to ORDER BY customer ASC LIMIT 0, 10
with this structure:
Parameter | Type | Description |
---|---|---|
limit | string¹ | Limits the number of rows that are retrieved when a query is executed. (e.g. 10 or 0, 10 ) |
orderby | string¹ | Sort the result based on some column. (e.g. customer ) |
sort | string¹ | Sort the result in ascending or descending order based on some column. (e.g. ASC or DESC ) |
Reply
Parameter | Type | Description |
---|---|---|
id | number | Unique license ID from our database. |
customer | string | The name was assigned by the reseller. |
siteip | string | The IP address of the server where the license was installed. |
siteurl | string | The IP address or domain where the license was installed. |
sitepath | string | Name of the directory where the license was installed. |
version | string | TekBASE version (lite = Lite, privat = privat, std = business, adv = business + billing) |
cms | number | This indicates whether the cms is available. (0 = no, 1 = yes) |
shop | number | This indicates whether the shop is available (The shop needs the CMS). (0 = no, 1 = yes) |
gwislots | number | Here you can see how many gameservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
rwislots | number | Here you can see how many customer server/vserver can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
swislots | number | Here you can see how many streamervers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
vwislots | number | Here you can see how many voiceservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
type | number | Specifies whether the version is a rental or purchase version. (0 = rental, 1 = purchase) |
orderdate | number | Date of creation as timestamp. |
price | decimal | The monthly or one-time calculated price. (e.g. 19.00) |
current | number | Installed and currently in use TekBASE version. (e.g. 8600 = 8.6.00) |
status | number | This indicates whether the license was active or closed. (0 = closed, 1 = active) |
Get a license
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/12345/1/');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
]);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
curl_close($ch);
?>
curl "https://api.tekbase.de/v1/reseller/12345/1/" \
-H 'authenticate: apikey=<API-Key>' \
The above command returns JSON structured like this:
{
"id": 1,
"customer": "kd10001",
"siteip": "123.123.123.123",
"siteurl": "domaina.xyz",
"sitepath": "/var/www/html/tekbase",
"version": "std",
"cms": "1",
"shop": "1",
"gwislots": "50",
"rwislots": "50",
"swislots": "50",
"vwislots": "50",
"type": "0",
"orderdate": "1555757684",
"price": "19.00",
"current": "8600",
"status": "1"
}
This endpoint retrieves a specific license.
HTTP Request
GET https://api.tekbase.de/v1/reseller/{resellerid}/{id}/
URI Parameters
Parameter | Type | Description |
---|---|---|
resellerid | string¹ | Unique Reseller-ID from TekLab.de customer panel. |
id | number¹ | The ID of the license to retrieve. |
Reply
Parameter | Type | Description |
---|---|---|
id | number | Unique license ID from our database. |
customer | string | The name was assigned by the reseller. |
siteip | string | The IP address of the server where the license was installed. |
siteurl | string | The IP address or domain where the license was installed. |
sitepath | string | Name of the directory where the license was installed. |
version | string | TekBASE version (lite = Lite, privat = privat, std = business, adv = business + billing) |
cms | number | This indicates whether the cms is available. (0 = no, 1 = yes) |
shop | number | This indicates whether the shop is available (The shop needs the CMS). (0 = no, 1 = yes) |
gwislots | number | Here you can see how many gameservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
rwislots | number | Here you can see how many customer server/vserver can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
swislots | number | Here you can see how many streamervers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
vwislots | number | Here you can see how many voiceservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
type | number | Specifies whether the version is a rental or purchase version. (0 = rental, 1 = purchase) |
orderdate | number | Date of creation as timestamp. |
price | decimal | The monthly or one-time calculated price. (e.g. 19.00) |
current | number | Installed and currently in use TekBASE version (e.g. 8600 = 8.6.00) |
status | number | This indicates whether the license was active or closed. (0 = closed, 1 = active) |
Get a license key
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/12345/1/');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
]);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
curl_close($ch);
?>
curl "https://api.tekbase.de/v1/reseller/12345/1/" \
-H 'authenticate: apikey=<API-Key>' \
The above command returns JSON structured like this:
{
"id": 1,
"key": "74D1-425D-BBCC-5C79-6207-A0E1-55C6-6B60\n6E14-6721-8CF4-7329-41F1-9685-90A4-475D\n706A-C6BC-8FB6-45CC-E981-1771-2BB2-1FDC\n8BBA-8C18-077D-5B24-0E20-85BF-723D-B34E\nB9B3-A446-2900-A5A6-279F-28CB-BD53-8933\n23FA-20F8-779C-C3E1-D15F-709C-741A-D9C5\n82D0-905B-D2C1-AFB1-17F8-C7E2-400B-F590\nB56E-C9B2-62A8-62AD-A5DE-69BB-1266-EB59"
}
This endpoint retrieves a specific license.
HTTP Request
GET https://api.tekbase.de/v1/reseller/{resellerid}/{id}/{version}
URI Parameters
Parameter | Type | Description |
---|---|---|
resellerid | string¹ | Unique Reseller-ID from TekLab.de customer panel. |
id | number¹ | The ID of the license to retrieve. |
version | number¹ | The TekBASE major version. (7 = TekBASE 7.X, 8 = TekBASE 8.X) |
Reply
Parameter | Type | Description |
---|---|---|
key | string | License key for the TekBASE installation. |
Add a license
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/12345/');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
'Content-Type: application/json; charset=utf-8'
]);
$json_array = [
'customer' => 'kd10003',
'siteip' => '123.123.123.235',
'siteurl' => '123.123.123.235',
'sitepath' => '/var/www/html/tekbase',
'version' => 'privat',
'cms' => '1',
'shop' => '0',
'gwislots' => '10',
'rwislots' => '10',
'swislots' => '10',
'vwislots' => '10'
];
$body = json_encode($json_array);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
curl_close($ch);
?>
curl -X "POST" "https://api.tekbase.de/v1/reseller/12345/" \
-H 'authenticate: apikey=<API-Key>' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"customer": "kd10003",
"siteip": "123.123.123.235",
"siteurl": "123.123.123.235",
"sitepath": "/var/www/html/tekbase",
"version": "privat",
"cms": "1",
"shop": "0",
"gwislots": "10",
"rwislots": "10",
"swislots": "10",
"vwislots": "10",
"type": "0"
}'
The above command returns JSON structured like this:
{
"id": "3",
"key": "74D1-425D-BBCC-5C79-6207-A0E1-55C6-6B60\n6E14-6721-8CF4-7329-41F1-9685-90A4-475D\n706A-C6BC-8FB6-45CC-E981-1771-2BB2-1FDC\n8BBA-8C18-077D-5B24-0E20-85BF-723D-B34E\nB9B3-A446-2900-A5A6-279F-28CB-BD53-8933\n23FA-20F8-779C-C3E1-D15F-709C-741A-D9C5\n82D0-905B-D2C1-AFB1-17F8-C7E2-400B-F590\nB56E-C9B2-62A8-62AD-A5DE-69BB-1266-EB59",
"message": "SUCCESSFUL"
}
Create a new TekBASE license. For each IP/Domain there can be only one combination of the parameters "siteurl" and "sitepath". No duplicate entries.
HTTP Request
POST https://api.tekbase.de/v1/reseller/{resellerid}/
URI Parameters
Parameter | Type | Description |
---|---|---|
resellerid | string¹ | Unique Reseller-ID from TekLab.de customer panel. |
Request
Parameter | Type | Description |
---|---|---|
customer | string¹ | The name was assigned by the reseller. (max. 20 characters) |
siteip | string² | The IP address of the server where the license was installed. |
siteurl | string² | The IP address or domain where the license was installed. |
sitepath | string² | Name of the directory where the license was installed. |
version | string¹ | TekBASE version (lite = Lite, privat = privat, std = business, adv = business + billing) |
cms | number | This indicates whether the cms is available. (0 = no, 1 = yes) |
shop | number | This indicates whether the shop is available (The shop needs the CMS). (0 = no, 1 = yes) |
gwislots | number | Here you can see how many gameservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
rwislots | number | Here you can see how many customer server/vserver can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
swislots | number | Here you can see how many streamervers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
vwislots | number | Here you can see how many voiceservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
type | number | Specifies whether the version is a rental or purchase version. (0 = rental, 1 = purchase) |
Reply
Parameter | Type | Description |
---|---|---|
id | number | Unique ID |
key | string¹ | License key for the TekBASE installation. |
message | string | Message with "SUCCESSFUL" text. |
Update a license
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/12345/1/');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
'Content-Type: application/json; charset=utf-8'
]);
$json_array = [
'customer' => 'kd10004',
'rwislots' => '50'
];
$body = json_encode($json_array);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
curl_close($ch);
?>
curl -X "PUT" "https://api.tekbase.de/v1/reseller/12345/1/" \
-H 'authenticate: apikey=<API-Key>' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"customer": "kd10004",
"rwislots": "50"
}'
The above command returns JSON structured like this:
{
"message": "SUCCESSFUL"
}
Update a TekBASE license. For each IP/Domain there can be only one combination of the parameters "siteurl" and "sitepath". No duplicate entries.
If you want to lock a license send the parameter status
with the value 0
.
HTTP Request
PUT https://api.tekbase.de/v1/reseller/{resellerid}/{id}/
URI Parameters
Parameter | Type | Description |
---|---|---|
resellerid | string¹ | Unique Reseller-ID from TekLab.de customer panel. |
id | number¹ | The ID of the license to retrieve. |
Request
Parameter | Type | Description |
---|---|---|
customer | string¹ | The name was assigned by the reseller. (max. 20 characters) |
siteip | string¹² | The IP address of the server where the license was installed. |
siteurl | string¹² | The IP address or domain where the license was installed. |
sitepath | string¹² | Name of the directory where the license was installed. |
version | string¹ | TekBASE version (lite = Lite, privat = privat, std = business, adv = business + billing) |
cms | number | This indicates whether the cms is available. (0 = no, 1 = yes) |
shop | number | This indicates whether the shop is available (The shop needs the CMS). (0 = no, 1 = yes) |
gwislots | number | Here you can see how many gameservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
rwislots | number | Here you can see how many customer server/vserver can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
swislots | number | Here you can see how many streamervers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
vwislots | number | Here you can see how many voiceservers can be managed. (e.g. 0 , 10 , 20 , 50 , 100 , 200 , 500 , 999999 ) |
status | number¹² | This indicates whether the license was active or closed. (0 = closed, 1 = active) |
Reply
Parameter | Type | Description |
---|---|---|
key | string¹ | License key for the TekBASE installation. |
message | string | Message with "SUCCESSFUL" text. |
Delete a license
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.tekbase.de/v1/reseller/12345/1/');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'authenticate: apikey=<API-Key>'
]);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
curl_close($ch);
?>
curl -X "DELETE" "https://api.tekbase.de/v1/reseller/12345/1/" \
-H 'authenticate: apikey=<API-Key>' \
The above command returns JSON structured like this:
{
"message": "SUCCESSFUL"
}
This endpoint delete a specific license.
HTTP Request
DELETE https://api.tekbase.de/v1/reseller/{resellerid}/{id}/
URI Parameters
Parameter | Type | Description |
---|---|---|
resellerid | string¹ | Unique Reseller-ID from TekLab.de customer panel. |
id | number¹ | The ID of the license to retrieve. |
Reply
Parameter | Type | Description |
---|---|---|
message | string | Message with "SUCCESSFUL" text. |
Errors
The TekBASE - Reseller API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your Reseller-ID or API key is wrong. |
404 | Not Found -- The specified license could not be found. |
406 | Not Acceptable -- You requested a format that isn't json. |
429 | Too Many Requests -- You're requesting too many queries! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |