Created
September 17, 2015 20:57
-
-
Save rdhyee/f6339bead9112619a20c to your computer and use it in GitHub Desktop.
My mistake. The line in cell 7 above
headers = {'Authorization': DMPTOOL_TOKEN}
should be
headers = {'Authorization': 'Token token={}'.format(DMPTOOL_TOKEN)}
https://gist.github.com/rdhyee/a64c2c5380edc92efe07 shows this fix in operation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Raymond, we tried this again with another user who did not have inst admin privileges and it was working.
user (dmp2user123) who just had one plan that was private. I created an API key and was able to show the plan.
curl -H "Authorization: Token token=d93a2be06b6be6ddbb7cb432881200df" https://dmp2-dev.cdlib.org/api/v1/plans/1562
{"plan":{"id":1562,"name":"Copy of The Nine Lives of Kitty Cats","solicitation_identifier":"666","visibility":"private","created":"09/28/2015","modified":"09/28/2015","owner":{"full_name":"dmp2user123 dmp2user123","email":"[email protected]"},"template":{"name":"Cat Questions","active":true,"start_date":"03/05/2014","end_date":"03/18/2015","review_type":"no_review"},"state":"new","institution":"NonPartner Institution "}}