MENU navbar-image

Introduction

The Rule7 API provides access to game data, DMCA information, promotions, and other resources. All protected endpoints require authentication using a Bearer token.

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer Bearer YOUR_API_TOKEN".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your API token by visiting your user profile and generating a new token. Include the token in the Authorization header as: Bearer YOUR_API_TOKEN

Activity Logs

Get activity logs

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/activity-logs?search=user+login&causer_id=1&subject_type=App%5CModels%5CUser&event=created&date_from=2024-01-01&date_to=2024-01-31&ip_address=192.168.1.1&user_agent=Mozilla%2F5.0&page=1&per_page=15" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/activity-logs"
);

const params = {
    "search": "user login",
    "causer_id": "1",
    "subject_type": "App\Models\User",
    "event": "created",
    "date_from": "2024-01-01",
    "date_to": "2024-01-31",
    "ip_address": "192.168.1.1",
    "user_agent": "Mozilla/5.0",
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/activity-logs';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search' => 'user login',
            'causer_id' => '1',
            'subject_type' => 'App\Models\User',
            'event' => 'created',
            'date_from' => '2024-01-01',
            'date_to' => '2024-01-31',
            'ip_address' => '192.168.1.1',
            'user_agent' => 'Mozilla/5.0',
            'page' => '1',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/activity-logs'
params = {
  'search': 'user login',
  'causer_id': '1',
  'subject_type': 'App\Models\User',
  'event': 'created',
  'date_from': '2024-01-01',
  'date_to': '2024-01-31',
  'ip_address': '192.168.1.1',
  'user_agent': 'Mozilla/5.0',
  'page': '1',
  'per_page': '15',
}
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "log_name": "default",
            "description": "User logged in",
            "subject_type": "App\\Models\\User",
            "subject_id": 1,
            "causer_type": "App\\Models\\User",
            "causer_id": 1,
            "event": "login",
            "properties": {},
            "created_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "pagination": {
        "total": 100,
        "per_page": 15,
        "current_page": 1,
        "last_page": 7,
        "from": 1,
        "to": 15
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/activity-logs

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Search term for description, event, subject_type, or user details. Example: user login

causer_id   integer  optional  

Filter by user ID who performed the activity. Example: 1

subject_type   string  optional  

Filter by subject model type. Example: App\Models\User

event   string  optional  

Filter by event type. Example: created

date_from   string  optional  

Filter by date from (Y-m-d format). Example: 2024-01-01

date_to   string  optional  

Filter by date to (Y-m-d format). Example: 2024-01-31

ip_address   string  optional  

Filter by IP address. Example: 192.168.1.1

user_agent   string  optional  

Filter by user agent. Example: Mozilla/5.0

page   integer  optional  

Page number for paginated results. Example: 1

per_page   integer  optional  

Number of results per page. Example: 15

Get activity log filter options

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/activity-logs/filter-options" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/activity-logs/filter-options"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/activity-logs/filter-options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/activity-logs/filter-options'
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": {
        "subject_types": [
            "App\\Models\\User",
            "App\\Models\\Game",
            "App\\Models\\Paste"
        ],
        "events": [
            "created",
            "updated",
            "deleted",
            "login",
            "logout"
        ],
        "causers": [
            {
                "id": 1,
                "name": "John Doe",
                "email": "john@example.com"
            }
        ]
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/activity-logs/filter-options

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Get activity log statistics

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/activity-logs/statistics" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/activity-logs/statistics"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/activity-logs/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/activity-logs/statistics'
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": {
        "total_logs": 1000,
        "logs_today": 25,
        "logs_this_week": 150,
        "logs_this_month": 500,
        "top_events": [
            {
                "event": "login",
                "count": 300
            },
            {
                "event": "updated",
                "count": 200
            }
        ],
        "top_users": [
            {
                "user_id": 1,
                "name": "John Doe",
                "count": 50
            }
        ]
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/activity-logs/statistics

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Get activity logs for a specific user

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/activity-logs/user/1?page=1&per_page=15" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/activity-logs/user/1"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/activity-logs/user/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/activity-logs/user/1'
params = {
  'page': '1',
  'per_page': '15',
}
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "log_name": "default",
            "description": "User logged in",
            "subject_type": "App\\Models\\User",
            "subject_id": 1,
            "causer_type": "App\\Models\\User",
            "causer_id": 1,
            "event": "login",
            "properties": {},
            "created_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "pagination": {
        "total": 50,
        "per_page": 15,
        "current_page": 1,
        "last_page": 4,
        "from": 1,
        "to": 15
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/activity-logs/user/{userId}

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

userId   integer   

User ID. Example: 1

Query Parameters

page   integer  optional  

Page number for paginated results. Example: 1

per_page   integer  optional  

Number of results per page. Example: 15

Get activity logs for a specific model

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/activity-logs/model/App\Models\User/1?page=1&per_page=15" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/activity-logs/model/App\Models\User/1"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/activity-logs/model/App\Models\User/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/activity-logs/model/App\Models\User/1'
params = {
  'page': '1',
  'per_page': '15',
}
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "log_name": "default",
            "description": "User updated",
            "subject_type": "App\\Models\\User",
            "subject_id": 1,
            "causer_type": "App\\Models\\User",
            "causer_id": 2,
            "event": "updated",
            "properties": {},
            "created_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "pagination": {
        "total": 25,
        "per_page": 15,
        "current_page": 1,
        "last_page": 2,
        "from": 1,
        "to": 15
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/activity-logs/model/{modelType}/{modelId}

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

modelType   string   

Model class name. Example: App\Models\User

modelId   integer   

Model instance ID. Example: 1

Query Parameters

page   integer  optional  

Page number for paginated results. Example: 1

per_page   integer  optional  

Number of results per page. Example: 15

Get specific activity log by ID

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/activity-logs/1" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/activity-logs/1"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/activity-logs/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/activity-logs/1'
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": {
        "id": 1,
        "log_name": "default",
        "description": "User logged in",
        "subject_type": "App\\Models\\User",
        "subject_id": 1,
        "causer_type": "App\\Models\\User",
        "causer_id": 1,
        "event": "login",
        "properties": {},
        "created_at": "2024-01-01T00:00:00.000000Z"
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (404):


{
    "error": "Activity log not found"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/activity-logs/{id}

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

Activity log ID. Example: 1

DMCA

Get all DMCA entries

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/dmca" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/dmca"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/dmca';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/dmca'
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "title": "Game Title",
            "description": "DMCA takedown notice",
            "url": "https://example.com",
            "created_at": "2024-01-01T00:00:00.000000Z",
            "updated_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "meta": {
        "current_page": 1,
        "total": 25,
        "per_page": 15
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/dmca

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Endpoints

GET api/health

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/health" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/health"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/health';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/health'
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "status": "ok",
    "timestamp": "2025-10-21T15:07:11.068033Z"
}
 

Request      

GET api/health

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/debug/jwt

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/debug/jwt" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/debug/jwt"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/debug/jwt';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/debug/jwt'
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": "Invalid JWT format",
    "parts": 1
}
 

Request      

GET api/debug/jwt

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/test

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/test" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/test"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/test';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/test'
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

Show headers
content-type: text/html; charset=UTF-8
cache-control: no-cache, private
access-control-allow-origin: *
set-cookie: XSRF-TOKEN=eyJpdiI6ImNFTElCa2plU01jWFc2MlJWVVQwOEE9PSIsInZhbHVlIjoiSW93UkZKZHpVeldWczMybzRuVGxyVU5QbTA2VkRKaEQ2Y3NPOEhlaUtXQldHZ3RwY2U0RzFjTnR4WEV6WEF3MDRoR3RLZVZoc1JST1d6cWNjZ0UvVXlJODdMSkpvemJ2bUxhOGh5ZWZnN2tMb3Q5ejF5c2tsZU1hMTd4c2JkZjkiLCJtYWMiOiJlZTYzNTk3OWRiYWMxYzFlZjE0YzNlODNjMjM1ZmFjMGM3MGYyNzI1ODQ0MGJhNGRhNzBjNmM5M2RiMDY4YTdmIiwidGFnIjoiIn0%3D; expires=Tue, 21 Oct 2025 17:07:11 GMT; Max-Age=7200; path=/; samesite=lax; rule7-repo-session=eyJpdiI6IlhHTlJrZ2RTV3dtUGhFOFhQZzZDL1E9PSIsInZhbHVlIjoiTTBzZmROTEdLbnQ0Z0wvRkJUbTQ2cHE1ZlIvcFBxMFdDaWhhODZTMFR3UHp1U0czQTZXYmdSVTJUQ0s4MWQ5cnhEWTliU2xaZkRzMEZicWxwQ1FJM1JzZVpxM2pOeEN1aG1qT2Q1KzZKaFJJVnIwbDkrc1B4RFltYUVyKzEya08iLCJtYWMiOiI0ZTZhZTZmMmQ1YTVlMWFlYzZhZTBiZTIzNTQxOTBlYWZkY2E1YTkxMTQyZDk2ZmQ1Yjg2NmExMmNkMTQzNGI0IiwidGFnIjoiIn0%3D; expires=Tue, 21 Oct 2025 17:07:11 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

Scribe test route working
 

Request      

GET api/test

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Games

Get all games

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/games?sort=asc&orderBy=game_name&select=id%2Cgame_name%2Cauthor&page=1&game_name=Amazing+Game&author=John+Doe&isAuthorBanned=" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/games"
);

const params = {
    "sort": "asc",
    "orderBy": "game_name",
    "select": "id,game_name,author",
    "page": "1",
    "game_name": "Amazing Game",
    "author": "John Doe",
    "isAuthorBanned": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/games';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort' => 'asc',
            'orderBy' => 'game_name',
            'select' => 'id,game_name,author',
            'page' => '1',
            'game_name' => 'Amazing Game',
            'author' => 'John Doe',
            'isAuthorBanned' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/games'
params = {
  'sort': 'asc',
  'orderBy': 'game_name',
  'select': 'id,game_name,author',
  'page': '1',
  'game_name': 'Amazing Game',
  'author': 'John Doe',
  'isAuthorBanned': '0',
}
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "game_name": "Amazing Game",
            "author": "John Doe",
            "description": "A great game description",
            "isAuthorBanned": false,
            "created_at": "2024-01-01T00:00:00.000000Z",
            "updated_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "meta": {
        "current_page": 1,
        "total": 100,
        "per_page": 15
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/games

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sort   string  optional  

Sort order for results. Example: asc

orderBy   string  optional  

Field to order the results by. Example: game_name

select   string  optional  

Comma-separated list of fields to include. Example: id,game_name,author

page   integer  optional  

Page number for paginated results. Example: 1

game_name   string  optional  

Filter by game name. Example: Amazing Game

author   string  optional  

Filter by author name. Example: John Doe

isAuthorBanned   boolean  optional  

Filter by author banned status. Example: false

Create a new game from userscript

requires authentication

Example request:
curl --request POST \
    "http://rule7.zonies.test/api/games/ban" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"game_name\": \"\\\"Sinful Horizon [v0.1]\\\"\",
    \"author\": \"\\\"Narria\\\"\",
    \"reason\": \"\\\"Rule7 2D Unrealistic\\\"\",
    \"ruling\": \"\\\"Perma-Banned\\\"\",
    \"approved\": \"\\\"banned\\\"\",
    \"isAuthorBanned\": false,
    \"others_link\": \"\\\"https:\\/\\/f95zone.to\\/threads\\/sinful-horizon-v0-1-narria.274458\\/\\\"\",
    \"custom_reason\": \"\\\"Custom violation\\\"\",
    \"custom_ruling\": \"\\\"Custom decision\\\"\"
}"
const url = new URL(
    "http://rule7.zonies.test/api/games/ban"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "game_name": "\"Sinful Horizon [v0.1]\"",
    "author": "\"Narria\"",
    "reason": "\"Rule7 2D Unrealistic\"",
    "ruling": "\"Perma-Banned\"",
    "approved": "\"banned\"",
    "isAuthorBanned": false,
    "others_link": "\"https:\/\/f95zone.to\/threads\/sinful-horizon-v0-1-narria.274458\/\"",
    "custom_reason": "\"Custom violation\"",
    "custom_ruling": "\"Custom decision\""
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/games/ban';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'game_name' => '"Sinful Horizon [v0.1]"',
            'author' => '"Narria"',
            'reason' => '"Rule7 2D Unrealistic"',
            'ruling' => '"Perma-Banned"',
            'approved' => '"banned"',
            'isAuthorBanned' => false,
            'others_link' => '"https://f95zone.to/threads/sinful-horizon-v0-1-narria.274458/"',
            'custom_reason' => '"Custom violation"',
            'custom_ruling' => '"Custom decision"',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/games/ban'
payload = {
    "game_name": "\"Sinful Horizon [v0.1]\"",
    "author": "\"Narria\"",
    "reason": "\"Rule7 2D Unrealistic\"",
    "ruling": "\"Perma-Banned\"",
    "approved": "\"banned\"",
    "isAuthorBanned": false,
    "others_link": "\"https:\/\/f95zone.to\/threads\/sinful-horizon-v0-1-narria.274458\/\"",
    "custom_reason": "\"Custom violation\"",
    "custom_ruling": "\"Custom decision\""
}
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
    "success": true,
    "message": "Game banned successfully",
    "data": {
        "rule_id": 123,
        "game_name": "Sinful Horizon [v0.1]",
        "author": "Narria",
        "approved": "banned"
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "game_name": [
            "The game name field is required."
        ],
        "author": [
            "The author field is required."
        ]
    }
}
 

Example response (500):


{
    "success": false,
    "message": "An error occurred while banning the game"
}
 

Request      

POST api/games/ban

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

game_name   string   

The name of the game. Example: "Sinful Horizon [v0.1]"

author   string   

The author/developer name. Example: "Narria"

reason   string   

The reason for banning. Example: "Rule7 2D Unrealistic"

ruling   string   

The ruling decision. Example: "Perma-Banned"

approved   string  optional  

The approval status. Example: "banned"

isAuthorBanned   boolean  optional  

Whether the author is banned. Example: false

others_link   string  optional  

The F95Zone thread URL. Example: "https://f95zone.to/threads/sinful-horizon-v0-1-narria.274458/"

custom_reason   string  optional  

Custom reason if reason is "custom". Example: "Custom violation"

custom_ruling   string  optional  

Custom ruling if ruling is "custom". Example: "Custom decision"

Paste

Upload a paste via API

requires authentication

Example request:
curl --request POST \
    "http://rule7.zonies.test/api/paste" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"console.log(\'Hello World\');\",
    \"language\": \"javascript\"
}"
const url = new URL(
    "http://rule7.zonies.test/api/paste"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "console.log('Hello World');",
    "language": "javascript"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/paste';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'console.log(\'Hello World\');',
            'language' => 'javascript',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/paste'
payload = {
    "content": "console.log('Hello World');",
    "language": "javascript"
}
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "message": "Paste uploaded successfully",
    "data": {
        "slug": "abc123def",
        "url": "https://rule7.zonies.xyz/paste/abc123def"
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "content": [
            "The content field is required."
        ],
        "language": [
            "The language may not be greater than 50 characters."
        ]
    }
}
 

Example response (500):


{
    "error": "Internal server error: Error message details"
}
 

Request      

POST api/paste

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

content   string   

The content of the paste. Example: console.log('Hello World');

language   string  optional  

The programming language for syntax highlighting. Example: javascript

Promotions

Get all promotions

requires authentication

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/promotions?thread_id=12345&dev_name=John+Doe" \
    --header "Authorization: Bearer Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/promotions"
);

const params = {
    "thread_id": "12345",
    "dev_name": "John Doe",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/promotions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'thread_id' => '12345',
            'dev_name' => 'John Doe',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/promotions'
params = {
  'thread_id': '12345',
  'dev_name': 'John Doe',
}
headers = {
  'Authorization': 'Bearer Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "thread_id": "12345",
            "dev_name": "John Doe",
            "title": "Amazing Game",
            "description": "A great game description",
            "created_at": "2024-01-01T00:00:00.000000Z",
            "updated_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "meta": {
        "current_page": 1,
        "total": 50,
        "per_page": 15
    }
}
 

Example response (401):


{
    "error": "Unauthorized",
    "message": "Invalid or missing API token"
}
 

Example response (500):


{
    "error": "Internal server error"
}
 

Request      

GET api/promotions

Headers

Authorization      

Example: Bearer Bearer YOUR_API_TOKEN

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

thread_id   string  optional  

Filter by thread ID. Example: 12345

dev_name   string  optional  

Filter by developer name. Example: John Doe

Statistics

Get game statistics

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/stats/games" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/stats/games"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/stats/games';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/stats/games'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "total_games": 1000,
    "games_this_month": 50,
    "games_this_week": 10,
    "games_today": 2,
    "top_authors": [
        {
            "author": "John Doe",
            "count": 25
        }
    ],
    "banned_authors": 5,
    "active_authors": 95
}
 

Example response (500):


{
    "error": "Error fetching game statistics: Error message details"
}
 

Request      

GET api/stats/games

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get DMCA statistics

Example request:
curl --request GET \
    --get "http://rule7.zonies.test/api/stats/dmca" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://rule7.zonies.test/api/stats/dmca"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://rule7.zonies.test/api/stats/dmca';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://rule7.zonies.test/api/stats/dmca'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "total_dmca": 25,
    "dmca_this_month": 2,
    "dmca_this_week": 1,
    "dmca_today": 0,
    "recent_dmca": [
        {
            "id": 1,
            "title": "Game Title",
            "description": "DMCA takedown notice",
            "url": "https://example.com",
            "created_at": "2024-01-01T00:00:00.000000Z"
        }
    ]
}
 

Example response (500):


{
    "error": "Error fetching DMCA statistics: Error message details"
}
 

Request      

GET api/stats/dmca

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json