

```json
{
  "openapi": "3.0.3",
  "info": {
    "contact": {
      "name": "Matchmaker"
    },
    "description": "[Deprecated] This API is deprecated and will be removed on November 1st, 2026. Use [Matchmaker logs](https://docs.unity.com/en-us/matchmaker/matchmaker-logs) for matchmaking observability instead.\n\nThe Session Observability Service provides visibility into multiplayer sessions.\n\nFor a service account to access the admin API, it must be granted the project-level `Multiplayer Session Details Viewer` role.",
    "title": "Session Observability",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://services.api.unity.com/session-observability/v1"
    }
  ],
  "paths": {
    "/projects/{projectId}/environments/{environmentId}/sessions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/environmentId"
        }
      ],
      "get": {
        "deprecated": true,
        "description": "Get a list of session details that fulfill the filter criteria.\n\n[Deprecated] This endpoint will be removed on November 1st, 2026. Use [Matchmaker logs](https://docs.unity.com/en-us/matchmaker/matchmaker-logs) for matchmaking observability instead.",
        "operationId": "querySessions",
        "parameters": [
          {
            "$ref": "#/components/parameters/poolId"
          },
          {
            "$ref": "#/components/parameters/poolName"
          },
          {
            "$ref": "#/components/parameters/queueName"
          },
          {
            "$ref": "#/components/parameters/regionId"
          },
          {
            "$ref": "#/components/parameters/matchmakingTicketId"
          },
          {
            "$ref": "#/components/parameters/createdAfter"
          },
          {
            "$ref": "#/components/parameters/updatedAfter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SessionDetail"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "403": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "429": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        },
        "security": [
          {
            "ServiceAccount": []
          }
        ],
        "summary": "Query Session Details",
        "tags": [
          "Sessions"
        ]
      }
    },
    "/projects/{projectId}/environments/{environmentId}/sessions/{sessionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/environmentId"
        },
        {
          "$ref": "#/components/parameters/sessionId"
        }
      ],
      "get": {
        "deprecated": true,
        "description": "Get the full details of a session by its ID.\n\n[Deprecated] This endpoint will be removed on November 1st, 2026. Use [Matchmaker logs](https://docs.unity.com/en-us/matchmaker/matchmaker-logs) for matchmaking observability instead.",
        "operationId": "getSession",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDetail"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "403": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "429": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        },
        "security": [
          {
            "ServiceAccount": []
          }
        ],
        "summary": "Get Session Details",
        "tags": [
          "Sessions"
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "createdAfter": {
        "description": "The created date-time of a session detail to filter",
        "in": "query",
        "name": "createdAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "environmentId": {
        "description": "The Environment ID of the given project",
        "in": "path",
        "name": "environmentId",
        "required": true,
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "matchmakingTicketId": {
        "description": "The ID of the ticket to filter",
        "in": "query",
        "name": "matchmakingTicketId",
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "poolId": {
        "description": "The ID of the pool to filter",
        "in": "query",
        "name": "poolId",
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "poolName": {
        "description": "The name of the pool to filter",
        "in": "query",
        "name": "poolName",
        "schema": {
          "maxLength": 50,
          "type": "string"
        }
      },
      "projectId": {
        "description": "The ID of the Unity project",
        "in": "path",
        "name": "projectId",
        "required": true,
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "queueName": {
        "description": "The name of the queue to filter",
        "in": "query",
        "name": "queueName",
        "schema": {
          "maxLength": 50,
          "type": "string"
        }
      },
      "regionId": {
        "description": "The ID of the allocation region to filter",
        "in": "query",
        "name": "regionId",
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "sessionId": {
        "description": "The session ID to interact with",
        "in": "path",
        "name": "sessionId",
        "required": true,
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "updatedAfter": {
        "description": "The last updated date-time of a session detail to filter",
        "in": "query",
        "name": "updatedAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "responses": {
      "ErrorResponse": {
        "content": {
          "application/problem+json": {
            "examples": {
              "Bad request": {
                "value": {
                  "detail": "Project ID, Environment ID and Session ID must be valid UUIDs",
                  "requestId": "0d72c1b8-75fd-11eb-b76c-6750be13f34a",
                  "status": 400,
                  "title": "Bad Request"
                }
              }
            },
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseBody"
            }
          }
        },
        "description": "RFC7807 response returned in the event of an error."
      }
    },
    "schemas": {
      "Allocation": {
        "properties": {
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "regionId": {
            "format": "uuid",
            "type": "string"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "serverId": {
            "maxLength": 50,
            "type": "string"
          },
          "status": {
            "enum": [
              "Unknown",
              "Pending",
              "Allocated",
              "Failed",
              "Disabled"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "AllocationFailedEvent": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "AllocationRequestedEvent": {
        "properties": {
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "AllocationSucceededEvent": {
        "properties": {
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "AppliedRule": {
        "properties": {
          "context": {
            "type": "string"
          },
          "externalData": {
            "additionalProperties": true,
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "not": {
            "type": "boolean"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                },
                "type": "array"
              }
            ]
          },
          "source": {
            "type": "string"
          },
          "teamId": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorDetail": {
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ],
        "title": "ErrorDetail",
        "type": "object"
      },
      "ErrorResponseBody": {
        "properties": {
          "detail": {
            "description": "A human-readable explanation specific to this occurrence of the problem. Ought to focus on helping the client correct the problem, rather than giving debugging information.",
            "type": "string"
          },
          "details": {
            "description": "Machine readable list of individual errors.",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": "array"
          },
          "requestId": {
            "description": "Identifier of the request. Used when debugging failures.",
            "type": "string"
          },
          "status": {
            "description": "MUST use the same status code in the actual HTTP response.",
            "type": "integer"
          },
          "title": {
            "description": "SHOULD be the same as the recommended HTTP status phrase for that code.",
            "type": "string"
          },
          "type": {
            "description": "An URI representing the type of error.",
            "type": "string"
          }
        },
        "required": [
          "status",
          "requestId"
        ],
        "type": "object"
      },
      "GameMode": {
        "properties": {
          "poolId": {
            "format": "uuid",
            "type": "string"
          },
          "poolName": {
            "maxLength": 50,
            "type": "string"
          },
          "queueId": {
            "format": "uuid",
            "type": "string"
          },
          "queueName": {
            "maxLength": 50,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MatchCreatedEvent": {
        "properties": {
          "appliedRules": {
            "items": {
              "$ref": "#/components/schemas/AppliedRule"
            },
            "type": "array"
          },
          "teams": {
            "items": {
              "$ref": "#/components/schemas/Team"
            },
            "type": "array"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Player": {
        "properties": {
          "customData": {
            "additionalProperties": true,
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "qosResults": {
            "items": {
              "$ref": "#/components/schemas/QosResult"
            },
            "type": "array"
          },
          "ticketId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PlayersAssignedEvent": {
        "properties": {
          "assignmentStatus": {
            "enum": [
              "Unknown",
              "Found",
              "Failed"
            ],
            "type": "string"
          },
          "players": {
            "items": {
              "$ref": "#/components/schemas/Player"
            },
            "type": "array"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PlayersConnectedEvent": {
        "properties": {
          "playerIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PlayersDisconnectedEvent": {
        "properties": {
          "playerIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "QosResult": {
        "properties": {
          "latency": {
            "type": "number"
          },
          "packetLoss": {
            "type": "number"
          },
          "regionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SessionDetail": {
        "properties": {
          "allocation": {
            "$ref": "#/components/schemas/Allocation"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "environmentId": {
            "format": "uuid",
            "type": "string"
          },
          "gameMode": {
            "$ref": "#/components/schemas/GameMode"
          },
          "matchmakingStatus": {
            "enum": [
              "Unknown",
              "Full",
              "OpenBackfilling",
              "OpenNotBackfilling"
            ],
            "type": "string"
          },
          "projectId": {
            "format": "uuid",
            "type": "string"
          },
          "sessionEvents": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MatchCreatedEvent"
                },
                {
                  "$ref": "#/components/schemas/AllocationRequestedEvent"
                },
                {
                  "$ref": "#/components/schemas/AllocationSucceededEvent"
                },
                {
                  "$ref": "#/components/schemas/AllocationFailedEvent"
                },
                {
                  "$ref": "#/components/schemas/PlayersAssignedEvent"
                },
                {
                  "$ref": "#/components/schemas/PlayersConnectedEvent"
                },
                {
                  "$ref": "#/components/schemas/PlayersDisconnectedEvent"
                }
              ]
            },
            "type": "array"
          },
          "sessionId": {
            "format": "uuid",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Team": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "playerIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "ServiceAccount": {
        "description": "To get started with Authentication, please visit the [Service Account Authentication section](https://services.docs.unity.com/docs/service-account-auth).\n\nFor this API, you must add the following role(s) to your service account:\n| Purpose | Roles | Permissions |\n| --- | --- | --- |\n| Get session details | Multiplayer Session Details Viewer | <ul><li>session_observability.sessions.read</li></ul> |",
        "scheme": "basic",
        "type": "http"
      }
    }
  },
  "tags": [
    {
      "name": "Sessions"
    }
  ]
}
```