14. PERK
Easytounderstanderrormessages
+suggestederrorstoshow users
<developer-message>... 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>
<error-code>9001</error-code>
15. PITFALL
Unexpectederrorshaveunhelpfulmessages
<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.21 - Error
report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-
size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-
serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-
serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color
: black;}.line {height: 1px; background-color: #525D76; border: none;}</style>
</head><body><h1>HTTP Status 403 - Access Denied</h1><div
class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>Access
Denied</u></p><p><b>description</b> <u>Access to the specified resource has been
forbidden.</u></p><hr class="line"><h3>Apache Tomcat/8.0.21</h3></body></html>
Will
curl http://api.crossref.org/works/10.1103/PhysRevD.92.012012 | python -m json.tool | less
Will
Will
Liz
Liz
Liz
Liz
Cat
Cat
Cat
Angel
Organizations wants to be up to date with the latest information we have in our registry
To do that, some of them decide to start pulling the public api
Depeding on how fast they are doing that, or, depending on how many organizations are polling at the same time, our servers get overheated, which affects the overall performance of the API
Also, depending on how fast an organization is doing the polling or how much data is he trying to pull, we could confuse that with a denial of service attack, so, for our security, we have to block the requests, which doesn’t makes the organizations happy at all
Angel
Good news is that we have other ways to get record updates
The prefered one would be webhooks, where you can register to a record and get notifications every time that record is updated
Other way of doing this is with our serch api, which will allow you to search by last modified date, so, you could query for the records that were modified after the last time you synchronized your data.
And there will be an on-demand public data dump that will be available soon but thats for another slide
Search by last modified date:
curl -H "Content-Type: application/orcid+xml" "https://pub.sandbox.orcid.org/v1.2/search/orcid-bio/?q=profile-last-modified-date:%5B2015-05-06T00:00:00Z%20TO%20NOW%5D&start=1&rows=10"
Angel
Once a month we generate a file called the public data dump, where we fetch all our public records, put them into a tar file and make it available for members
This causes a similar issue than polling the api
We need a lot of resources to finish it fast enough
Our servers get overheated
It is two folders, one that contains xmls and other that contains jsons, and we then put them all in a tar compressed file
So, if you hate one format, it doesnt matter, you have to take it, it’s all or nothing
Angel
So, we are working on a new on-demand data dump
Real time
Ability to sync after the first time you get it
It will have sharding structure (based on the checksum of the orcid id), which make it easiers to read and synchornize
You could decide which format you want
And you could also decide which message version you want