Skip to content

Improved API for Designator #76

@marten

Description

@marten

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions