Last active
April 30, 2017 20:19
Revisions
-
RubenVerborgh revised this gist
Apr 30, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,4 +91,4 @@ $ curl http://europeana.eu/api/v2/record/92037/_http___www_bl_uk_onlinegallery_o ``` This works. 27. I wonder why it didn't work in step 21, only to find out that I had not added the extension `.json`. I also wonder if there is any other way of getting the object ID instead of copying from the URL. -
RubenVerborgh revised this gist
Apr 30, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -90,4 +90,5 @@ $ curl http://europeana.eu/api/v2/record/08501/03F4577D418DC84979C4E2EE36F99FECE $ curl http://europeana.eu/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.json?wskey=xxxxxxxxx ``` This works. 26. I wonder why it didn't work in step 21, only to find out that I had not added the extension `.json`. I also wonder if there is any other way of getting the object ID instead of copying from the URL. -
RubenVerborgh revised this gist
Nov 29, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # Accessing data through APIs **Update: my blog post [The lie of the API](http://ruben.verborgh.org/blog/2013/11/29/the-lie-of-the-api/) details the issues with current APIs.** Background: I'm a researcher in semantic hypermedia, at the moment comparing different APIs for accessing metadata for human and machine consumption. Story: I am browsing a cultural website and want to retrieve the metadata of the object I'm looking at in a machine-readable format. The steps below are the actual steps that I've undertaken on different sites. -
RubenVerborgh revised this gist
Nov 27, 2013 . 1 changed file with 13 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,32 +8,32 @@ Story: I am browsing a cultural website and want to retrieve the metadata of the I'm looking at the object http://collection.cooperhewitt.org/objects/35460799/. 1. To retrieve this in JSON, I just take copy that URL and do: ``` $ curl -H "Accept: application/json" http://collection.cooperhewitt.org/objects/35460799/ ``` ## Example: DBpedia I'm looking at the person http://dbpedia.org/resource/Arthur_Rimbaud 1. To retrieve this in JSON, I just take copy that URL and do: ``` $ curl -L -H "Accept: application/json" http://dbpedia.org/resource/Arthur_Rimbaud ``` <br> There's even RDF if I need it (same URL): ``` $ curl -L -H "Accept: text/turtle" http://dbpedia.org/resource/Arthur_Rimbaud ``` ## Example: Europeana I'm looking at the object http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24 1. To retrieve JSON, I try ``` $ curl -H "Accept: application/json" http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html ``` 2. I try to make sense of the following output: ``` <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 406 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 3. I [search for the documentation](https://www.google.com/search?q=europeana+api+documentation). @@ -49,42 +49,42 @@ where I see that I have to register. 12. I am informed that I need to use the URL template `http://europeana.eu/api/v2/record/[recordID].json`. This URL template has the parameters `recordID`, `callback`, `profile`. I only understand the second one without reading, but I don't need it (not using JSON-P). 13. Hoping to find the Record ID, I go back to [the page I opened in the beginning](http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24). I look through the whole page and find nothing called "Record ID", but I find a field "Identifier" with string `019ADDOR0000002U00000000`. 14. I now feel ready to make my first API call and try ``` $ curl http://europeana.eu/api/v2/record/019ADDOR0000002U00000000.json?apikey=xxxxxxxxx ``` where xxxxxxxxx is my actual API key, using the `apikey` field name I found earlier. 15. I try to make sense of the following output: ``` <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /api/v2/record/019ADDOR0000002U00000000.json</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/api/v2/record/019ADDOR0000002U00000000.json</u></p><p><b>description</b> <u>The requested resource (/api/v2/record/019ADDOR0000002U00000000.json) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 16. Thinking I might have not used the API key properly, I go back to [Working with the API](http://www.europeana.eu/portal/api-working-with-api.html) and now see something about a `wskey` parameter. So the _field_ is called `apikey` but the parameter `wskey`. I assume this is a URL query string parameter. 17. I try the request again: ``` $ curl http://europeana.eu/api/v2/record/019ADDOR0000002U00000000.json?wskey=xxxxxxxxx ``` 18. I visually check whether the error output is the same: ``` <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /api/v2/record/019ADDOR0000002U00000000.json</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/api/v2/record/019ADDOR0000002U00000000.json</u></p><p><b>description</b> <u>The requested resource (/api/v2/record/019ADDOR0000002U00000000.json) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 19. I suspect I might have gotten the identifier wrong. I go back to the [original page](http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24) and start looking into the source code whether I can find an identifier. I only find `019ADDOR0000002U00000000`, which I have tried already. 20. I go back to the [Working with the API](http://www.europeana.eu/portal/api-working-with-api.html) page and click the link [Europeana ID](http://www.europeana.eu/portal/api-data-structure.html#EuropeanaID) next to the `recordID` field, where I read the following explanation: _Digital records delivered to Europeana are assigned a unique identifier, Europeana ID, that serves to further identify the records when using the API. Usually, this identifier is based on the original metadata that are provided for the record and internal Europeana identifiers of the provider and the dataset containing the record. For example, a Europeana ID of an object can look as follows: /09102/_GNM_1234 where 091 is the identifier of the provider, 02 is the id of the dataset and _GNM_1234 is derived from the unique identifier of the record in the context of the provider._ 21. I inspect the URL to see whether I can find such an identifier: http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24. Indeed, there is a part "92037/", but the thing that follows it does not look like that. I find this strange, but try it anyway: ``` $ curl http://europeana.eu/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html?apikey=xxxxxxxxx ``` 22. I get the error message ``` <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html</u></p><p><b>description</b> <u>The requested resource (/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 23. I try to [Google for "http://europeana.eu/api/v2/record"](https://www.google.com/search?q=%22europeana.eu%2Fapi%2Fv2%2Frecord%22) to see if anybody else got the API working. 24. I arrive at the [npm package registry](https://npmjs.org/package/europeana) and find a JSON fragment that mentions the link `http://europeana.eu/api/v2/record/08501/03F4577D418DC84979C4E2EE36F99FECED4C7B11.json?wskey=abc123`. 25. I add my own API key to test whether I can retrieve this random object: ``` $ curl http://europeana.eu/api/v2/record/08501/03F4577D418DC84979C4E2EE36F99FECED4C7B11.json?wskey=xxxxxxxxx ``` 26. This works; but it's not the object that I wanted. Now let's try replacing the object identifier by `92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html`: ``` $ curl http://europeana.eu/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.json?wskey=xxxxxxxxx ``` This works. -
RubenVerborgh revised this gist
Nov 27, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ I'm looking at the person http://dbpedia.org/resource/Arthur_Rimbaud ```bash $ curl -L -H "Accept: application/json" http://dbpedia.org/resource/Arthur_Rimbaud ``` <br> There's even RDF if I need it (same URL): ```bash $ curl -L -H "Accept: text/turtle" http://dbpedia.org/resource/Arthur_Rimbaud -
RubenVerborgh created this gist
Nov 27, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,90 @@ # Accessing data through APIs Background: I'm a researcher in semantic hypermedia, at the moment comparing different APIs for accessing metadata for human and machine consumption. Story: I am browsing a cultural website and want to retrieve the metadata of the object I'm looking at in a machine-readable format. The steps below are the actual steps that I've undertaken on different sites. ## Example: Cooper-Hewitt museum I'm looking at the object http://collection.cooperhewitt.org/objects/35460799/. 1. To retrieve this in JSON, I just take copy that URL and do: ```bash $ curl -H "Accept: application/json" http://collection.cooperhewitt.org/objects/35460799/ ``` ## Example: DBpedia I'm looking at the person http://dbpedia.org/resource/Arthur_Rimbaud 1. To retrieve this in JSON, I just take copy that URL and do: ```bash $ curl -L -H "Accept: application/json" http://dbpedia.org/resource/Arthur_Rimbaud ``` There's even RDF if I need it (same URL): ```bash $ curl -L -H "Accept: text/turtle" http://dbpedia.org/resource/Arthur_Rimbaud ``` ## Example: Europeana I'm looking at the object http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24 1. To retrieve JSON, I try ```bash $ curl -H "Accept: application/json" http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html ``` 2. I try to make sense of the following output: ```html <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 406 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 3. I [search for the documentation](https://www.google.com/search?q=europeana+api+documentation). 4. I end up on [this page](http://pro.europeana.eu/api) and click "API documentation". 5. I end up on the [Introduction page](http://www.europeana.eu/portal/api-introduction.html), where I see that I have to register. 6. On the [registration page](http://www.europeana.eu/portal/api/registration.html), I enter my e-mail address. 7. I receive an e-mail and click the link. 8. I receive my API key. 9. I click through to [Working with the API](http://www.europeana.eu/portal/api-working-with-api.html) and take a mental note about a field named `apikey`. 10. I go to [Sample code](http://www.europeana.eu/portal/api-sample-code-and-libraries.html). No, that's not it. 11. I go to [API methods](http://www.europeana.eu/portal/api-methods.html) and see that `record.json` (is it a method or a file) looks like what I need, so [I click it](http://www.europeana.eu/portal/api-record-json.html). 12. I am informed that I need to use the URL template `http://europeana.eu/api/v2/record/[recordID].json`. This URL template has the parameters `recordID`, `callback`, `profile`. I only understand the second one without reading, but I don't need it (not using JSON-P). 13. Hoping to find the Record ID, I go back to [the page I opened in the beginning](http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24). I look through the whole page and find nothing called "Record ID", but I find a field "Identifier" with string `019ADDOR0000002U00000000`. 14. I now feel ready to make my first API call and try ```bash $ curl http://europeana.eu/api/v2/record/019ADDOR0000002U00000000.json?apikey=xxxxxxxxx ``` where xxxxxxxxx is my actual API key, using the `apikey` field name I found earlier. 15. I try to make sense of the following output: ```html <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /api/v2/record/019ADDOR0000002U00000000.json</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/api/v2/record/019ADDOR0000002U00000000.json</u></p><p><b>description</b> <u>The requested resource (/api/v2/record/019ADDOR0000002U00000000.json) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 16. Thinking I might have not used the API key properly, I go back to [Working with the API](http://www.europeana.eu/portal/api-working-with-api.html) and now see something about a `wskey` parameter. So the _field_ is called `apikey` but the parameter `wskey`. I assume this is a URL query string parameter. 17. I try the request again: ```bash $ curl http://europeana.eu/api/v2/record/019ADDOR0000002U00000000.json?wskey=xxxxxxxxx ``` 18. I visually check whether the error output is the same: ```html <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /api/v2/record/019ADDOR0000002U00000000.json</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/api/v2/record/019ADDOR0000002U00000000.json</u></p><p><b>description</b> <u>The requested resource (/api/v2/record/019ADDOR0000002U00000000.json) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 19. I suspect I might have gotten the identifier wrong. I go back to the [original page](http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24) and start looking into the source code whether I can find an identifier. I only find `019ADDOR0000002U00000000`, which I have tried already. 20. I go back to the [Working with the API](http://www.europeana.eu/portal/api-working-with-api.html) page and click the link [Europeana ID](http://www.europeana.eu/portal/api-data-structure.html#EuropeanaID) next to the `recordID` field, where I read the following explanation: _Digital records delivered to Europeana are assigned a unique identifier, Europeana ID, that serves to further identify the records when using the API. Usually, this identifier is based on the original metadata that are provided for the record and internal Europeana identifiers of the provider and the dataset containing the record. For example, a Europeana ID of an object can look as follows: /09102/_GNM_1234 where 091 is the identifier of the provider, 02 is the id of the dataset and _GNM_1234 is derived from the unique identifier of the record in the context of the provider._ 21. I inspect the URL to see whether I can find such an identifier: http://www.europeana.eu/portal/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.html?start=1&query=david+ochterlony+hookah&startPage=1&rows=24. Indeed, there is a part "92037/", but the thing that follows it does not look like that. I find this strange, but try it anyway: ```bash $ curl http://europeana.eu/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html?apikey=xxxxxxxxx ``` 22. I get the error message ```html <html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html</u></p><p><b>description</b> <u>The requested resource (/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html> ``` 23. I try to [Google for "http://europeana.eu/api/v2/record"](https://www.google.com/search?q=%22europeana.eu%2Fapi%2Fv2%2Frecord%22) to see if anybody else got the API working. 24. I arrive at the [npm package registry](https://npmjs.org/package/europeana) and find a JSON fragment that mentions the link `http://europeana.eu/api/v2/record/08501/03F4577D418DC84979C4E2EE36F99FECED4C7B11.json?wskey=abc123`. 25. I add my own API key to test whether I can retrieve this random object: ```bash $ curl http://europeana.eu/api/v2/record/08501/03F4577D418DC84979C4E2EE36F99FECED4C7B11.json?wskey=xxxxxxxxx ``` 26. This works; but it's not the object that I wanted. Now let's try replacing the object identifier by `92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html`: ```bash $ curl http://europeana.eu/api/v2/record/92037/_http___www_bl_uk_onlinegallery_onlineex_apac_addorimss_s_019addor0000002u00000000_html.json?wskey=xxxxxxxxx ``` This works. 26. I wonder why it didn't work in step 21, only to find out that I had not added the extension `.json`. I also wonder if there is any other way of getting the object ID instead of copying from the URL.