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
GET https://api.trytalo.com/v1/game-saves
Headers
Key | Required | Description |
---|---|---|
x-talo-player | ✅ Yes | The ID of the player |
Sample response
{ ... }
Create a save
POST https://api.trytalo.com/v1/game-saves
Headers
Key | Required | Description |
---|---|---|
x-talo-player | ✅ Yes | The ID of the player |
Body keys
Key | Required | Description |
---|---|---|
content | ✅ Yes | The SaveContent of the save file |
name | ✅ Yes | The name of the save |
Sample request
{ ... }
Sample response
{ ... }
Update a save
PATCH https://api.trytalo.com/v1/game-saves/:id
Headers
Key | Required | Description |
---|---|---|
x-talo-player | ✅ Yes | The ID of the player |
Route params
Key | Required | Description |
---|---|---|
id | ✅ Yes | The ID of the save |
Body keys
Key | Required | Description |
---|---|---|
content | ✅ Yes | The new SaveContent for the save |
name | ❌ No | A new name for the save |
Sample request
{ ... }
Sample response
{ ... }
Delete a save
DELETE https://api.trytalo.com/v1/game-saves/:id
Headers
Key | Required | Description |
---|---|---|
x-talo-player | ✅ Yes | The ID of the player |
Route params
Key | Required | Description |
---|---|---|
id | ✅ Yes | The ID of the save |
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#
}