orcid.or g Contact Info: p. +1-301-922-9062 a. 10411 Motor City Drive, Suite 750, Bethesda, MD 20817 USA What’s new in v2? The latest on ORCID API v2 & what it means for you Simeon Warner Director of IT for Library Linked Data and Repository Architecture Cornell University Library orcid.org/0000-0002-7970-7855
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
orcid.org
Contact Info: p. +1-301-922-9062 a. 10411 Motor City Drive, Suite 750, Bethesda, MD 20817 USA
What’s new in v2?The latest on ORCID API v2 & what it means for you
Simeon WarnerDirector of IT for Library Linked Data and Repository
someone might want to use this image for something.Photo credit Daniel Steger (Lausanne, Switzerland) CC-BY-SA 2.5 https://commons.wikimedia.org/wiki/File:Expo02_op6987.jpg#/media/File:Expo02_op6987.jpg
Why v2.0Hooray, we’re launching a new API!Why? We’ll talk about that in a moment.It’s different from the current APICurrent API users: Some changes will be needed.We’ll talk about that, too.But it’s got great features that willmake things better for everyone!Ok then, let’s get to it.
v1.2: Reading record http://orcid.org/0000-0001-5109-3700
v2.0 Reading ORCID Records
9
{"last-modified-date": {"value": 1462157547720},"name": {"created-date": {"value": 1460757617078},"last-modified-date": {"value": 1460757617078},"given-names": {"value": "Josiah"},"family-name": {"value": "Carberry"},"credit-name": null,"source": null,"visibility": "PUBLIC","path": null},"other-names": {"last-modified-date": {"value": 1462157547720},"other-name": [{"created-date": {"value": 1462157351411},"last-modified-date": {"value": 1462157547720},"source": {"source-orcid": {"uri": "http://orcid.org/0000-0002-1825-0097","path": "0000-0002-1825-0097","host": "orcid.org"},"source-client-id": null,"source-name": {"value": "Josiah Carberry"}},"content": "Josiah Stinkney Carberry","visibility": "PUBLIC","path": "/0000-0002-1825-0097/other-names/732317","put-code": 732317,"display-index": 3},{"created-date": {"value": 1446663146889},"last-modified-date": {"value": 1462157547720},"source": {"source-orcid": {"uri": "http://orcid.org/0000-0002-1825-0097","path": "0000-0002-1825-0097","host": "orcid.org"},"source-client-id": null,"source-name": {"value": "Josiah Carberry"}},"content": "J. Carberry","visibility": "PUBLIC","path": "/0000-0002-1825-0097/other-names/565981","put-code": 565981,"display-index": 2},{"created-date": {"value": 1462157351418},"last-modified-date": {"value": 1462157547720},"source": {"source-orcid": {"uri": "http://orcid.org/0000-0002-1825-0097","path": "0000-0002-1825-0097","host": "orcid.org"},"source-client-id": null,"source-name": {"value": "Josiah Carberry"}},"content": "J. S. Carberry","visibility": "PUBLIC","path": "/0000-0002-1825-0097/other-names/732318","put-code": 732318,"display-index": 1}],"path": "/0000-0002-1825-0097/other-names"},"biography": {"created-date": {"value": 1460757617080},"last-modified-date": {"value": 1460757617080},"content": "Josiah Carberry is a fictitious person. This account is used as a demonstration account by ORCID, CrossRef and others who wish to demonstrate the interaction of ORCID with other scholarly communication systems without having to use a real-person's account.\r\n\r\nJosiah Stinkney Carberry is a fictional professor, created as a joke in 1929. He is said to still teach at Brown University, and to be known for his work in \"psychoceramics\", the supposed study of \"cracked pots\". See his Wikipedia entry for more details.","visibility": "PUBLIC","path": "/0000-0002-1825-0097/biography"},"path": "/0000-0002-1825-0097/personal-details"}
...or use a put-code to read a single itemEx: Read a single workcurl -H 'Content-Type: application/vdn.orcid+xml' -H 'Authorization: Bearer 2e5b87f0-57c9-44a8-96d3-3bae005598a7' -X GET 'https://pub.sandbox.orcid.org/v2.0_rc3/0000-0002-6945-7290/work/708456' -i
Photo credit teadrinker https://flic.kr/p/4xpuTb CC BY ND Photo credit Christo de Klerk https://flic.kr/p/8LowuV CC BY NC
v2.0 Updating ORCID Records
13
Update and Delete● Update/delete items with your client ID as the source● Need token with /activities/update scope● URL format: https://api.sandbox.orcid.org/v2.0_rc3/[ORCID]/[ACTIVITY-TYPE]/[PUT-CODE]
Update a work:curl -i -H 'Content-type: application/orcid+xml' -H 'Authorization: Bearer dd91868d-d29a-475e-9acb-bd3fdf2f43f4' -d '@work-updated.xml' -X PUT 'https://api.sandbox.orcid.org/v2.0_rc3/0000-0002-1306-4180/work/12345'
Section Display index is...Bio Order of items set by the
user (highest number first)
Activities For items with the same external ID (which are grouped in the interface and API), order of an item within its group (highest number is preferred version)
Can’t tell if the identifier should be used when creating groups ↓
v2.0 External Identifiers
27
New identifier fieldsID Relationship<common:external-id-relationship> indicates if the identifier is for the item itself (self) or a larger whole (part-of)
ID URL<common:external-id-url> specifies where the identifier links out to
Last modified is hierarchical: when an item changes the dates on the group and section are updated as wellSee: https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/common_2.0_rc3
<error-desc>javax.xml.bind.UnmarshalException - with linked exception:[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 44; The processing instruction target matching "[xX][mM][lL]" is not allowed.]</error-desc>
<error-desc>com.sun.jersey.api.MessageException: A message body reader for Java class org.orcid.jaxb.model.message.OrcidMessage, and Java type class org.orcid.jaxb.model.message.OrcidMessage, and MIME media type application/vdn.orcid was not found.</error-desc>
<error-desc>javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"orcid-message"). Expected elements are <{http://www.orcid.org/ns/orcid}activities-visibility-default>,<{http://www.orcid.org/ns/orcid}address>,<{http://www.orcid.org/ns/orcid}affiliation>,<{http://www.orcid.org/ns/orcid}affiliation-city>,<{http://www.orcid.org/ns/orcid}affiliation-country>,<{http://www.orcid.org/ns/orcid}affiliation-region>,<{http://www.orcid.org/ns/orcid}affiliation-type>,<{http://www.orcid.org/ns/orcid}agency-name>,<{http://www.orcid.org/ns/orcid}agency-orcid>,<{http://www.orcid.org/ns/common}amount>,<{http://www.orcid.org/ns/orcid}amount>,<{http://www.orcid.org/ns/orcid}application-name>,<{http://www.orcid.org/ns/orcid}application-orcid>,<{http://www.orcid.org/ns/orcid}application-summary>,<{http://www.orcid.org/ns/orcid}application-website>,<{http://www.orcid.org/ns/orcid}applications>,<{http://www.orcid.org/ns/orcid}approval-date>,<{http://www.orcid.org/ns/orcid}assignee>,<{http://www.orcid.org/ns/orcid}assignee-name>,<{http://www.orcid.org/ns/orcid}assignee-orcid>,<{http://www.orcid.org/ns/notification}authorization-url>,<{http://www.orcid.org/ns/orcid}biography>,<{http://www.orcid.org/ns/orcid}claimed>,<{http://www.orcid.org/ns/orcid}completion-date>,<{http://www.orcid.org/ns/orcid}contact-details>,<{http://www.orcid.org/ns/common}contributor>,<{http://www.orcid.org/ns/funding}contributor>,<{http://www.orcid.org/ns/orcid}contributor>,<{http://www.orcid.org/ns/common}contributor-attributes>,<{http://www.orcid.org/ns/orcid}contributor-attributes>,<{http://www.orcid.org/ns/common}contributor-email>,<{http://www.orcid.org/ns/orcid}contributor-email>,<{http://www.orcid.org/ns/common}contributor-orcid>,<{http://www.orcid.org/ns/orcid}contributor-orcid>,<{http://www.orcid.org/ns/orcid}contributor-role>,<{http://www.orcid.org/ns/orcid}contributor-sequence>,<{http://www.orcid.org/ns/funding}contributorAttributes>,<{http://www.orcid.org/ns/funding}contributors>,<{http://www.orcid.org/ns/common}country>,<{http://www.orcid.org/ns/orcid}country>,<{http://www.orcid.org/ns/common}created-date>,<{http://www.orcid.org/ns/orcid}created-date>,<{http://www.orcid.org/ns/orcid}creation-method>,<{http://www.orcid.org/ns/common}credit-name>,<{http://www.orcid.org/ns/orcid}credit-name>,<{http://www.orcid.org/ns/common}day>,<{http://www.orcid.org/ns/orcid}day>,<{http://www.orcid.org/ns/orcid}deactivation-date>,<{http://www.orcid.org/ns/orcid}delegate-summary>,<{http://www.orcid.org/ns/orcid}delegation>,<{http://www.orcid.org/ns/orcid}delegation-details>,<{http://www.orcid.org/ns/orcid}department-name>,<{http://www.orcid.org/ns/orcid}deprecated>,<{http://www.orcid.org/ns/orcid}deprecated-date>,<{http://www.orcid.org/ns/orcid}developer-tools-enabled>,<{http://www.orcid.org/ns/orcid}disambiguated-affiliation-identifier>,<{http://www.orcid.org/ns/common}disambiguatedOrganization>,<{http://www.orcid.org/ns/orcid}disambiguation-source>,<{http://www.orcid.org/ns/education}education>,<{http://www.orcid.org/ns/orcid}email>,<{http://www.orcid.org/ns/employment}employment>,<{http://www.orcid.org/ns/orcid}encrypted-password>,<{http://www.orcid.org/ns/orcid}encrypted-security-answer>,<{http://www.orcid.org/ns/orcid}encrypted-verification-code>,<{http://www.orcid.org/ns/orcid}end-date>,<{http://www.orcid.org/ns/notification}external-id>,<{http://www.orcid.org/ns/orcid}external-id-common-name>,<{http://www.orcid.org/ns/orcid}
javax.xml.bind.UnmarshalException - with linked exception:[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1779; cvc-complex-type.2.4.a: Invalid content was found starting with element 'common:external-id-relationship'. One of '{"http://www.orcid.org/ns/common":external-id-value}' is expected.]</developer-message>
<user-message>ORCID could not process the data, because they were invalid.</user-message>
<response-code> HTML status code<developer-message> Details about what went wrong<user-message> Friendly message you should display to users<error-code> ORCID code for more info on how to fix the
Photo credit Jeff Warren https://flic.kr/p/z6K1L CC BY SA Photo credit Hans Hillewaert https://commons.wikimedia.org/wiki/File:Rosetta_Stone.JPG CC BY SA
v1.2: Names can be overwritten via API...by members with bad data in their system
v2.0 Sacred Fields
36
Some fields can only be edited by the user● <personal-details:given-names>● <personal-details:family-name>● <personal-details:credit-name>● <person:biography>
Generally, fields that can only be edited by users are non-repeatable, except...Email field cannot be edited! (security feature)