openapi: '3.1.1' info: title: SysexDB API description: "Read the SysexDB catalog (manufacturers, devices, public SysEx files) and, with the\nuser's permission, the user's own SysEx files.\n\nEvery request identifies the app: with the `SysexDB-Client-Id` header when there is no\nuser, or with an OAuth 2.0 access token when the app acts for a user. Lists are paginated\nwith `page` (from 1) and `pageSize` (1 to 100, default 50) and report `totalCount`; a page\npast the end is empty. Dates are UTC. Errors use Problem Details (RFC 9457).\n\nData licence: catalog facts are CC0-1.0. SysEx descriptions carry their own licence in\n`descriptionLicense`. SysEx files are distributed as uploaded by their authors, without\na licence. Details: https://www.sysexdb.com/developers/data-license\n\nUsing the API means accepting the API terms of use: https://www.sysexdb.com/developers/terms" contact: name: SysexDB url: https://www.sysexdb.com/contact version: 1.0.0 servers: - url: https://www.sysexdb.com paths: /api/v1/manufacturers: get: tags: - Catalog summary: 'List manufacturers, sorted by name.' parameters: - name: page in: query description: 'Page number, from 1. A page past the end is empty.' schema: type: integer format: int32 - name: pageSize in: query description: 'Items per page, from 1 to 100. Default 50.' schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageResponseOfManufacturerResponse' '/api/v1/manufacturers/{manufacturerId}': get: tags: - Catalog summary: Get one manufacturer. parameters: - name: manufacturerId in: path required: true schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ManufacturerResponse' /api/v1/devices: get: tags: - Catalog summary: 'List devices, sorted by manufacturer and name.' parameters: - name: manufacturerId in: query description: Only the devices of this manufacturer. schema: type: integer format: int32 - name: q in: query description: 'Text searched in the device name, in the manufacturer name, or in both ("yamaha dx7").' schema: type: string - name: page in: query description: 'Page number, from 1. A page past the end is empty.' schema: type: integer format: int32 - name: pageSize in: query description: 'Items per page, from 1 to 100. Default 50.' schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageResponseOfDeviceResponse' '/api/v1/devices/{deviceId}': get: tags: - Catalog summary: Get one device. description: 'A device merged into another answers 301, with the address of the other device in Location.' parameters: - name: deviceId in: path required: true schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DeviceResponse' '/api/v1/devices/{deviceId}/sysex': get: tags: - Catalog summary: 'List the public SysEx files of a device, oldest first, without their content.' parameters: - name: deviceId in: path required: true schema: type: integer format: int32 - name: page in: query description: 'Page number, from 1. A page past the end is empty.' schema: type: integer format: int32 - name: pageSize in: query description: 'Items per page, from 1 to 100. Default 50.' schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageResponseOfSysexMessageResponse' '/api/v1/sysex/{sysexId}': get: tags: - Catalog summary: Get one SysEx file with the analysis of its bytes. description: 'A public file; with an access token with the sysex.read permission, also a private file of the user.' parameters: - name: sysexId in: path required: true schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/SysexMessageDetailsResponse' patch: tags: - User summary: Change the description or the type of a SysEx file the user uploaded. parameters: - name: sysexId in: path required: true schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateSysexRequest' required: true responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/SysexMessageDetailsResponse' '400': description: Bad Request content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: Not Found content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - sysex.write delete: tags: - User summary: Delete a SysEx file the user uploaded. parameters: - name: sysexId in: path required: true schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '204': description: No Content '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: Not Found content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - sysex.write /api/v1/sysex-types: get: tags: - Catalog summary: List the SysEx message types. responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/SysexTypeResponse' /api/v1/me: get: tags: - User summary: Get the user the app is acting for. responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UserProfileResponse' '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - profile /api/v1/me/sysex: get: tags: - User summary: 'List the user''s SysEx files, public and private, oldest first, without their content.' parameters: - name: page in: query description: 'Page number, from 1. A page past the end is empty.' schema: type: integer format: int32 - name: pageSize in: query description: 'Items per page, from 1 to 100. Default 50.' schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageResponseOfSysexMessageResponse' '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - sysex.read /api/v1/me/storage: get: tags: - User summary: Get how much of the user's private storage is used. responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PrivateStorageResponse' '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - sysex.read '/api/v1/sysex/{sysexId}/content': get: tags: - User summary: 'Download the bytes of a SysEx file: a public one, or a private one of the user.' description: 'Counts as a download on the site, with the same limits: past them the answer is 429. format=original (the default) gives the file as uploaded, .syx or .mid; format=syx gives only the SysEx messages, one after the other, also for a MIDI file.' parameters: - name: sysexId in: path required: true schema: type: integer format: int32 - name: format in: query description: original (default) or syx. schema: type: string responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/octet-stream: schema: $ref: '#/components/schemas/Stream' '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - sysex.read /api/v1/sysex: post: tags: - User summary: 'Upload a SysEx file for the user, public or private.' description: 'Fields: deviceId; typeId, from GET /sysex-types; description, required; visibility, public or private; privateStorageTermsAccepted, which must be true for a private file (the user has read that the private storage is not a backup and keeps their own copy); file, a .syx file, or a .mid (Standard MIDI File) with only SysEx and meta events, at most 4 MB. A MIDI file is kept as uploaded. A public file is announced to the users who follow the device, as on the website. The answer has the analysis of the bytes, so the app can check that the Manufacturer ID matches the device.' requestBody: content: multipart/form-data: schema: required: - deviceId - typeId - description - visibility - file type: object allOf: - type: object properties: deviceId: type: integer format: int32 - type: object properties: typeId: type: integer format: int32 - type: object properties: description: type: string - type: object properties: visibility: type: string - type: object properties: privateStorageTermsAccepted: type: boolean - type: object properties: file: $ref: '#/components/schemas/IFormFile' required: true responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/SysexMessageDetailsResponse' '400': description: Bad Request content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '409': description: Conflict content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - sysex.write '/api/v1/sysex/{sysexId}/make-public': post: tags: - User summary: Make public a private SysEx file of the user. description: 'There is no way back: a public file gets votes and downloads, so to withdraw it the user deletes it.' parameters: - name: sysexId in: path required: true schema: type: integer format: int32 responses: '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '429': description: Too Many Requests content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/SysexMessageDetailsResponse' '400': description: Bad Request content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: Not Found content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' security: - oauth2: - sysex.write components: schemas: DeviceReference: required: - id - name - manufacturer type: object properties: id: type: integer format: int32 name: type: string manufacturer: type: string DeviceResponse: required: - id - name - manufacturer - type - family - year - url - publicSysexCount type: object properties: id: type: integer format: int32 name: type: string manufacturer: $ref: '#/components/schemas/ManufacturerReference' type: type: - 'null' - string family: oneOf: - type: 'null' - $ref: '#/components/schemas/FamilyReference' year: type: - 'null' - integer description: 'Release year, only where it has been verified.' format: int32 url: type: string description: Page of the device on sysexdb.com. publicSysexCount: type: integer format: int32 FamilyReference: required: - id - name type: object properties: id: type: integer format: int32 name: type: string IFormFile: type: string format: binary ManufacturerReference: required: - id - name type: object properties: id: type: integer format: int32 name: type: string ManufacturerResponse: required: - id - name - country - midiManufacturerId - url type: object properties: id: type: integer format: int32 name: type: string country: type: - 'null' - string midiManufacturerId: type: - 'null' - string description: 'MIDI Manufacturer ID, hexadecimal bytes separated by spaces: 43 or 00 20 29.' url: type: - 'null' - string description: Page of the manufacturer on sysexdb.com. PageResponseOfDeviceResponse: required: - items - page - pageSize - totalCount type: object properties: items: type: array items: $ref: '#/components/schemas/DeviceResponse' page: type: integer format: int32 pageSize: type: integer format: int32 totalCount: type: integer description: 'Number of items in the whole list, across all pages.' format: int32 PageResponseOfManufacturerResponse: required: - items - page - pageSize - totalCount type: object properties: items: type: array items: $ref: '#/components/schemas/ManufacturerResponse' page: type: integer format: int32 pageSize: type: integer format: int32 totalCount: type: integer description: 'Number of items in the whole list, across all pages.' format: int32 PageResponseOfSysexMessageResponse: required: - items - page - pageSize - totalCount type: object properties: items: type: array items: $ref: '#/components/schemas/SysexMessageResponse' page: type: integer format: int32 pageSize: type: integer format: int32 totalCount: type: integer description: 'Number of items in the whole list, across all pages.' format: int32 PrivateStorageResponse: required: - fileCount - maxFileCount - totalSizeInBytes - maxTotalSizeInBytes type: object properties: fileCount: type: integer description: Private SysEx files the user has now. format: int32 maxFileCount: type: integer description: Most private files a user can have. format: int32 totalSizeInBytes: type: integer description: 'Total size of the private files, in bytes.' format: int64 maxTotalSizeInBytes: type: integer description: Most bytes of private files a user can have. format: int64 ProblemDetails: type: object properties: type: type: - 'null' - string title: type: - 'null' - string status: type: - 'null' - integer format: int32 detail: type: - 'null' - string instance: type: - 'null' - string Stream: type: string format: binary SysexAnalysisResponse: required: - manufacturerId - modelId - messageCount - checksum - problems - sha256 type: object properties: manufacturerId: type: string description: 'Manufacturer ID of the first message, hexadecimal bytes separated by spaces ("43", "00 20 29"). Empty when the file has no messages.' modelId: type: - 'null' - string description: 'Model ID of the first message, only for manufacturers whose layout is known (Roland, Korg).' messageCount: type: integer description: Number of F0...F7 messages in the file. format: int32 checksum: type: string description: 'valid, invalid, or notChecked when the format has no checksum or an unknown rule.' problems: type: array items: type: string description: 'Problems found: empty, doesNotStartWithStartOfExclusive, messageWithoutEnd, statusByteInsideMessage, bytesOutsideMessages, checksumMismatch.' sha256: type: string description: 'SHA-256 of the downloaded file, hexadecimal: two files with the same value are identical.' SysexMessageDetailsResponse: required: - id - url - device - type - description - descriptionLicense - uploadedOn - uploadedBy - status - downloadCount - isPrivate - fileFormat - sizeInBytes - analysis type: object properties: id: type: integer format: int32 url: type: string device: $ref: '#/components/schemas/DeviceReference' type: oneOf: - type: 'null' - $ref: '#/components/schemas/SysexTypeResponse' description: type: - 'null' - string descriptionLicense: type: - 'null' - string description: 'Licence of the description, as an SPDX identifier: CC-BY-SA-4.0, or LicenseRef-SysexDB-Terms for descriptions written before the licence was introduced. Null without a description.' uploadedOn: type: - 'null' - string format: date-time uploadedBy: oneOf: - type: 'null' - $ref: '#/components/schemas/UserReference' status: type: string description: 'uploaded, confirmedWorking or reportedNotWorking.' downloadCount: type: integer format: int32 isPrivate: type: boolean fileFormat: type: string description: 'syx, or mid for a Standard MIDI File, kept and downloaded exactly as uploaded. The analysis covers its SysEx messages; GET /sysex/{sysexId}/content?format=syx gives only those.' sizeInBytes: type: integer description: Size of the file you download. format: int32 analysis: $ref: '#/components/schemas/SysexAnalysisResponse' SysexMessageResponse: required: - id - url - device - type - description - descriptionLicense - uploadedOn - uploadedBy - status - downloadCount - isPrivate - fileFormat type: object properties: id: type: integer format: int32 url: type: string device: $ref: '#/components/schemas/DeviceReference' type: oneOf: - type: 'null' - $ref: '#/components/schemas/SysexTypeResponse' description: type: - 'null' - string descriptionLicense: type: - 'null' - string description: 'Licence of the description, as an SPDX identifier: CC-BY-SA-4.0, or LicenseRef-SysexDB-Terms for descriptions written before the licence was introduced. Null without a description.' uploadedOn: type: - 'null' - string format: date-time uploadedBy: oneOf: - type: 'null' - $ref: '#/components/schemas/UserReference' status: type: string description: 'uploaded, confirmedWorking or reportedNotWorking.' downloadCount: type: integer format: int32 isPrivate: type: boolean description: Only your own files can be private; catalog files are always public. fileFormat: type: string description: 'syx, or mid for a Standard MIDI File, kept and downloaded exactly as uploaded. The analysis covers its SysEx messages; GET /sysex/{sysexId}/content?format=syx gives only those.' SysexTypeResponse: required: - id - name type: object properties: id: type: integer format: int32 name: type: string UpdateSysexRequest: required: - description - typeId type: object properties: description: type: - 'null' - string description: The new description. Omit it to keep the current one. typeId: type: - 'null' - integer description: 'The new type, from GET /sysex-types. Omit it to keep the current one.' format: int32 UserProfileResponse: required: - id - userName - url type: object properties: id: type: integer format: int32 userName: type: string url: type: string UserReference: required: - userName - url type: object properties: userName: type: string url: type: string securitySchemes: clientId: type: apiKey description: The client ID the SysexDB staff assigned to your app. Needed on every call without an access token. name: SysexDB-Client-Id in: header oauth2: type: oauth2 description: "OAuth 2.0 for public clients, without a client secret. Desktop and command-line apps\nshould use the device authorization grant (RFC 8628): POST /connect/device with\n`client_id` and `scope`, show the user the `user_code` and the address\nhttps://www.sysexdb.com/activate, then poll POST /connect/token. Apps that open the\nbrowser can use the authorization code flow with PKCE (S256) and a loopback redirect\nURI registered with the app. Access tokens last one hour. A refresh token is always\nissued, even without the `offline_access` scope: it lasts 90 days and changes at every\nuse. Revoke tokens with POST /connect/revoke." flows: authorizationCode: authorizationUrl: https://www.sysexdb.com/connect/authorize tokenUrl: https://www.sysexdb.com/connect/token refreshUrl: https://www.sysexdb.com/connect/token scopes: profile: See your user name and profile page sysex.read: 'List and download your SysEx files, including private ones' sysex.write: 'Upload SysEx files for you, public or private, and edit, publish or delete the ones you uploaded. Descriptions you write through the app are published under CC BY-SA 4.0' security: - clientId: [ ] tags: - name: Catalog - name: User