REST API (Docker, PHP, Slim, Lilypond) for converting Lilypond file format to PDF and MIDI
composer install
docker image build -t lilypond-api .
docker run -p 80:80 lilypond-api
- Verb : GET
- No parameter
- Content-Type : Application/json
{
"apiName": "lilypond",
"version": {
"api": "1.1",
"lilypond": "GNU LilyPond 2.18.2"
},
"description": "Lilypond to midi & pdf convertion"
}
- Verb : POST
- Content-Type : Application/json
- Parameters : -- lpData : Lilypond format string
{
"lpData": "\\score{ { c'4 d'4 e'4 f'4 } \\layout{} \\midi{} }"
}
- Content-Type : Application/json
{
"statusCode": "OK|ERROR",
"message": "Information complement on error",
"base64PdfData": "JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5n.......0YK",
"base64MidiData": "TVRoZAAAAAYAAQACAYBNVHJrAAAAUwD/Aw1jb250......F0b",
"logs": [
{
"title": "Lilypond : PDF & MIDI Generation",
"content": "Processing 5a9d77d267c75/5a9d77d267c75.lp"
}
]
}