General messages structure
Each message exchanged over the TCP socket in YFT Manager API is a JSON object with the following general structure:
Structure
message_id
String
Unique identifier for the message. Used to trace or correlate requests and responses. Required for every message.
message_response_id
String (optional)
Refers to the original message_id
in case this is a response to a client's request.
message_type
YftManagerApiMessageType
The actual type of the message. Defines the content and behavior.
Message Type
The message_type
field is an enum and can be one of:
ClientMessage
— describes client-initiated messages (requests). See details on the Client messages spec page.ServerMessage
— describes server responses and updates. See details on the Server messages spec page.Ping
— heartbeat ping from the client.Pong
— heartbeat pong from the server.
Expamples:
Basic structure of ClientMessage
ClientMessage
Basic structure of Success ServerMessage
Success ServerMessage
Basic structure of Error ServerMessage
Error ServerMessage
Basic structure of Ping
Ping
Basic structure of Pong
Pong
Last updated