Introduction
API do zarządzania kampaniami TTRPG, treściami, mapami, kartami postaci i podręcznikami.
Integracje Mistrza Gry używają tokenów Sanctum z odpowiednimi uprawnieniami. Gracze korzystają z zalogowanej sesji lub tokenu zwróconego podczas logowania. Dostęp do treści kart postaci wymaga dodatkowego, krótkotrwałego tokenu odblokowania PIN.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {TWÓJ_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
MG tworzy token w panelu Integracje API. Token jest wyświetlany tylko raz.
Authentication
Registration and short-lived application sessions.
Register an account.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"email\": \"zbailey@example.net\",
\"password\": \"-0pBNvYgxw\",
\"role\": \"architecto\",
\"device_name\": \"n\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"email": "zbailey@example.net",
"password": "-0pBNvYgxw",
"role": "architecto",
"device_name": "n"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Log in and issue a two-hour token.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"|]|{+-\",
\"device_name\": \"v\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"password": "|]|{+-",
"device_name": "v"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Log out the current session or revoke its token.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/logout" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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/v1/me
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/me" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/me"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GM
Campaigns and memberships Manage campaigns owned by the authenticated game master.
GET api/v1/gm/campaigns
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/campaigns
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"description\": \"Et animi quos velit et fugiat.\",
\"is_archived\": false
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"description": "Et animi quos velit et fugiat.",
"is_archived": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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/v1/gm/campaigns/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/campaigns/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"description\": \"Et animi quos velit et fugiat.\",
\"is_archived\": true,
\"regenerate_invite_code\": false
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"description": "Et animi quos velit et fugiat.",
"is_archived": true,
"regenerate_invite_code": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
DELETE api/v1/gm/campaigns/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
List campaign members.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/1/members" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/1/members"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
Add or update a campaign membership.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/1/members" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"user_id\": 16,
\"email\": \"zbailey@example.net\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/1/members"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"user_id": 16,
"email": "zbailey@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Remove a campaign member.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/1/members/2" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/1/members/2"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
Content and assets Manage campaign notes, locations, NPCs, items, quests, and image assets.
GET api/v1/gm/campaigns/{campaign}/contents
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/campaigns/{campaign}/contents
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/contents/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/campaigns/{campaign}/contents/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());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.
DELETE api/v1/gm/campaigns/{campaign}/contents/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/contents/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
Upload a campaign image.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/assets" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "image=@G:\projekty\php\ttrpg-manager\storage\app\tmp\php8C14.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/assets"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Maps and time Manage maps, map pins, time trackers, and tracker entries.
GET api/v1/gm/campaigns/{campaign}/maps
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/campaigns/{campaign}/maps
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"image_asset_id\": 16,
\"title\": \"n\",
\"description\": \"Animi quos velit et fugiat.\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image_asset_id": 16,
"title": "n",
"description": "Animi quos velit et fugiat."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/maps/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/campaigns/{campaign}/maps/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"image_asset_id\": 16,
\"title\": \"n\",
\"description\": \"Animi quos velit et fugiat.\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image_asset_id": 16,
"title": "n",
"description": "Animi quos velit et fugiat."
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
DELETE api/v1/gm/campaigns/{campaign}/maps/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/maps/{map}/pins
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/campaigns/{campaign}/maps/{map}/pins
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/maps/{map}/pins/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/campaigns/{campaign}/maps/{map}/pins/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());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.
DELETE api/v1/gm/campaigns/{campaign}/maps/{map}/pins/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/maps/architecto/pins/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/trackers
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/campaigns/{campaign}/trackers
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/trackers/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/campaigns/{campaign}/trackers/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());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.
DELETE api/v1/gm/campaigns/{campaign}/trackers/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/trackers/{tracker}/entries
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/campaigns/{campaign}/trackers/{tracker}/entries
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/trackers/{tracker}/entries/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/campaigns/{campaign}/trackers/{tracker}/entries/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());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.
DELETE api/v1/gm/campaigns/{campaign}/trackers/{tracker}/entries/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/trackers/architecto/entries/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
Character sheets Manage all character sheets in owned campaigns. PIN hashes are never returned.
GET api/v1/gm/campaigns/{campaign}/sheets
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/campaigns/{campaign}/sheets
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"owner_user_id\": 16,
\"name\": \"n\",
\"content_html\": \"g\",
\"pin\": \"1374491716\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"owner_user_id": 16,
"name": "n",
"content_html": "g",
"pin": "1374491716"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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/v1/gm/campaigns/{campaign}/sheets/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/campaigns/{campaign}/sheets/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"owner_user_id\": 16,
\"name\": \"n\",
\"content_html\": \"g\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"owner_user_id": 16,
"name": "n",
"content_html": "g"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
DELETE api/v1/gm/campaigns/{campaign}/sheets/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
Set a new PIN and revoke all existing sheet unlocks.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto/pin" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pin\": \"1374491716\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/campaigns/architecto/sheets/architecto/pin"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pin": "1374491716"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Handbooks Upload private PDFs, inspect processing metadata, and search extracted pages.
GET api/v1/gm/handbooks
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/handbooks" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
Upload a private PDF and queue text extraction.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/handbooks" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "title=b"\
--form "campaign_id=16"\
--form "language=ngzm"\
--form "pdf=@G:\projekty\php\ttrpg-manager\storage\app\tmp\php8C73.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('title', 'b');
body.append('campaign_id', '16');
body.append('language', 'ngzm');
body.append('pdf', document.querySelector('input[name="pdf"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Search ready handbooks using SQLite FTS5.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/handbooks/search" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"query\": \"b\",
\"handbook_ids\": [
16
],
\"limit\": 2
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks/search"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"query": "b",
"handbook_ids": [
16
],
"limit": 2
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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/v1/gm/handbooks/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/handbooks/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
PUT api/v1/gm/handbooks/{id}
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/gm/handbooks/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"b\",
\"campaign_id\": 16,
\"language\": \"ngzm\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "b",
"campaign_id": 16,
"language": "ngzm"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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/v1/gm/handbooks/{handbook}/pages
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/handbooks/architecto/pages" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks/architecto/pages"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
Mint a temporary signed URL to open the PDF inline (no Bearer on the URL itself).
requires authentication
Use the returned url in an iframe, new tab, or window.open. Optional #page=N
is appended for native browser PDF viewers.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/handbooks/architecto/preview-link?page=12&expires_in=600" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"page\": 16,
\"expires_in\": 61
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks/architecto/preview-link"
);
const params = {
"page": "12",
"expires_in": "600",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"page": 16,
"expires_in": 61
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
DELETE api/v1/gm/handbooks/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/handbooks/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/handbooks/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
API tokens Manage persistent, ability-scoped GM integration tokens. Plain text is returned only once.
GET api/v1/gm/tokens
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/gm/tokens" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/tokens"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/gm/tokens
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/gm/tokens" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"abilities\": [
\"architecto\"
],
\"expires_in_days\": 2
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/tokens"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"abilities": [
"architecto"
],
"expires_in_days": 2
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
DELETE api/v1/gm/tokens/{id}
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/gm/tokens/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/gm/tokens/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
Player
Campaigns List joined campaigns and join a campaign using its invitation code.
GET api/v1/player/campaigns
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
Join a campaign.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/player/campaigns/join" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"invite_code\": \"ABCDE12345\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/join"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"invite_code": "ABCDE12345"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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/v1/player/campaigns/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
Campaign data Read player-visible campaign content, maps, pins, and time trackers.
GET api/v1/player/campaigns/{campaign}/contents
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/contents" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/contents"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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/v1/player/campaigns/{campaign}/contents/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/contents/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/contents/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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/v1/player/campaigns/{campaign}/maps
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/maps" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/maps"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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/v1/player/campaigns/{campaign}/maps/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/maps/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/maps/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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/v1/player/campaigns/{campaign}/maps/{map}/pins
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/maps/architecto/pins" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/maps/architecto/pins"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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/v1/player/campaigns/{campaign}/trackers
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/trackers" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/trackers"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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/v1/player/campaigns/{campaign}/trackers/{id}
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/trackers/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/trackers/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
Character sheets Sheet metadata is campaign-visible. Content requires a short-lived token in X-Sheet-Unlock.
GET api/v1/player/campaigns/{campaign}/sheets
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/v1/player/campaigns/{campaign}/sheets
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"content_html\": \"n\",
\"pin\": \"1374491716\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"content_html": "n",
"pin": "1374491716"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
POST api/v1/player/campaigns/{campaign}/sheet-assets
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheet-assets" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "image=@G:\projekty\php\ttrpg-manager\storage\app\tmp\php8CC3.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheet-assets"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Verify a PIN and issue a 15-minute sheet unlock.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto/verify-pin" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pin\": \"1374491716\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto/verify-pin"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pin": "1374491716"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (422):
{
"message": "Podany PIN jest nieprawidłowy.",
"errors": {
"pin": [
"Podany PIN jest nieprawidłowy."
]
}
}
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.
Open a sheet.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "X-Sheet-Unlock: required Short-lived sheet unlock token." \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"X-Sheet-Unlock": "required Short-lived sheet unlock token.",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
Update an owned sheet.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "X-Sheet-Unlock: required An unlock token with edit ability." \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"content_html\": \"n\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"X-Sheet-Unlock": "required An unlock token with edit ability.",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"content_html": "n"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Delete an owned sheet.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto" \
--header "Authorization: Bearer {TWÓJ_TOKEN}" \
--header "X-Sheet-Unlock: required An unlock token with edit ability." \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/player/campaigns/architecto/sheets/architecto"
);
const headers = {
"Authorization": "Bearer {TWÓJ_TOKEN}",
"X-Sheet-Unlock": "required An unlock token with edit ability.",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.