Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API support to submit MIDI files #119

Open
mtagstyle opened this issue Sep 23, 2021 · 0 comments
Open

API support to submit MIDI files #119

mtagstyle opened this issue Sep 23, 2021 · 0 comments

Comments

@mtagstyle
Copy link

I'm not sure how "curated" we want BitMIDI to be, but if we provide API support for authenticated users to POST MIDI files, this will allow users to perform their own submissions in the long run. (Things like web forms, and bots).

This is quite the substantial amount of work, and I think can be logically broken down into the following features:

Authenticate API access

Provide the ability to authenticate specific requests that need to be locked down.

e.g.

$ curl -X POST -i -H "Content-Type: application/json" -u basic_username:basic_password https://bitmidi.com/api/my_secure_endpoint

This will probably involve a new table in the current database.

Intentionally doing only basic auth only for now, so that we can add in token based auth later if needed.

API support for submitting a MIDI

Provide the following APIs:

Submitting a MIDI

POST /api/upload?whatever_query_strings_needed_for_unique_identification_of_new_file=blah
content-type: audio/midi
Authorization: Basic test_user:test_pwd

{
    "status": "verifying"
    "job_id": 6969
    "midi_id": ""<this is the thing currently being used to uniquely identify the midi>
}

Querying a submitted MIDI

GET /api/upload_status?job_id=6969

{
    "status": "success"
    "job_id": 6969
    "midi_id" 1234
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant