Setup
Sign in, save your PlayFab title ID as the default, and make a read-only request. ReplaceABC123 with your title ID.
--playfab-title-id. See
Context.
Finding an API
PlayFab documents every operation, its request and response schemas, which fields are required, and which credentials it accepts:- The PlayFab REST API reference is written for people.
- The PlayFab Swagger specs
are machine-readable. The files are named for PlayFab’s API groups, not for the path’s
first segment, so search the files’
pathsfor the operation. For example,/Catalogand/Inventoryare inEconomy.swagger.json, and/Match,/Lobby, and/MultiplayerServerare inMultiplayer.swagger.json. - Each operation’s
securityfield names the credential it accepts:SecretKey(a title secret key),EntityToken,SessionTicket(a player session), orNone. Some operations also list their allowed entity token types in their description.
/<Prefix>/<Operation>, such as /Admin/GetTitleData, and the request
body is the operation’s JSON request object.
Examples
These examples call the API withplayfab api, which has the
full option reference. Delete* and Shutdown* operations ask first in a terminal, and need
--confirm elsewhere; see Safety and destructive operations.
Get title data
Get one title data key
Set title data
Pass the request body inline with--body:
--body-file, here in PowerShell:
Get only the data, on one line
--data-only drops the response envelope, and --output json-compact writes single-line
JSON for piping:
Error responses
A failed call exits with code1:
- When PlayFab returns an error, the command writes PlayFab’s error JSON to stderr,
formatted per
--output. - Other failures, such as network errors, write a plain-text message to stderr.
- With
--data-only, stdout is empty on an error.
