PlayStream Events - Write Telemetry Events

Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start with 'custom.'

POST https://titleId.playfabapi.com/Event/WriteTelemetryEvents

Request Body

Name Required Type Description
Events True

Collection of events to write to PlayStream.

Responses

Name Type Description
200 OK
400 Bad Request

This is the outer-wrapper for all responses with errors

Security

EntityToken

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Type: apiKey
In: header

Definitions

ApiErrorWrapper

The basic wrapper around every failed API response

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

EventContents
WriteEventsRequest
WriteEventsResponse

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code
  • number

Numerical HTTP code

error
  • string

Playfab error code

errorCode
  • number

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

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

Name Type Description
Id
  • string

Unique ID of the entity.

Type
  • string

Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types

EventContents

Name Type Description
Entity

Entity associated with the event. If null, the event will apply to the calling entity.

EventNamespace
  • string

The namespace in which the event is defined. Allowed namespaces can vary by API.

Name
  • string

The name of this event.

OriginalId
  • string

The original unique identifier associated with this event before it was posted to PlayFab. The value might differ from the EventId value, which is assigned when the event is received by the server.

OriginalTimestamp
  • string

The time (in UTC) associated with this event when it occurred. If specified, this value is stored in the OriginalTimestamp property of the PlayStream event.

Payload
  • object

Arbitrary data associated with the event. Only one of Payload or PayloadJSON is allowed.

PayloadJSON
  • string

Arbitrary data associated with the event, represented as a JSON serialized string. Only one of Payload or PayloadJSON is allowed.

WriteEventsRequest

Name Type Description
Events

Collection of events to write to PlayStream.

WriteEventsResponse

Name Type Description
AssignedEventIds
  • string[]

The unique identifiers assigned by the server to the events, in the same order as the events in the request. Only returned if FlushToPlayStream option is true.

Error Codes

Name Code
EventEntityNotAllowed 1372
EventNamespaceNotAllowed 1371
InvalidJSONContent 1200
NotAuthenticated 1074
NotAuthorized 1089
OverLimit 1214
ProfileDoesNotExist 1298