RomM Play Sessions API
The play-sessions API from RomM — 2 operation(s) for play-sessions.
The play-sessions API from RomM — 2 operation(s) for play-sessions.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/romm:romm-play-sessions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: RomM Play Sessions API
version: 5.4.0
tags:
- name: play-sessions
paths:
/api/play-sessions:
post:
tags:
- play-sessions
summary: Ingest Play Sessions
operationId: ingest_play_sessions_api_play_sessions_post
security:
- OAuth2PasswordBearer:
- roms.user.write
- HTTPBasic: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PlaySessionIngestPayload'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PlaySessionIngestResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- play-sessions
summary: Get Play Sessions
operationId: get_play_sessions_api_play_sessions_get
security:
- OAuth2PasswordBearer:
- roms.user.read
- HTTPBasic: []
parameters:
- name: rom_id
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
title: Rom Id
- name: device_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Device Id
- name: start_after
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start After
- name: end_before
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Before
- name: limit
in: query
required: false
schema:
type: integer
maximum: 10000
minimum: 1
description: Page size limit
default: 50
title: Limit
description: Page size limit
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: Page offset
default: 0
title: Offset
description: Page offset
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlaySessionSchema'
title: Response Get Play Sessions Api Play Sessions Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/play-sessions/{session_id}:
delete:
tags:
- play-sessions
summary: Delete Play Session
operationId: delete_play_session_api_play_sessions__session_id__delete
security:
- OAuth2PasswordBearer:
- roms.user.write
- HTTPBasic: []
parameters:
- name: session_id
in: path
required: true
schema:
type: integer
title: Session Id
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
PlaySessionIngestResponse:
properties:
results:
items:
$ref: '#/components/schemas/PlaySessionIngestResult'
type: array
title: Results
created_count:
type: integer
title: Created Count
skipped_count:
type: integer
title: Skipped Count
type: object
required:
- results
- created_count
- skipped_count
title: PlaySessionIngestResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
PlaySessionEntry:
properties:
rom_id:
anyOf:
- type: integer
- type: 'null'
title: Rom Id
save_slot:
anyOf:
- type: string
- type: 'null'
title: Save Slot
start_time:
type: string
format: date-time
title: Start Time
end_time:
type: string
format: date-time
title: End Time
duration_ms:
type: integer
minimum: 0.0
title: Duration Ms
type: object
required:
- start_time
- end_time
- duration_ms
title: PlaySessionEntry
PlaySessionIngestPayload:
properties:
device_id:
anyOf:
- type: string
- type: 'null'
title: Device Id
sessions:
items:
$ref: '#/components/schemas/PlaySessionEntry'
type: array
title: Sessions
type: object
required:
- sessions
title: PlaySessionIngestPayload
PlaySessionSchema:
properties:
id:
type: integer
title: Id
user_id:
type: integer
title: User Id
device_id:
anyOf:
- type: string
- type: 'null'
title: Device Id
rom_id:
anyOf:
- type: integer
- type: 'null'
title: Rom Id
save_slot:
anyOf:
- type: string
- type: 'null'
title: Save Slot
start_time:
type: string
format: date-time
title: Start Time
end_time:
type: string
format: date-time
title: End Time
duration_ms:
type: integer
title: Duration Ms
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
type: object
required:
- id
- user_id
- device_id
- rom_id
- save_slot
- start_time
- end_time
- duration_ms
- created_at
- updated_at
title: PlaySessionSchema
PlaySessionIngestResult:
properties:
index:
type: integer
title: Index
status:
type: string
enum:
- created
- duplicate
- error
title: Status
id:
anyOf:
- type: integer
- type: 'null'
title: Id
detail:
anyOf:
- type: string
- type: 'null'
title: Detail
type: object
required:
- index
- status
title: PlaySessionIngestResult
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
securitySchemes:
OAuth2PasswordBearer:
type: oauth2
flows:
password:
scopes:
me.read: View your profile
roms.read: View ROMs
platforms.read: View platforms
assets.read: View assets
devices.read: View devices
firmware.read: View firmware
roms.user.read: View user-rom properties
collections.read: View collections
playlists.read: View music playlists
me.write: Modify your profile
assets.write: Modify assets
devices.write: Modify devices
roms.user.write: Modify user-rom properties
collections.write: Modify collections
playlists.write: Modify music playlists
roms.write: Modify ROMs
platforms.write: Modify platforms
firmware.write: Modify firmware
users.read: View users
users.write: Modify users
tasks.run: Run tasks
logs.read: View backend logs
tokenUrl: /token
HTTPBasic:
type: http
scheme: basic