1.0.0OAS 3.1

This API allows writing down marks on a Tic Tac Toe board
and requesting the state of the board or of individual squares.

API Base URL
Security
defaultApiKey (apiKey)

API key provided in console

basicHttpAuthentication (http)

Basic HTTP Authentication

bearerHttpAuthentication (http)

Bearer token using a JWT

app2AppOauth (oauth2)

Client Credentials OAuth Flow

Token URL: https://learn.openapis.org/oauth/2.0/token

Scopes:

  • board:read - Read the board
user2AppOauth (oauth2)

Authorization Code OAuth Flow

Authorize URL: https://learn.openapis.org/oauth/2.0/auth

Token URL: https://learn.openapis.org/oauth/2.0/token

Scopes:

  • board:read - Read the board
  • board:write - Write to the board

Gameplay

Get the whole board

Retrieves the current state of the board and the winner.

get
/board

Response

200 application/json

OK

status

winnerstring

Winner of the game. . means nobody has won yet.

Allowed values:.XO

Example:.

boardarray[array]

>= 3 items<= 3 items

200 application/json

Get a single board square

Retrieves the requested square.

get
/board/{row}/{column}

Path Parameters

rowintegerrequired

Board row (vertical coordinate)

>= 1<= 3

Example:1

columnintegerrequired

Board column (horizontal coordinate)

>= 1<= 3

Example:1

Response

application/json

OK

mark

markstring

Possible values for a board square. . means empty square.

Allowed values:.XO

application/json

Set a single board square

Places a mark on the board and retrieves the whole board and the winner (if any).

put
/board/{row}/{column}

Path Parameters

rowintegerrequired

Board row (vertical coordinate)

>= 1<= 3

Example:1

columnintegerrequired

Board column (horizontal coordinate)

>= 1<= 3

Example:1

Body

application/json

mark

markstring

Possible values for a board square. . means empty square.

Allowed values:.XO

Response

application/json

OK

status

winnerstring

Winner of the game. . means nobody has won yet.

Allowed values:.XO

Example:.

boardarray[array]

>= 3 items<= 3 items

application/json