Skip to main content

Game save API

Talo's save system allows you to persist your game's state across multiple sessions. Each object in your scene can be saved and restored automatically from one of your player's saves.

Learn more about game saves here.

Endpoints


Get a player's saves

read:gameSaves
GET https://api.trytalo.com/v1/game-saves

Headers

KeyRequiredDescription
x-talo-player YesThe ID of the player

Route params

None available

Query keys

None available

Sample response

{ ... }

Create a save

write:gameSaves
POST https://api.trytalo.com/v1/game-saves

Headers

KeyRequiredDescription
x-talo-player YesThe ID of the player

Route params

None available

Query keys

None available

Body keys

KeyRequiredDescription
content YesThe SaveContent of the save file
name YesThe name of the save

Sample request

{ ... }

Sample response

{ ... }

Update a save

write:gameSaves
PATCH https://api.trytalo.com/v1/game-saves/:id

Headers

KeyRequiredDescription
x-talo-player YesThe ID of the player

Route params

KeyRequiredDescription
id YesThe ID of the save

Query keys

None available

Body keys

KeyRequiredDescription
content YesThe new SaveContent for the save
name NoA new name for the save

Sample request

{ ... }

Sample response

{ ... }

Delete a save

write:gameSaves
DELETE https://api.trytalo.com/v1/game-saves/:id

Headers

KeyRequiredDescription
x-talo-player YesThe ID of the player

Route params

KeyRequiredDescription
id YesThe ID of the save

Query keys

None available

Body keys

None available


Types

SaveContent

type SaveContent = {
objects: SavedObject[]
}

type SavedObject = {
id: UUID
name: string // e.g. Unity GameObject hierarchy name
data: SavedObjectData[]
}

type SavedObjectData = {
key: string
value: string
type: string // class to cast value to on-load, e.g. System.Boolean in C#
}