playfab api calls any PlayFab API endpoint by its path, sends the request body you pass,
and writes PlayFab’s response as JSON. To find an operation and its request body, see
Finding an API.
/Studio/*), which aren’t
scoped to one. See Context.
What the command changes depends on the path. Operations whose names start with Get,
List, or Search only read. Delete* and Shutdown* operations ask first in a
terminal, and need --confirm (--yes, -y) elsewhere. See
Safety and destructive operations.
Arguments and options
--body and --body-file can’t be combined. The CLI sends the body as you pass it,
without validating it.
Examples
Read the request body from stdin
--body-file -, Delete* and Shutdown* operations need --confirm even in a
terminal, because stdin can’t answer the prompt.
Running from Git Bash on Windows
Git Bash, like other MSYS shells, converts an argument that starts with/ into a Windows
path before it starts a Windows program. The CLI refuses the converted path and says how to
fix it:
MSYS_NO_PATHCONV=1 for one command:
--body-file a relative path or a Windows path, such as C:/requests/search.json, not
/c/requests/search.json.
Output
PlayFab’s response, in its{code,status,data} envelope; see
Response envelope. When the call fails, the command
writes the error to stderr and exits with code 1; see
Error responses.
playfab api doesn’t accept --output table.