Introduction
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
This API is not authenticated.
Endpoints
Génère un nouveau token pour l’usager connecté.
Réponse JSON : { "token": "..." }
Example request:
curl --request POST \
"http://localhost/api/auth/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/auth/token"
);
const headers = {
"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.
(Optionnel) renouveler le token : ici on en crée juste un nouveau.
Example request:
curl --request POST \
"http://localhost/api/auth/token/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/auth/token/refresh"
);
const headers = {
"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/jeux Liste de tous les jeux.
Example request:
curl --request GET \
--get "http://localhost/api/jeux" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/jeux"
);
const headers = {
"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: *
set-cookie: XSRF-TOKEN=eyJpdiI6IkFzdm1HakRNTVQzMTRsZjIvbFpuZ3c9PSIsInZhbHVlIjoiK3VuS2tScTRDY2Z1MHRVYUJJQ1ROVlhaOGtMMjZNUHNsOWxlSW4ydWhMZzFPbm5VdFFaU1l0UHlreUx6UmVKVGNDNDNIeElXNUNjamJOWXBKa3FBSEFhUDBMdzZaeVd5OG80WHFsQUo0Zzh5V3huU0tDam5rUEtOcU12ZCs2VEgiLCJtYWMiOiJiMjJjY2M1MmQwNWI1NzgxM2M0Zjc3Y2Y2OTI3OTIzOWQxNmY4OTgwMmZiZTAzY2Y0ZDY0ZGNlZjIxZGM5ODM0IiwidGFnIjoiIn0%3D; expires=Wed, 10 Dec 2025 15:48:33 GMT; Max-Age=7200; path=/; samesite=lax; laravel-session=eyJpdiI6ImZrYVhodW9aUEprMVMyWVUya2pMVXc9PSIsInZhbHVlIjoidE9JWDBDVkVBQ2VxVDFNM1IyNlZUcGNVWWhsb2Vtb1RaQjBQYUxzZTUzYnRRc2ltd3J3RTNTTnJWakM3K0Q0bmMyTzdqYXE1UUNnaW8wYy9TTndCeTJrRE45b0lHS05ndnBqU2JUbWYyM0ZBZ05Wb2cwY3I3dDJFWGZtaCs4R1YiLCJtYWMiOiI1MWM1NTEwNTA4M2E4ZTRjNjJkZjM3YzMyNWY3ZTIzY2IzNTg0ZjVhMjYxYzdkZDcxMTg3MzcyZTNkOTRiNWM3IiwidGFnIjoiIn0%3D; expires=Wed, 10 Dec 2025 15:48:33 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Token manquant"
}
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/jeux/{jeu} Zoom sur un jeu : détails + créateurs + galeries + TOUTES les personnes qui l'ont téléchargé.
Example request:
curl --request GET \
--get "http://localhost/api/jeux/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/jeux/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "The route api/jeux/architecto could not be found."
}
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.