Project era inventory api: Difference between revisions

From Delft Solutions
Jump to navigation Jump to search
(Created page with "== Project ERA inventory API == This page describes interaction with the API. === Signed URLs === Some resources get signed with an HMAC for additional security, for example,...")
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
This page describes interaction with the API.
This page describes interaction with the API.


=== Signed URLs ===
=== Authenticate Player Session ===
Some resources get signed with an HMAC for additional security, for example, when checking player information it will look something like this:
Used to validate player and start a playing session
/api/<HMAC KEY>/players/:uuid


=== Authentication ===
==== CREATE ====
Used to authenticate players.
Requires:
  POST /api/authenticate_session
application/vnd.projectera.steam_auth_session.v1.create+json
;Accepts:
Returns:
: application/vnd.projectera.auth_session.v1+json
Redirect to player
;Returns:
 
: Redirection to player info
=== Buildings ===
Used to view and interact with buildings
 
==== SHOW ====
Returns:
application/vnd.projectera.building.v1+json
 
=== Characters ===
Used to view and manage characters
 
==== CREATE ====
Requires:
  application/vnd.projectera.character.v1.create+json
Returns:
Redirect to created character
 
==== INDEX ====
Returns:
application/vnd.projectera.character.v1.index+json
 
==== SHOW ====
Returns:
application/vnd.projectera.character.v1+json
 
=== Configuration ===
Main source for API traversal, lists the resources available to the current (authenticated) user.
 
==== SHOW ====
Returns:
application/vnd.projectera.configuration.v1+json
 
=== Inventory ===
Used to view and manage items.
 
==== SHOW ====
Returns:
application/vnd.projectera.inventory.v1+json


=== Players ===
=== Players ===
Used to retrieve player information
Used to retrieve player information


=== Characters ===
==== SHOW ====
Used to manage characters.
Returns:
application/vnd.projectera.player.v1+json
 
=== Universe ===
Used to retrieve universe information
 
==== SHOW ====
Returns:
application/vnd.projectera.universe.v1+json
 
== Mediatypes ==
 
=== Building ===
application/vnd.projectera.building.v1+json
Root key:
building
Contents:
None
Links:
inventory
universe
self
 
=== Character ===
application/vnd.projectera.character.v1+json
Root key:
character
Contents:
None
Links:
inventory
player
self
 
==== Create ====
application/vnd.projectera.character.v1.create+json
Root key:
character
Contents:
name: String
 
==== Index ====
application/vnd.projectera.character.v1.index+json
Root key:
characters
Contents:
_index: Array of objects containing links to characters
 
=== Configuration ===
application/vnd.projectera.configuration.v1+json
Root key:
configuration
Contents:
None
Links:
self
authenticate_session
 
=== Inventory ===
application/vnd.projectera.inventory.v1+json
Root key:
inventory
Contents:
None
Links:
building (optional)
character (optional)
self
 
=== Player ===
application/vnd.projectera.player.v1+json
Root key:
player
Contents:
None
Links:
characters
self
 
=== Steam Auth Session ===
application/vnd.projectera.steam_auth_session.v1.create+json
Root key:
auth_session
Contents:
auth_session_ticket: String


=== Items ===
=== Universe ===
Used to manage items.
application/vnd.projectera.universe.v1+json
Root key:
universe
Contents:
None
Links:
buildings
self

Latest revision as of 02:19, 11 August 2020

Project ERA inventory API

This page describes interaction with the API.

Authenticate Player Session

Used to validate player and start a playing session

CREATE

Requires:

application/vnd.projectera.steam_auth_session.v1.create+json

Returns:

Redirect to player

Buildings

Used to view and interact with buildings

SHOW

Returns:

application/vnd.projectera.building.v1+json

Characters

Used to view and manage characters

CREATE

Requires:

application/vnd.projectera.character.v1.create+json

Returns:

Redirect to created character

INDEX

Returns:

application/vnd.projectera.character.v1.index+json

SHOW

Returns:

application/vnd.projectera.character.v1+json

Configuration

Main source for API traversal, lists the resources available to the current (authenticated) user.

SHOW

Returns:

application/vnd.projectera.configuration.v1+json

Inventory

Used to view and manage items.

SHOW

Returns:

application/vnd.projectera.inventory.v1+json

Players

Used to retrieve player information

SHOW

Returns:

application/vnd.projectera.player.v1+json

Universe

Used to retrieve universe information

SHOW

Returns:

application/vnd.projectera.universe.v1+json

Mediatypes

Building

application/vnd.projectera.building.v1+json

Root key:

building

Contents:

None

Links:

inventory
universe
self

Character

application/vnd.projectera.character.v1+json

Root key:

character

Contents:

None

Links:

inventory
player
self

Create

application/vnd.projectera.character.v1.create+json

Root key:

character

Contents:

name: String

Index

application/vnd.projectera.character.v1.index+json

Root key:

characters

Contents:

_index: Array of objects containing links to characters

Configuration

application/vnd.projectera.configuration.v1+json

Root key:

configuration

Contents:

None

Links:

self
authenticate_session

Inventory

application/vnd.projectera.inventory.v1+json

Root key:

inventory

Contents:

None

Links:

building (optional)
character (optional)
self

Player

application/vnd.projectera.player.v1+json

Root key:

player

Contents:

None

Links:

characters
self

Steam Auth Session

application/vnd.projectera.steam_auth_session.v1.create+json

Root key:

auth_session

Contents:

auth_session_ticket: String

Universe

application/vnd.projectera.universe.v1+json

Root key:

universe

Contents:

None

Links:

buildings
self