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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.