Maze REST Web API (1.0.0)

Download OpenAPI specification:

License: MIT

RESTful Web API for managing and solving mazes

Maze Web API v1

Version 1 of the Maze Web API

v1

Returns the list of available mazes

This endpoint returns the list of maze IDs, names and (optionally) their definitions that the user currently has access to

Authorizations:
api_key
query Parameters
includeDefinitions
required
boolean

Include the definitions for the mazes (default: false)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creates a new maze

This endpoint creates a new maze and, if successful, returns the newly created maze object containing its allocated ID

Authorizations:
api_key
Request Body schema: application/json
required
required
object (MazeDefinition)

MazeDefinition, containing the layout of the maze

id
required
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "definition": {
    },
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "definition": {
    },
  • "id": "string",
  • "name": "string"
}

Loads an existing maze

This endpoint attempts to load a maze given its ID and, if successful, returns the maze definition

Authorizations:
api_key
path Parameters
id
required
string

Unique ID of the maze to retrieve

Responses

Response samples

Content type
application/json
{
  • "definition": {
    },
  • "id": "string",
  • "name": "string"
}

Updates an existing maze

This endpoint attempts to update an existing maze given its ID and, if successful, returns the updated maze definition

Authorizations:
api_key
path Parameters
id
required
string

Unique ID of the maze to update

Request Body schema: application/json
required
required
object (MazeDefinition)

MazeDefinition, containing the layout of the maze

id
required
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "definition": {
    },
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "definition": {
    },
  • "id": "string",
  • "name": "string"
}

Deletes an existing maze

This endpoint attempts to delete an existing maze given its ID

Authorizations:
api_key
path Parameters
id
required
string

Unique ID of the maze to delete

Responses

Attempts to solve an existing maze

This endpoint attempts to solve a maze given its ID and, if successful, returns a maze solution containing the solution path

Authorizations:
api_key
path Parameters
id
required
string

Unique ID of the maze to solve

Responses

Response samples

Content type
application/json
{
  • "path": {
    }
}

Attempts to solve a maze definition that is supplied by the caller

This endpoint attempts to solve a maze definition that is supplied by the caller and, if successful, returns a maze solution containing the solution path

Authorizations:
api_key
Request Body schema: application/json
required
required
object (MazeDefinition)

MazeDefinition, containing the layout of the maze

id
required
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "definition": {
    },
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "path": {
    }
}

Returns the list of registered users

This endpoint returns the list of register users

Authorizations:
api_key

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creates a new user

This endpoint creates a new user and, if successful, returns the newly created user item containing its allocated ID

Authorizations:
api_key
Request Body schema: application/json
required
email
required
string

Email address

full_name
required
string

Full name

is_admin
required
boolean

Is administrator?

password
required
string

Password

username
required
string

Username

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "full_name": "string",
  • "is_admin": true,
  • "password": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "full_name": "string",
  • "id": "string",
  • "is_admin": true,
  • "username": "string"
}

Loads an existing user

This endpoint attempts to load a user item given its ID and, if successful, returns the details

Authorizations:
api_key
path Parameters
id
required
string

Unique ID of the user to retrieve

Responses

Response samples

Content type
application/json
{
  • "email": "string",
  • "full_name": "string",
  • "id": "string",
  • "is_admin": true,
  • "username": "string"
}

Updates an existing user

This endpoint attempts to update an existing user given its ID and, if successful, returns the updated details

Authorizations:
api_key
path Parameters
id
required
string

Unique ID of the user to update

Request Body schema: application/json
required
email
required
string

Email address

full_name
required
string

Full name

is_admin
required
boolean

Is administrator?

username
required
string

Username

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "full_name": "string",
  • "is_admin": true,
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "full_name": "string",
  • "id": "string",
  • "is_admin": true,
  • "username": "string"
}

Deletes an existing user

This endpoint attempts to delete an existing user given its ID

Authorizations:
api_key
path Parameters
id
required
string

Unique ID of the user to delete

Responses