LogoHTTP Games

Dungeons

Start a new game by generating a dungeon.

If you haven't obtained a token yet, check out Authentication documentation.

Create a Dungeon

In a game of GridTrap, your goal is to escape from a dungeon by avoiding trapdoors.

To start a new game, send the following cURL request to create a new dungeon:

curl \
  -X POST \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  -H 'Content-Type: application/json' \
  -d '{
    "size": "4x4",
    "hardcore": false
  }' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons

Prop

Type

Get a Dungeon

This section is optional and not required for first playthrough.

Getting details about a dungeon can be done right after creating it, or anytime in the future. It is mostly useful to check the status of the game.

To see details of a dungeon you previously created, send the following request:

curl \
  -X GET \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons/[YOUR_DUNGEON_ID]

List All Dungeons

This section is optional and not required for first playthrough.

You can get a list of all dungeons you have created. This can be useful in many scenarios:

  • Counting how many dungeons you have escaped
  • Filtering all hardcore dungeons
  • Getting all unfinished dungeons of size 10x10
  • And a lot more...

To fetch a list of dungeons, send the following request:

curl \
  -X GET \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons

Prop

Type

As an example of a more complex search, if you wanted to get all unfinished dungeons of size 4x4 or 7x7 that are not hardcore, you could send the following request:

curl \
  -X GET \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  -d 'size=4x4,7x7' \
  -d 'hardcore=false' \
  -d 'status=started' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons

This endpoint also supports pagination using limit and cursor parameters. Learn more about it in the pagination documentation.