Cloud Save Files Admin API
Server (admin) API surface for Unity Cloud Save Files: the endpoints that
carry the path segment. These endpoints are
server-authenticated (Service Account / JWT) and authorized with
RBAC permissions, an entitlement check, and a nested-resource check that
the environment belongs to the project. The player-facing API (no
environment segment) lives in .
environments/{environmentId}unityfiles/client-v1-routes.yamlDownload OpenAPI specification:
List Player Files
Retrieves a list of names of all the files currently saved in storage for a player along with size (in bytes), last date modified and current WriteLock.
Ordered alphabetically in page sizes of 20.
Authorizations
ServiceAccount (cloud_save.files.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: cloud_save.files.list
Code samples for "List Player Files":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/cloud-save/v1/files/projects/{projectId}/environments/{environmentId}/players/{playerId}/items"
Response example
{ "results": [ { "key": "save-slot-1.dat", "writeLock": "12345678901234567890", "modified": { "date": "2020-04-01T13:07:23Z" }, "created": { "date": "2020-04-01T13:07:23Z" }, "contentType": "text/plain", "size": 2048 } ], "links": { "next": "string" }}
Get Player File Download URL
Generates a signed URL that will allow the client to download the requested player file for a limited period of time. If successful, an object will be returned containing all necessary information to perform the download.
Authorizations
ServiceAccount (cloud_save.files.read)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: cloud_save.files.read
Code samples for "Get Player File Download URL":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/cloud-save/v1/files/projects/{projectId}/environments/{environmentId}/players/{playerId}/items/{key}"
Response example
{ "signedUrl": "string", "httpMethod": "string", "requiredHeaders": {}}
Delete Player File
Deletes the specified player file. If a WriteLock is provided, the file will only be deleted if it matches the stored WriteLock.
Authorizations
ServiceAccount (cloud_save.files.delete)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: cloud_save.files.delete
Code samples for "Delete Player File":
Request example
curl -X DELETE \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/cloud-save/v1/files/projects/{projectId}/environments/{environmentId}/players/{playerId}/items/{key}"
Response example
{ "type": "string", "title": "string", "status": 0, "requestId": null, "code": 0, "detail": "string", "instance": "string", "details": [ {} ]}
Get Player File Metadata
Retrieves the metadata (size, date last modified and created, key, content type, and current WriteLock) of a single player file.
Authorizations
ServiceAccount (cloud_save.files.read)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: cloud_save.files.read
Code samples for "Get Player File Metadata":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/cloud-save/v1/files/projects/{projectId}/environments/{environmentId}/players/{playerId}/items/{key}/metadata"
Response example
{ "key": "save-slot-1.dat", "writeLock": "12345678901234567890", "modified": { "date": "2020-04-01T13:07:23Z" }, "created": { "date": "2020-04-01T13:07:23Z" }, "contentType": "text/plain", "size": 2048}
Get Players
Retrieves a list of all players that have files saved in storage, ordered alphabetically.
Authorizations
ServiceAccount (cloud_save.files.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: cloud_save.files.list
Code samples for "Get Players":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/cloud-save/v1/files/projects/{projectId}/environments/{environmentId}/players"
Response example
{ "results": [ { "id": "s1QFdyYFXCC2YBocplKoLstxvQ2r", "accessClasses": { "default": { "totalSize": 0, "numFiles": 0 } } } ], "links": { "next": "string" }}