QutEcoacoustics / baw-server

The acoustic workbench server for storing and managing ecoacoustic data. Manages the structure and audio data. Provides an API for clients access.
Apache License 2.0
9 stars 4 forks source link

Provide an API endpoint for viewing results of job #196

Closed atruskie closed 8 years ago

atruskie commented 9 years ago

TODO: spec out

Related to: https://github.com/QutBioacoustics/baw-private/issues/83

https://github.com/QutBioacoustics/baw-server/issues/193

cofiem commented 9 years ago

Route: /jobs/1/results

Response:

atruskie commented 9 years ago

Initial spec calls only for very basic file access.

It will basically expose files. Route will need to be extendable for full path seeking... either /jobs/1/results/Towsey.Acoustic/ACI.csv or /jobs/1/results?file=/Towsey.Acoustic/ACI.csv

I'd even seriously think about exposing the results folders as rails static file locations.

The other features we've talked about, but should be specced out in the next milestone

atruskie commented 9 years ago

Also, JSON response for getting a directory (e.g. /jobs/1/results/Towsey.Acoustic/) should be just a list of files in directory

atruskie commented 9 years ago

Just a side note: whatever solution we choose for exposing files here, we should also factor out so the functionality is shared with the audio_recordings/{id}/analysis.{extension} end point (i.e. system analysis jobs)

cofiem commented 9 years ago

I'm a little confused - /jobs and /audio_recordings/:id/analysis.:format essentially do the same thing? What's the difference?

atruskie commented 9 years ago

Their functionality will be the same (I.e. Allowing access to files on disk) but the way the data is stored is really different.

Analysis_results (from custom jobs) are stored in job folders and are nested under /jobs

System analysis results more simply overwrite existing results. We currently have an endpoint for them nested under /audio_recordings (since when they were made there was no /jobs endpoint and it doesn't make sense to nest then under jobs anyway)

cofiem commented 8 years ago

Currently recursive when it should not be.