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

Improved API for Designator #76

Open
marten opened this issue Feb 4, 2019 · 1 comment
Open

Improved API for Designator #76

marten opened this issue Feb 4, 2019 · 1 comment

Comments

@marten
Copy link
Contributor

marten commented Feb 4, 2019

It would be better if Designator would communicate more clearly to Panoptes about why it's returning an empty array. Currently that could be because the workflow wasn't loaded yet, but it can also happen if it is loaded but there is nothing to select.

Currently the response is just

[1,2,3,4]

Proposed response is:

{ 
  "status": "selected_subjects" // or "cache_populating", "nothing_to_select_for_user", maybe more?
  "subject_ids": [1,2,3,4]
}

We may not be interested in changing Panoptes to actually do anything different with this additional information at the moment, but at the very least it'll be helpful in debugging if we ever request subjects by hand. Going from a top-level array response to a top-level hash response is also a prerequisite for any other thing we might want to return.

@camallen
Copy link
Contributor

camallen commented Feb 4, 2019

I'm all for this, might be a nice piece of work to pair with zach and/or amy on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants