Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint to retrieve content of a folder #105

Closed
2 tasks done
Tracked by #172
sylvanie85 opened this issue Jul 12, 2024 · 0 comments · Fixed by #111
Closed
2 tasks done
Tracked by #172

Endpoint to retrieve content of a folder #105

sylvanie85 opened this issue Jul 12, 2024 · 0 comments · Fixed by #111

Comments

@sylvanie85
Copy link
Contributor

sylvanie85 commented Jul 12, 2024

ai-cfia/nachet-frontend#172 : "As a User, I'd like to be able to access the pictures from other folders"

The backend needs new routes that takes a user id and a folder id as parameters to retrieve pictures and inferences from them using datastore functions.

We'll do this in 2 steps: first, we want to retrieve only the names of the pictures, if they've been verified or come from a batch download, for example.
Then, if the user clicks on a picture, we'll retrieve the inference and the picture from blob storage.

/get-directories

  • method : Post
  • parameters needed : container_name (uuid)
  • return :
    The directories route retreives all user directories from the database with their pictures as a json. There is 4 different cases for the pictures :
is_verified \ inference_exist false true
false should not happend inference not verified
true batch import inference verified
{
"folders" : [
        {
            "picture_set_id" : "xxxx-xxxx-xxxx-xxxx",
            "folder_name" : "folder name",
            "nb_pictures": 4,
            "pictures" : [
                {
                    "picture_id" : "xxxx-xxxx-xxxx-xxxx",
                    "inference_exist": false,
                    "is_validated": true
                },
                ...
            ]
        },
        ...
    ]
}

/get-picture

  • method : Post

  • parameters needed :

    • container_name (uuid)
    • picture_id
    • folder_uuid
  • return :
    This route will retreive selected picture as a json :

{
    "picture_id" : "xxxx-xxxx-xxxx-xxxx",
    "inference": {
     }
    "image": "xxxxxxxxxxx"
}
  • new /get-directories route
  • new /get-picture route
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant