API design #3
Replies: 1 comment
-
|
Thanks @iishiishii for starting this discussion. I very much prefer approach 2) where the neuroimaging files are seperated from the scene defintion. I think this approach will make it the most useful to the neuroimaging community. I'll admit this is outside of my area of expertise, so I'll defer to @neurolabusc @hanayik and @cdrake, but I think we might be conflating functionality. The way I see it, we need functionality for 2 differfent tasks:
I've spent more time thinking about the first task than the second, and I think the API endpoints we need for that would look something like:
For the second task, executing processes on the backend, I'm not sure a scene is the best interface for this, however if there is a natual mapping between the current scene a user is interacting with and the processing task, perhaps the job could be submitted automatically for the user. The endpoints for that might look something like:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
Create a general boilerplate for a full stack web app demo
Features
Server-side
Client-side
Description
From our discussion, there're two approaches:
Athough I like to avoid duplicated work so was thinking of reusing NVDocument but that seems to require a lot more changes from Niivue API so using pure JSON with hypermedia would be a better idea. Any thoughts on having download path and delete path in the hypermedia like this?
Still a WIP specs, let me know if you find anything redundant.
API specs
GET /scene/{request_id}Description: List all results from request with
request_idPath parameters
request_id: stringThe request unique identifierResponse
GET /scene/{request_id}/downloadDescription: Download results from request with
request_idPath parameters
request_id: stringThe request unique identifierResponse
DELETE /scene/{request_id}Description: Delete results from request with
request_idPath parameters
request_id: stringThe request unique identifierResponse
POST /sceneDescription: Submits a request to process images.
Request Body:
Query parameters
processing_task: string// Task from the given list to process image (eg. Figure below)Responses
@pwighton what do you think of
schemaIdandschemaUrlto be in the format of "sceneId-processTool" and /scene/{request_id}/files as I did the the download endpoints above? Not sure if you have another idea for them.@neurolabusc @pwighton @cdrake @hanayik
Tasks
Beta Was this translation helpful? Give feedback.
All reactions