Data Export - syd711/vpin-studio GitHub Wiki

The Studio server provides a headless (without UI) endpoint to export the various data that has been stored. Please contact me on my Discord (https://discord.gg/AMPwvAZHvy) for change and feature requests.

Tables Export

The data export is used to download all table data collected by the VPin Studio and the frontend (Popper/PinballX) that is configured for it.

Endpoints:

  • http://localhost:8089/api/v1/export/tables/plain (text output)
  • http://localhost:8089/api/v1/export/tables (file download)
Parameter Value Description
source studio/frontend By default, both datasources are used. The Studio data contains additional metadata about the table, which the frontend source represents the data stored in the frontend database for tables.
ignoreList Optional comma separated list of fields that should not be exported. You can trigger a bulk export to get the list of all available fields.
delimiter The delimiter used for the CSV export, defaults to ';'.
quote The character used to quote for the CSV export, defaults to '"'.
escape The character used to escape characters for the CSV export, defaults to '\'.
emulatorId If applied, only games for the given emulator will be exported.
gameId If applied, only the game with the given id will be exported.
filepath Custom filename and path for export. This can include a path relative to the server, such as a network share.
filetype html/csv (csv is default). HTML exports an HTML table with sortable columns and additional features. See image below.

Examples

  • Download all data for emulator with id '4': http://localhost:8089/api/v1/export/tables?emulatorId=4
  • Download all data for game with id '3' and '4': http://localhost:8089/api/v1/export/tables?gameId=3,4
  • Download frontend data for game with id '3' and '17': http://localhost:8089/api/v1/export/tables?source=frontend&gameId=3,17
  • Show frontend data for game with id '3' and '17': http://localhost:8089/api/v1/export/tables/plain?source=frontend&gameId=3,17
  • Show frontend data for game with id '3' and '17' with delimiter '*': http://localhost:8089/api/v1/export/tables/plain?source=frontend&gameId=3,17&delimiter=,
  • Export all table data to HTML file on network share: http://localhost:8089/api/v1/export/tables?filepath=//share/path/to/webserver/tables.html&filetype=html

Highscores Export

Exports available highscore data.

Endpoints:

  • http://localhost:8089/api/v1/export/highscores/plain (text output)
  • http://localhost:8089/api/v1/export/highscores (file download)
Parameter Value Description
delimiter The delimiter used for the CSV export, defaults to ';'.
quote The character used to quote for the CSV export, defaults to '"'.
escape The character used to escape characters for the CSV export, defaults to '\'.
emulatorId If applied, only games for the given emulator will be exported.
gameId If applied, only the game with the given id will be exported.

Examples

  • Download all highscore data for emulator with id '1': http://localhost:8089/api/v1/export/highscores?emulatorId=1
  • Download all highscore data for game with id '3' and '4': http://localhost:8089/api/v1/export/highscores?gameId=3,4
  • Show highscore data for game with id '3' and '17': http://localhost:8089/api/v1/export/highscores/plain?gameId=3,17
  • Show highscore data for game with id '3' and '17' with delimiter '*': http://localhost:8089/api/v1/export/highscores/plain?gameId=3,17&delimiter=,

Backglass Export

Exports backglass data.

Endpoints:

  • http://localhost:8089/api/v1/export/backglasses/plain (text output)
  • http://localhost:8089/api/v1/export/backglasses (file download)
Parameter Value Description
delimiter The delimiter used for the CSV export, defaults to ';.'
quote The character used to quote for the CSV export, defaults to '"'.
escape The character used to escape characters for the CSV export, defaults to '\'.
emulatorId If applied, only games for the given emulator will be exported.
gameId If applied, only the game with the given id will be exported.

Examples

  • Download all backglass data for emulator with id '1': http://localhost:8089/api/v1/export/backglasses?emulatorId=1
  • Download all backglass data for game with id '3' and '4': http://localhost:8089/api/v1/export/backglasses?gameId=3,4
  • Show backglass data for game with id '3' and '17': http://localhost:8089/api/v1/export/backglasses/plain?gameId=3,17
  • Show backglass data for game with id '3' and '17' with delimiter '*': http://localhost:8089/api/v1/export/backglasses/plain?gameId=3,17&delimiter=,

Media Data Export

Exports the frontend media data of the selected tables.

Endpoints:

  • http://localhost:8089/api/v1/export/media/plain (text output)
  • http://localhost:8089/api/v1/export/media (file download)
Parameter Value Description
delimiter The delimiter used for the CSV export, defaults to ';.'
quote The character used to quote for the CSV export, defaults to '"'.
escape The character used to escape characters for the CSV export, defaults to '\'.
emulatorId If applied, only games for the given emulator will be exported.
gameId If applied, only the game with the given id will be exported.

Examples

  • Download all media data for emulator with id '1': http://localhost:8089/api/v1/export/media?emulatorId=1
  • Download all media data for game with id '3' and '4': http://localhost:8089/api/v1/export/media?gameId=3,4
  • Show media data for game with id '3' and '17': http://localhost:8089/api/v1/export/media/plain?gameId=3,17
  • Show media data for game with id '3' and '17' with delimiter '*': http://localhost:8089/api/v1/export/media/plain?gameId=3,17&delimiter=,