Skip to content

Remote API Wav

Matthew Martin edited this page Mar 9, 2022 · 1 revision

/x-pam/wav

GET

Returns a list of the wav files that currently exist on the PAM

HTTP Status Code: 200

Body: application/json

[
    "[wavfile1_name]/",
    "[wavfile2_name]/",
    ...
    "[wavfileN_name]/"
]

POST

Uploads a wav file to the PAM

Body: multipart/form-data

  • name - string - the name to store the wav file as
  • file - file - the file containing the audio

HTTP Status Code: 201

The audio resource has been uploaded successfully

Body: application/json

{
    "result": true,
    "code": 201
}

HTTP Status Code: 400

The data sent to the endpoint was incorrect ins some way

Body: application/json

{
    "result": false, 
    "code" : 400,
    "reason": [ an array of strings giving the reasons for the failure ]
}

HTTP Status Code: 415

The file sent is not a wav file

Body: application/json

{
    "result": false, 
    "code" : 415,
    "reason": [ an array of strings giving the reasons for the failure ]
}