Audio API

AudioFileSerializer

Read:

CURL Usage:

curl -u username:password -H 'Accept: application/json' http://HOSTNAME_IP/rest-api/audio-files/

curl -u username:password -H 'Accept: application/json' http://HOSTNAME_IP/rest-api/audio-files/%audio-files-id%/

Response:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "http://HOSTNAME_IP/rest-api/audio-files/1/",
            "name": "Sample audio",
            "audio_file": "upload/audiofiles/audio-file-SODXT-1669906647.wav",
            "user": "http://HOSTNAME_IP/rest-api/users/1/",
            "created_date": "2016-01-14T18:56:58.550",
            "updated_date": "2016-01-14T18:56:58.969"
        }
    ]
}

Create:

CURL Usage:

curl -u username:password -H ‘Accept: application/json’ –request POST http://HOSTNAME_IP/rest-api/audio-files/ –form ‘name=”audio created from API”’ –form ‘audio_file=@”/path/duck01.wav”’ –form ‘user_id=”1”’

Delete:

CURL Usage:

curl -u username:password --dump-header - -H "Content-Type: application/json" -X DELETE  http://HOSTNAME_IP/rest-api/audio-files/%audio-id%/