Skip to main content

Set Single Player Uuid Setting Self

PUT 

/settings/v2/player/me/setting_type/:setting_type_id/key/:key

Update the value of a single player setting document.

Required Permissions:

  • For any player (including themselves) any of: setting:*:*, setting:write

  • For the player themselves : setting:write:self

If Legacy types are enabled, to maintain compatibility with legacy applications, the following settings have special-case handling:

  • Setting Type case - Version 1 - key create - creates a new case set and returns the new key and document in the response.
  • Setting Type case - Version 1 - key is integer - Modify an existing case set. If it does not exist, a 404 response with the does_not_exist error code.
  • Setting Type loadout - Version 1 - key create - creates a new loadout and returns the new key and document in the response. All items keys will be given a new key
  • Setting Type loadout - Version 1 - key is integer - Modify an existing loadout. If it does not exist, a 404 response with the does_not_exist error code. When modifying loadout items, item keys that convert into integers/longs are treated as updates (and will error the update if they are not valid), all others are treated as creates and will be given a new key.

Request

Path Parameters

    setting_type_id Setting Type Idrequired

    Setting Type to update settings for. Must be one of the known setting types

    key Keyrequired

    Setting Key to update setting for. Must conform to the setting type key format

Header Parameters

    if-match any

    Precondition check if the resource's current ETag matches the provided values. * can be used to match any existing value.

    See https://www.rfc-editor.org/rfc/rfc9110#name-if-match for more information

    if-none-match any

    Precondition check if the resource's current ETag does NOT match the provided values. * can be used to match existing value, causing the request to fail.

    See https://www.rfc-editor.org/rfc/rfc9110#name-if-none-match for more information

    if-unmodified-since any

    Precondition check if the resource's Last-Modified date is older than the provided date. Ignored if the If-Match header is provided.

    See https://www.rfc-editor.org/rfc/rfc9110#name-if-unmodified-since for more information

Body

required

    v V (integer)required

    Setting Type Version to update setting for. Must be a valid version for the setting type

    value Valuerequired

    New value document for the setting. Must conform to the jsonschema defined for the setting type+version

Responses

Successful Response

Response Headers

  • ETag

    string

    The ETag for the resource. Used for caching and preconditions.

  • Last-Modified

    string

    The Last-Modified date for the resource. Used for caching and preconditions.

Schema

    property name*

    SettingData

    Setting version/value document from a specific setting type/key for a player

    v V (integer)required

    Version of the Setting Type schema that was used to validate the value document.

    value Valuerequired

    Setting Value document

    etag

    object

    ETag identifying the current version+value of the document

    anyOf

    string

    last_modified

    object

    Timestamp when this setting was last modified

    anyOf

    Datetime that enforces that a timezone is given. Unix timestamps are allowed and forced into the UTC time zone

    string

Loading...