次の方法で共有


Analytics - Write Title Event

Writes a title-based event into PlayStream.

POST https://titleId.playfabapi.com/Client/WriteTitleEvent

Request Header

Name Required Type Description
X-Authorization True

string

This API requires a client session ticket, available from any Client Login function.

Request Body

Name Required Type Description
EventName True

string

The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it commonly follows the subject_verb_object pattern (e.g. player_logged_in).

Body

object

Custom event properties. Each property consists of a name (string) and a value (JSON object).

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Timestamp

string

The time (in UTC) associated with this event. The value defaults to the current time.

Responses

Name Type Description
200 OK

WriteEventResponse

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-Authorization

This API requires a client session ticket, available from any Client Login function.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

WriteEventResponse
WriteTitleEventRequest

This API is designed to write a multitude of different client-defined events into PlayStream. It supports a flexible JSON schema, which allowsfor arbitrary key-value pairs to describe any title-based event. The created event will be locked to the authenticated title.

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

WriteEventResponse

Name Type Description
EventId

string

The unique identifier of the event. The values of this identifier consist of ASCII characters and are not constrained to any particular format.

WriteTitleEventRequest

This API is designed to write a multitude of different client-defined events into PlayStream. It supports a flexible JSON schema, which allowsfor arbitrary key-value pairs to describe any title-based event. The created event will be locked to the authenticated title.

Name Type Description
Body

object

Custom event properties. Each property consists of a name (string) and a value (JSON object).

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

EventName

string

The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it commonly follows the subject_verb_object pattern (e.g. player_logged_in).

Timestamp

string

The time (in UTC) associated with this event. The value defaults to the current time.

Error Codes

Name Code
InvalidEventField 1216
NoWritePermissionsForEvent 1207