add SubjectSetImport resource for Vera Rubin Observatory subject set import use case
Opened this issue · 0 comments
camallen commented
Add the SubjectSetImport
resource to allow the easy importing of externally hosted media resources / subjects to a subject set.
Docs for the SubjectSetImport API can be found at https://zooniverse.github.io/panoptes/?http#subjectsetimports
This can currently be tested / run via:
url_root = "https://lsst.ncsa.illinois.edu/~ebellm/zooniverse/"
# camallen's test subject set target for subject set imports
subject_set = panoptes_client.SubjectSet.find(90418)
payload_dict = {"subject_set_imports": {"source_url": f"{url_root}manifest.csv", "links": {"subject_set": subject_set.id}}}
json.dumps(payload_dict)
# request the import via the API client (custom path as this isn't an exposed resource in the client)
# Add to Zooniverse python client / cli tools to improve the user experience
json_response, etag = client.post(path='/subject_set_imports', json=payload_dict)