by Seth van Hooland and Ruben Verborgh
REST introduces 4 uniform interface constraints:
The Web supports all 4 uniform interface constraints:
Content-Type
header
details the media type.
<em>http://perdu.com/</em>
<a href="http://perdu.com/">Perdu?</a>
An urban architect cannot control individual buildings.
http://example.org/songs/showDetails.php
http://example.org/songs/3563642
http://example.org/songs/3563642 results in HTML.
http://api.example.org/getObjectJson.php?id=18353113 results in JSON.
http://example.org/songs/3563642 results in HTML.
And results in JSON.
And results in XML.
/songs?artist=5521
/?page=2
/?page=3
/songs?artist=5521
/songs?artist=5521&page=2
/songs?artist=5521&page=3
{
"title": "War and Peace",
"artist": {
"id": 5521
}
}
{
"title": "War and Peace",
"artist": {
"id": "http://example.org/
artists/5521"
}
}
http://google.com/
http://google.com/documentation.html
To use this site,
enter your search term as follows:
http://www.google.com/search?q=search+term
Which one would be easier?
All of that wasn’t necessary for the website,
even though it contains the exact same information.
http://europeana.eu/api/v2/record/9200229/BibliographicResource_3000135601313.json?wskey=xxxxxxxxx
{
"apikey": "xxxxxxxxx",
"action": "--deprecated--",
"success": true,
"statsDuration": 110,
"requestNumber": 999,
"object": {
"type": "IMAGE",
"edmDatasetName": [ "9200229_Ag_EU_TEL_a1112_LibGent" ],
"title": [ "Belfort, Botermarkt, Gent klokkentoren (1853)" ],
"about": "/9200229/BibliographicResource_3000135601313",
"europeanaAggregation": {
"about": "/aggregation/europeana/9200229/BibliographicResource_3000135601313",
"aggregatedCHO": "/item/9200229/BibliographicResource_3000135601313",
"edmLandingPage": "http://europeana.eu/portal/record/9200229/BibliographicResource_3000135601313.html",
"edmCountry": { "def": [ "belgium" ] },
"edmLanguage": { "def": [ "mul" ] },
"edmRights": {
"def": [ "https://creativecommons.org/licenses/by-sa/4.0/" ]
},
"edmPreview": "http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fadore.ugent.be%2FOpenURL%2Fresolve%3Fsvc_id%3Dmedium%26url_ver%3DZ39.88-2004%26rft_id%3Darchive.ugent.be%3A3107D15A-BB55-11E3-8B3D-86C4D43445F2%3A1&size=LARGE&type=IMAGE"
},
"proxies": [
{
"about": "/proxy/provider/9200229/BibliographicResource_3000135601313",
"dcDescription": {
"def": [
"Stempel op keerzijde afbeelding: Copyright A.C.L.",
"Handgeschreven notitie op keerzijde afbeelding: 102308 B"
]
},
"dcFormat": { "en": [ "Printed" ] },
"dcIdentifier": { "def": [ "002075264" ] },
"dcRights": {
"def": [
"Reproductierecht Universiteitsbibliotheek Gent",
"CC BY-SA (4.0)"
]
},
"dcTitle": {
"def": [ "Belfort, Botermarkt, Gent klokkentoren (1853)" ]
},
"dcType": { "en": [ "Serial" ] },
"dctermsExtent": {
"def": [ "1 fotografische druk : : zwart/wit." ]
},
"dctermsIsPartOf": {
"def": [ "http://data.theeuropeanlibrary.org/Collection/a1112" ]
},
"dctermsIssued": {
"def": [
"1875? - 1930?",
"[eind 19e-begin 20e eeuw]."
]
},
"dctermsSpatial": {
"def": [ "België, Vlaanderen, Oost-Vlaanderen, Gent (9000), Gent (9000)" ]
},
"proxyIn": [
"/aggregation/provider/9200229/BibliographicResource_3000135601313"
],
"proxyFor": "/item/9200229/BibliographicResource_3000135601313",
"edmType": "IMAGE",
"europeanaProxy": false
},
{
"about": "/proxy/europeana/9200229/BibliographicResource_3000135601313",
"proxyIn": [
"/aggregation/europeana/9200229/BibliographicResource_3000135601313"
],
"proxyFor": "/item/9200229/BibliographicResource_3000135601313",
"edmType": "IMAGE",
"europeanaProxy": true
}
],
"aggregations": [
{
"about": "/aggregation/provider/9200229/BibliographicResource_3000135601313",
"edmDataProvider": {
"def": [ "Ghent University Library" ]
},
"edmIsShownBy": "http://adore.ugent.be/OpenURL/app?type=carousel&id=archive.ugent.be:3107D15A-BB55-11E3-8B3D-86C4D43445F2",
"edmObject": "http://adore.ugent.be/OpenURL/resolve?svc_id=medium&url_ver=Z39.88-2004&rft_id=archive.ugent.be:3107D15A-BB55-11E3-8B3D-86C4D43445F2:1",
"edmProvider": {
"en": [ "The European Library" ]
},
"edmRights": {
"def": [ "https://creativecommons.org/licenses/by-sa/4.0/" ]
},
"aggregatedCHO": "/item/9200229/BibliographicResource_3000135601313",
"webResources": [
{
"webResourceEdmRights": {
"def": [ "https://creativecommons.org/licenses/by-sa/4.0/" ]
},
"about": "http://adore.ugent.be/OpenURL/app?type=carousel&id=archive.ugent.be:3107D15A-BB55-11E3-8B3D-86C4D43445F2",
"textAttributionSnippet": "Belfort, Botermarkt, Gent klokkentoren (1853) - http://europeana.eu/portal/record/9200229/BibliographicResource_3000135601313.html. Ghent University Library. CC BY-SA - https://creativecommons.org/licenses/by-sa/4.0/",
"htmlAttributionSnippet": "<span about='http://data.europeana.eu/item/9200229/BibliographicResource_3000135601313'><a href='http://europeana.eu/portal/record/9200229/BibliographicResource_3000135601313.html'><span property='dc:title'>Belfort, Botermarkt, Gent klokkentoren (1853)</span></a>. Ghent University Library. <a href='https://creativecommons.org/licenses/by-sa/4.0/' rel='xhv:license http://www.europeana.eu/schemas/edm/rights'>CC BY-SA</a><span rel='cc:useGuidelines' resource='http://www.europeana.eu/rights/pd-usage-guide/'>.</span></span>"
},
{
"webResourceEdmRights": {
"def": [ "https://creativecommons.org/licenses/by-sa/4.0/" ]
},
"about": "http://adore.ugent.be/OpenURL/resolve?svc_id=medium&url_ver=Z39.88-2004&rft_id=archive.ugent.be:3107D15A-BB55-11E3-8B3D-86C4D43445F2:1",
"textAttributionSnippet": "Belfort, Botermarkt, Gent klokkentoren (1853) - http://europeana.eu/portal/record/9200229/BibliographicResource_3000135601313.html. Ghent University Library. CC BY-SA - https://creativecommons.org/licenses/by-sa/4.0/",
"htmlAttributionSnippet": "<span about='http://data.europeana.eu/item/9200229/BibliographicResource_3000135601313'><a href='http://europeana.eu/portal/record/9200229/BibliographicResource_3000135601313.html'><span property='dc:title'>Belfort, Botermarkt, Gent klokkentoren (1853)</span></a>. Ghent University Library. <a href='https://creativecommons.org/licenses/by-sa/4.0/' rel='xhv:license http://www.europeana.eu/schemas/edm/rights'>CC BY-SA</a><span rel='cc:useGuidelines' resource='http://www.europeana.eu/rights/pd-usage-guide/'>.</span></span>"
}
],
"edmPreviewNoDistribute": false
}
],
"providedCHOs": [
{
"about": "/item/9200229/BibliographicResource_3000135601313"
}
],
"europeanaCompleteness": 7,
"europeanaCollectionName": [ "9200229_Ag_EU_TEL_a1112_LibGent" ],
"language": [ "mul" ],
"timestamp_created_epoch": 1442493422613,
"timestamp_update_epoch": 1455546713777,
"timestamp_created": "2015-09-17T12:37:02.613Z",
"timestamp_update": "2016-02-15T14:31:53.777Z"
}
}
Which statements are true for REST APIs?
Why are different representations useful?
What does the hypermedia constraint of REST entail?
What makes the Europeana API more difficult than the website?