Authentication - Update Policy

Changes a policy for a title

POST https://titleId.playfabapi.com/Admin/UpdatePolicy

Request Header

Name Required Type Description
X-SecretKey True
  • string

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Request Body

Name Required Type Description
OverwritePolicy True
  • boolean

Whether to overwrite or append to the existing policy.

PolicyName True
  • string

The name of the policy being updated. Only supported name is 'ApiPolicy'

PolicyVersion True
  • number

Version of the policy to update. Must be the latest (as returned by GetPolicy).

Statements True

The new statements to include in the policy.

Responses

Name Type Description
200 OK
400 Bad Request

This is the outer wrapper for all responses with errors

Security

X-SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

ApiCondition
ApiErrorWrapper

The basic wrapper around every failed API response

Conditionals
EffectType
PermissionStatement
UpdatePolicyRequest

Updates permissions for your title. Policies affect what is allowed to happen on your title. Your policy is a collection of statements that, together, govern particular area for your title. Today, the only allowed policy is called 'ApiPolicy' and it governs what API calls are allowed. To verify that you have the latest version always download the current policy from GetPolicy before uploading a new policy. PlayFab updates the base policy periodically and will automatically apply it to the uploaded policy. Overwriting the combined policy blindly may result in unexpected API errors.

UpdatePolicyResponse

ApiCondition

Name Type Description
HasSignatureOrEncryption

Require that API calls contain an RSA encrypted payload or signed headers.

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code
  • integer

Numerical HTTP code

error
  • string

Playfab error code

errorCode
  • integer

Numerical PlayFab error code

errorDetails
  • object

Detailed description of individual issues with the request object

errorMessage
  • string

Description for the PlayFab errorCode

status
  • string

String HTTP code

Conditionals

Name Type Description
Any
  • string
False
  • string
True
  • string

EffectType

Name Type Description
Allow
  • string
Deny
  • string

PermissionStatement

Name Type Description
Action
  • string

The action this statement effects. The only supported action is 'Execute'.

ApiConditions

Additional conditions to be applied for API Resources.

Comment
  • string

A comment about the statement. Intended solely for bookkeeping and debugging.

Effect

The effect this statement will have. It could be either Allow or Deny

Principal
  • string

The principal this statement will effect. The only supported principal is '*'.

Resource
  • string

The resource this statements effects. The only supported resources look like 'pfrn:api--*' for all apis, or 'pfrn:api--/Client/ConfirmPurchase' for specific apis.

UpdatePolicyRequest

Updates permissions for your title. Policies affect what is allowed to happen on your title. Your policy is a collection of statements that, together, govern particular area for your title. Today, the only allowed policy is called 'ApiPolicy' and it governs what API calls are allowed. To verify that you have the latest version always download the current policy from GetPolicy before uploading a new policy. PlayFab updates the base policy periodically and will automatically apply it to the uploaded policy. Overwriting the combined policy blindly may result in unexpected API errors.

Name Type Description
OverwritePolicy
  • boolean

Whether to overwrite or append to the existing policy.

PolicyName
  • string

The name of the policy being updated. Only supported name is 'ApiPolicy'

PolicyVersion
  • number

Version of the policy to update. Must be the latest (as returned by GetPolicy).

Statements

The new statements to include in the policy.

UpdatePolicyResponse

Name Type Description
PolicyName
  • string

The name of the policy that was updated.

Statements

The statements included in the new version of the policy.