Introduction

Unlock the power of Rise of Stats and take your data analysis to new heights. Our API documentation is your ultimate guide to seamlessly integrate and leverage the full potential of our services.

Robust Functionality

Rise of Stats offers a wide range of features and capabilities to suit your specific needs, ensuring your applications are more powerful and versatile than ever.

Easy Integration

We've designed Rise of Stats API to be developer-friendly, with clear and concise documentation and code samples to help you get up and running quickly.

Community Support

Join a vibrant community of developers and enthusiasts who are eager to share their knowledge and experience, making it easier than ever to get assistance and collaborate.

Function Structure

api.riseofstats.com
  • /scan
    • /listGet a list of all available scans
    • /viewView details of specific scan
    • /dataGet all data attached to specific scan
  • /governor
    • /listGet a list of all governors within a kingdom
    • /dataGet all data attached to specific governor
  • /power
    • /listGet a list of all available power scans
    • /dataGet power value of a specific power scan
  • /tag
    • /listGet a list of all available tags

Starter template

                                                            
                                                            import requests

                                                            # API endpoint URL
                                                            api_url = "https://api.riseofstats.com/endpoint/function"
                                                
                                                            # Authentication credentials
                                                            api_key = "your_api_key"
                                                            api_secret = "your_api_secret"
                                                
                                                            # GET parameters
                                                            params = {
                                                                "param1": "value1",
                                                                "param2": "value2",
                                                            }
                                                
                                                            # POST data (if needed)
                                                            data = {
                                                                "key1": "value1",
                                                                "key2": "value2",
                                                            }
                                                
                                                            # Headers with authentication
                                                            headers = {
                                                                "Authorization": f"Bearer {api_key}:{api_secret}",
                                                                "Content-Type": "application/json",  # Set content type as needed
                                                            }
                                                
                                                            try:
                                                                # Make a POST request with authentication and GET parameters
                                                                response = requests.post(api_url, headers=headers, params=params, json=data)
                                                
                                                                # Check for a successful response (status code 200)
                                                                if response.status_code == 200:
                                                                    # Print the response content
                                                                    print("Response:")
                                                                    print(response.json())
                                                                else:
                                                                    print(f"Request failed with status code {response.status_code}")
                                                                    print("Response:")
                                                                    print(response.text)
                                                            except Exception as e:
                                                                print(f"An error occurred: {str(e)}")
                                                            
                                                        
                                                            
                                                            // API endpoint URL
                                                            $api_url = "https://api.riseofstats.com/endpoint/function";
                                                            
                                                            // Authentication credentials
                                                            $api_key = "your_api_key";
                                                            $api_secret = "your_api_secret";
                                                            
                                                            // GET parameters
                                                            $params = [
                                                                "param1" => "value1",
                                                                "param2" => "value2",
                                                            ];
                                                            
                                                            // POST data (if needed)
                                                            $data = [
                                                                "key1" => "value1",
                                                                "key2" => "value2",
                                                            ];
                                                            
                                                            // Headers with authentication
                                                            $headers = [
                                                                "Authorization: Bearer " . $api_key . ":" . $api_secret,
                                                                "Content-Type: application/json",  // Set content type as needed
                                                            ];
                                                            
                                                            try {
                                                                // Initialize cURL session
                                                                $ch = curl_init($api_url);
                                                            
                                                                // Set cURL options
                                                                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
                                                                curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
                                                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                                                curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                                                                curl_setopt($ch, CURLOPT_URL, $api_url . '?' . http_build_query($params));
                                                            
                                                                // Execute cURL session and store the response
                                                                $response = curl_exec($ch);
                                                            
                                                                // Check for cURL errors
                                                                if (curl_errno($ch)) {
                                                                    throw new Exception("cURL Error: " . curl_error($ch));
                                                                }
                                                            
                                                                // Close cURL session
                                                                curl_close($ch);
                                                            
                                                                // Check for a successful response (HTTP status code 200)
                                                                if ($response) {
                                                                    $response_data = json_decode($response, true);
                                                                    if ($response_data !== null) {
                                                                        // Print the response
                                                                        echo "Response:\n";
                                                                        print_r($response_data);
                                                                    } else {
                                                                        echo "Invalid JSON response: " . $response;
                                                                    }
                                                                } else {
                                                                    echo "Request failed with no response.";
                                                                }
                                                            } catch (Exception $e) {
                                                                echo "An error occurred: " . $e->getMessage();
                                                            }


                                                            
                                                        
                                                            
                                                            // API endpoint URL
                                                            const apiUrl = 'https://api.riseofstats.com/endpoint/function';
                                                            
                                                            // Authentication credentials
                                                            const apiKey = 'your_api_key';
                                                            const apiSecret = 'your_api_secret';
                                                            
                                                            // GET parameters
                                                            const params = {
                                                                param1: 'value1',
                                                                param2: 'value2',
                                                            };
                                                            
                                                            // POST data (if needed)
                                                            const postData = {
                                                                key1: 'value1',
                                                                key2: 'value2',
                                                            };
                                                            
                                                            // Headers with authentication
                                                            const headers = new Headers({
                                                              Authorization: `Bearer ${apiKey}:${apiSecret}`,
                                                              'Content-Type': 'application/json', // Set content type as needed
                                                            });
                                                            
                                                            // Construct the URL with GET parameters
                                                            const url = new URL(apiUrl);
                                                            url.search = new URLSearchParams(params).toString();
                                                            
                                                            fetch(url, {
                                                              method: 'POST',
                                                              headers: headers,
                                                              body: JSON.stringify(postData), // Convert the POST data to JSON
                                                            })
                                                              .then((response) => {
                                                                    // Check for a successful response (status code 200)
                                                                    if (response.ok) {
                                                                        return response.json();
                                                                    } else {
                                                                        throw new Error(`Request failed with status: ${response.status}`);
                                                                    }
                                                                })
                                                              .then((data) => {
                                                                    // Print the response data
                                                                    console.log('Response:');
                                                                    console.log(data);
                                                                })
                                                              .catch((error) => {
                                                                    console.error('An error occurred:', error.message);
                                                                });

                                                            
                                                        

Endpoints

The `/scan/list` endpoint allows you to retrieve a list of scans that are attached to a specific kingdom. This endpoint provides information about each scan, including its unique identifier (id), name, and date of the scan.

Endpoint
  • URL: `/scan/list`
  • Method: POST
Parameters
Name Type Description
auth_keystrAuthentication key
secretstrSecret key
limit Int (Optional) Limits the number of scans returned in the list.
before date (Optional) Format "yyyy-mm-dd", eg. 2023-01-31.
after date (Optional) Format "yyyy-mm-dd", eg. 2023-01-31.
spy Bool (Optional) 1, to select only spy scans.
tag Int Coming Soon
Example Request
        
            POST /scan/list?limit=10
            POST /scan/list?limit=10&before=2023-01-31
            POST /scan/list?limit=10&before=2023-01-31&after2022-08-01
        
    

Response

Success Response
  • Status Code: 200 OK

The response is a JSON array containing scan objects, each with the following attributes:

  • `id`(int): The unique identifier for the scan.
  • `name`(string): The name of the scan.
  • `date`(string): The date and time when the scan was performed in the format "YYYY-MM-DD HH:MM:SS".
Example Response
        
        [
          {
            "id": 1,
            "name": "Scan Number 1",
            "date": "2000-01-01 00:00:00"
          },
          {
            "id": 2,
            "name": "Scan Number 2",
            "date": "2000-01-02 00:00:00"
          }
        ]
        
    
Failure Response
  • 400 Bad Request You are missing required parameters.
  • 401 Unauthorized: Missing or incorrectly Authentication key & Secret.
  • 403 Forbidden: You do not have access to this data.
  • 404 Not Found: The provided endpoint or function provided is non-existent.
  • 422 Unprocessable Entity: Request method does not equal to POST.
  • 500 Internal Server Error: Server issues, best to contact support.

The `/scan/view` endpoint allows you to retrieve detailed information about a specific scan by specifying its unique identifier (`id`). This endpoint provides details such as the scan's `id`, `name`, and `date`.

Endpoint
  • URL: `/scan/view`
  • Method: POST
Parameters
Name Type Description
id Int (Required) Unique identifier of the scan.
auth_keystrAuthentication key
secretstrSecret key
Example Request
        
            POST /scan/view?id=11766
        
    

Response

Success Response
  • Status Code: 200 OK

The response is a JSON array containing scan objects, each with the following attributes:

  • `id`(int): The unique identifier for the scan.
  • `name`(string): The name of the scan.
  • `date`(string): The date and time when the scan was performed in the format "YYYY-MM-DD HH:MM:SS".
Example Response
        
        [
          {
            "id": 1,
            "name": "Scan Number 1",
            "date": "2000-01-01 00:00:00"
          }
        ]
        
    
Failure Response
  • 400 Bad Request You are missing required parameters.
  • 401 Unauthorized: Missing or incorrectly Authentication key & Secret.
  • 403 Forbidden: You do not have access to this data.
  • 404 Not Found: The provided endpoint or function provided is non-existent.
  • 422 Unprocessable Entity: Request method does not equal to POST.
  • 500 Internal Server Error: Server issues, best to contact support.

The `/scan/data` endpoint allows you to retrieve data attached to a specific scan by specifying its unique identifier (`id`). This endpoint provides details about governors and their associated data, such as `governor_id`, `username`, `power`, `kills` for different troop types (`kills_t_1`, `kills_t_2`, `kills_t_3`, `kills_t_4`, `kills_t_5`), `deads`, `assistance`, and `helps`.

Endpoint
  • URL: `/scan/view`
  • Method: POST
Parameters
Name Type Description
id Int (Required) Unique identifier of the scan.
auth_keystrAuthentication key
secretstrSecret key
limit Int (Optional) Limits the number of scans returned in the list.
min_power Int (Optional) Set the minimum power value.
max_power Int (Optional) Set the maximum power value.
tag Int Coming Soon
Example Request
        
            POST /scan/data?id=10000
            POST /scan/data?id=10000&min_power=50000000
            POST /scan/data?id=10000&min_power=50000000&max_power=100000000
        
    

Response

Success Response
  • Status Code: 200 OK

The response is a JSON array containing data objects for governors associated with the scan. Each governor data object has the following attributes:

  • governor_id (int): The unique identifier of the governor.
  • username (string): The username of the governor.
  • power (int): The power of the governor.
  • kills_t_1 (int): Kills of troop type 1.
  • kills_t_2 (int): Kills of troop type 2.
  • kills_t_3 (int): Kills of troop type 3.
  • kills_t_4 (int): Kills of troop type 4.
  • kills_t_5 (int): Kills of troop type 5.
  • deads (int): The number of times the governor died.
  • assistance (int): The amount of assistance provided.
  • helps (int): The number of helps received.
Example Response
        
        [
          {
            "governor_id": 000000000,
            "username": "RosStaff",
            "power": 984343333,
            "kills_t_1": 8763245,
            "kills_t_2": 8293322,
            "kills_t_3": 1726322,
            "kills_t_4": 98723422,
            "kills_t_5": 10923222,
            "deads": 17641624,
            "assistance": 17939594784,
            "helps": 169457
          },
          {
            "governor_id": 000000001,
            "username": "RosSupport",
            "power": 823674333,
            "kills_t_1": 8763245,
            "kills_t_2": 8293322,
            "kills_t_3": 1726322,
            "kills_t_4": 98723422,
            "kills_t_5": 10923222,
            "deads": 17641624,
            "assistance": 17939594784,
            "helps": 169457
          }
        ]
        
    
Failure Response
  • 400 Bad Request You are missing required parameters.
  • 401 Unauthorized: Missing or incorrectly Authentication key & Secret.
  • 403 Forbidden: You do not have access to this data.
  • 404 Not Found: The provided endpoint or function provided is non-existent.
  • 422 Unprocessable Entity: Request method does not equal to POST.
  • 500 Internal Server Error: Server issues, best to contact support.

The `/governor/list` endpoint allows you to retrieve a list of governors attached to a specific kingdom. This endpoint provides information about each governor, including their unique identifier (`id`) and username.

Endpoint
  • URL: `/governor/list`
  • Method: POST
Parameters
Name Type Description
auth_keystrAuthentication key
secretstrSecret key
limit Int (Optional) Limit of results to be returned, default set on 100.
min_power Int (Optional) Set the minimum power value.
max_power Int (Optional) Set the maximum power value.
tag Int Coming Soon
Example Request
        
            POST /governor/list?limit=10
        
    

Response

Success Response
  • Status Code: 200 OK

The response is a JSON array containing governor objects, each with the following attributes:

  • `id`(int): The unique identifier for the governor.
  • `username`(string): The username of the governor.
Example Response
        
        [
          {
            "id": 0000001,
            "username": "RoSStaff"
          },
          {
            "id": 0000002,
            "username": "RoSSupport"
          }
        ]
        
    
Failure Response
  • 400 Bad Request You are missing required parameters.
  • 401 Unauthorized: Missing or incorrectly Authentication key & Secret.
  • 403 Forbidden: You do not have access to this data.
  • 404 Not Found: The provided endpoint or function provided is non-existent.
  • 422 Unprocessable Entity: Request method does not equal to POST.
  • 500 Internal Server Error: Server issues, best to contact support.

The `/governor/data` endpoint allows you to retrieve data about governors attached to a specific kingdom by specifying their unique identifier (`governor_id`). This endpoint provides details about governors, including their `governor_id`, `username`, `power`, `kills` for different troop types (`kills_t_1`, `kills_t_2`, `kills_t_3`, `kills_t_4`, `kills_t_5`), `deads`, `assistance`, and `helps`.

Endpoint
  • URL: `/governor/data`
  • Method: POST
Parameters
Name Type Description
id Int (Required) Unique identifier of the governor.
auth_keystrAuthentication key
secretstrSecret key
limit Int Coming Soon
Example Request
        
            POST /governor/data?id=0000001
        
    

Response

Success Response
  • Status Code: 200 OK

The response is a JSON array containing data objects for governors associated with the specified governor `id`. Each governor data object has the following attributes:

  • governor_id (int): The unique identifier of the governor.
  • username (string): The username of the governor.
  • power (int): The power of the governor.
  • kills_t_1 (int): Kills of troop type 1.
  • kills_t_2 (int): Kills of troop type 2.
  • kills_t_3 (int): Kills of troop type 3.
  • kills_t_4 (int): Kills of troop type 4.
  • kills_t_5 (int): Kills of troop type 5.
  • deads (int): The number of times the governor died.
  • assistance (int): The amount of assistance provided.
  • helps (int): The number of helps received.
  • scan_id (int): The scan identifier associated with the governor data.
Example Response
        
        [
          {
            "governor_id": 0000001,
            "username": "RosStaff",
            "power": 984343333,
            "kills_t_1": 8763245,
            "kills_t_2": 8293322,
            "kills_t_3": 1726322,
            "kills_t_4": 98723422,
            "kills_t_5": 10923222,
            "deads": 17641624,
            "assistance": 17939594784,
            "helps": 169457,
            "scan_id": 1
          },
          {
            "governor_id": 0000001,
            "username": "RosStaff",
            "power": 823674333,
            "kills_t_1": 8763245,
            "kills_t_2": 8293322,
            "kills_t_3": 1726322,
            "kills_t_4": 98723422,
            "kills_t_5": 10923222,
            "deads": 17641624,
            "assistance": 17939594784,
            "helps": 169457,
            "scan_id": 2
          }
        ]
        
    
Failure Response
  • 400 Bad Request You are missing required parameters.
  • 401 Unauthorized: Missing or incorrectly Authentication key & Secret.
  • 403 Forbidden: You do not have access to this data.
  • 404 Not Found: The provided endpoint or function provided is non-existent.
  • 422 Unprocessable Entity: Request method does not equal to POST.
  • 500 Internal Server Error: Server issues, best to contact support.

The `/power/list` endpoint allows you to retrieve a list of power scans that are attached to a specific kingdom. This endpoint provides information about each scan, including its unique identifier (id), power, and date of the scan.

Endpoint
  • URL: `/power/list`
  • Method: POST
Parameters
Name Type Description
auth_keystrAuthentication key
secretstrSecret key
limit Int (Optional) Limits the number of scans returned in the list.
before date (Optional) Format "yyyy-mm-dd", eg. 2023-01-31.
after date (Optional) Format "yyyy-mm-dd", eg. 2023-01-31.
spy Bool (Optional) 1, to select only spy scans.
tag Int Coming Soon
Example Request
        
            POST /power/list?limit=10
        
    

Response

Success Response
  • Status Code: 200 OK

The response is a JSON array containing scan objects, each with the following attributes:

  • `id`(int): The unique identifier for the scan.
  • `name`(string): The name of the scan.
  • `date`(string): The date and time when the scan was performed in the format "YYYY-MM-DD HH:MM:SS".
Example Response
        
        [
          {
            "id": 1,
            "name": "Scan Number 1",
            "date": "2000-01-01 00:00:00"
          },
          {
            "id": 2,
            "name": "Scan Number 2",
            "date": "2000-01-02 00:00:00"
          }
        ]
        
    
Failure Response
  • 400 Bad Request You are missing required parameters.
  • 401 Unauthorized: Missing or incorrectly Authentication key & Secret.
  • 403 Forbidden: You do not have access to this data.
  • 404 Not Found: The provided endpoint or function provided is non-existent.
  • 422 Unprocessable Entity: Request method does not equal to POST.
  • 500 Internal Server Error: Server issues, best to contact support.

The `/power/list` endpoint allows you to retrieve a list of power scans that are attached to a specific kingdom. This endpoint provides information about each scan, including its unique identifier (id), name, and date of the scan.

Endpoint
  • URL: `/power/list`
  • Method: POST
Parameters
Name Type Description
id Int (Required) Unique identifier of the scan.
auth_keystrAuthentication key
secretstrSecret key
Example Request
        
            POST /power/data?id=1
        
    

Response

Success Response
  • Status Code: 200 OK

The response is a JSON array containing scan objects, each with the following attributes:

  • `scan_id`(int): The unique identifier for the scan.
  • `kingdom`(int): The # of the kingdom attached.
  • `power`(int): The scanned power value.
Example Response
        
        [
          {
            "id": 1,
            "kingdom": 0001,
            "power": 874653678492
          },
          {
            "id": 2,
            "kingdom": 0001,
            "power": 728654833334
          }
        ]
        
    
Failure Response
  • 400 Bad Request You are missing required parameters.
  • 401 Unauthorized: Missing or incorrectly Authentication key & Secret.
  • 403 Forbidden: You do not have access to this data.
  • 404 Not Found: The provided endpoint or function provided is non-existent.
  • 422 Unprocessable Entity: Request method does not equal to POST.
  • 500 Internal Server Error: Server issues, best to contact support.

Coming Soon
Rise of Stats All that you need to know

Pricing

Price Page Link
1 token 1.00

A token is used to buy data scans, power scans, and api interactions.

100 tokens 90.00

Buying by the bulk of 100 tokens gives you 10% discount.

200 tokens 170.00

Buying by the bulk of 100 tokens gives you 15% discount.

Interactive Panel

Get free access to our interactive panel with scheduling, analytics, and data management functions.

Learn more

Data & Power Scans

We can scan both your data and power, for your kingdom or perhaps you opponent / ally's data is more useful.

Learn more

API Access

Don't like our portal or want to extend functionalities? You can access your own data using our API!

Learn more