An API Key will be generated, which will be required to access the Tera API Server. For information regarding the basic usage of
the API, take a look at our API Basics section. You may also use the API Explorer as a resource to view all
available Tera API operations.

Using the API Explorer

The API Explorer can be used to discover all of the available resources within the Tera API.

To use the API Explorer, an API Key needs to be provided in the api_key textfield at the top-left of the page,
If an API Key is not provided, a 400: Missing Authentication error will be returned. By clicking one of the available resources, you can view the operations and appropriate HTTP
methods included with that resource. Provide any of the required parameters for a specific operation, then
click the Try it out! button to send the request. A response will show, including the following data:

Request URL

Response Code + Headers

Response Body

In most cases, API requests will return encoded JSON (JavaScript Object Notation) data. However there are some
API requests that will return raw data, such as PNG image data for the bandwidth graph operations, or raw html formatted invoice. These
special cases will be noted in the Implementation notes for that specific resource operation.

API Basics

API requests can be made by using curl
or any programming language that supports HTTP requests. All requests should be made to the following
endpoint: https://cp.100tb.com/rest-api/

Authentication

Every request URL will require the api_key parameter. If the
api_key parameter is not provided, then a 400: Missing Authentication error
will be returned.

Examples

Every method request will be accompanied by an example block of code to the right of the method call.
If you look to the right side pane you will see an example call using get and curl.
However each method call will be formatted in PHP with the use of Tera's PHP API Client.

API Client

100TB has invested resources into providing clients with a powerful and yet simple to use PHP API Client. Similar to the API Explorer, the PHP API client requires the use of an api_key.
(Follow the steps outlined here to obtain your key now)

By utilizing the PHP API client, you can simply copy and paste all the example code provided for each method call. If you wish to utilize it, you may do so by downloading it from here: Download

GET/servers.json/{server}/bandwidth

Implementation Notes

Returns raw bandwidth data. The start parameter is required if a custom date range is needed, otherwise it is optional. If a custom date range is provided, the period parameter is ignored and a maximum of 40 date intervals are returned.

GET/servers.json/{server}/bandwidth_graph

Implementation Notes

Returns raw PNG image data of the bandwidth graph. The start parameter is required if a custom date range is needed, otherwise it is optional. If a custom date range is provided, the period parameter is ignored.

POST/servers.json/{server}/rescue

Implementation Notes

Rescue mode provides the ability to bring a server online to troubleshoot system problems that would normally only be resolved by an OS Reload. When the rescue occurs, the server will shutdown and reboot on to the public network with the same IP's assigned to the server to allow for remote connections. The server will be offline for approximately 10 minutes while the rescue is in progress. The server login credentials will be the same as what are listed on the server's profile.

[{'id':'8','title':'DDOS','dc':'London','posted':'2015-01-29','status':'Our network engineers are working on mitigating the network traffic being caused by the DOS attack at the London DC','date':'2015-01-29 14:38:09'}]