This REST API gives access to data from KulturPunkt to external applications.
The base url for all API functions is https://api.kulturpunkt.org/v2
Base url during development: https://dev-api.kulturpunkt.org/v2
Every API request requires a unique site key for your client. Contact KulturIT to obtain your site key. The site key should be submitted through the http header 'api-key'.
The API currently only accepts GET requests. Data is returned in JSON format.
Most of the requests will return a status called 'result', which contains either 'success' or 'failed'. If it fails, an error is located in 'reason'. If it succeeds, the data returned is wrapped inside 'data'.
All of the text displayed to the end user can exist in multiple languages. The content in different languages are found in each elements' content object.
The system’s structure consists of a hierarchy of the following elements: Owner (eier), group (webpresentasjon), presentation (visning), member, record (kulturpunkt), page (side) and block. These elements are described below.
All of the published records can have relationships to each other, regardless of the presentations they appear in. Records can have multiple children and/or multiple parents.
All of the identifiers (ids) are continuous counting integers, meaning they don't start at 1 under each parent element. For instance, a record with id 1 may have two pages with id 1 and 2, and pages under a record with id 3 may have the ids 3 and 4.
Some of the elements have a type attribute, or other attributes with predefined values, which may give the element different properties, or may need a translation in your application.
The different elements and types are:
Images are served as .jpg.
Videos are converted to and served as mp4, webm and ogv, and a thumbnail is generated.
Audio are converted to and served as mp3.
https://api.kulturpunkt.org/v2/owners/
https://api.kulturpunkt.org/v2/owners/1
https://api.kulturpunkt.org/v2/owners/1/groups/1
https://api.kulturpunkt.org/v2/owners/1/presentations/2
https://api.kulturpunkt.org/v2/owners/1/records/2?presentation_id=2
/v2/record/nearbyGET Returns records nearby a specified location Example: https://api.kulturpunkt.org/v2/record/nearby?location=61.108960,10.466015&start=10&rows=10&owner_id=18&radius=20000
|
---|
{ result: "success", "data": [ { "contents": { "no": { "description": "", "title": "Hammergården" }, "en": { "description": "", "title": "The hammer farm" }, }, "distance": 386, "group_id": 869, "id": 26507, "location": { "latitude": 59.905354, "longitude": 10.678743 }, "image": "https://dms-test.dimu.org:8443/image/012uNWbcy58V", "owner": { "id": 288, "title": "Maihaugen" } }, { "contents": { "no": { "description": "", "title": "Gundersengården" } }, "distance": 636, "group_id": 869, "id": 26523, "location": { "latitude": 60.905354, "longitude": 10.678743 }, "image": "https://dms-test.dimu.org:8443/image/012uNWbZy5gH", "owner": { "id": 288, "title": "Maihaugen" } } ] } |
/v2/record/mapGET Returns records with a location, optionally belonging to a specific owner Example: https://api.kulturpunkt.org/v2/record/map?location=59.908452,10.676749&owner_id=46
|
---|
{ result: "success", "data": [ { "contents": { "en": { "description": null, "title": "86. Woodshed from Bakka in Hålandsdalen" }, "no": { "description": null, "title": "86. Skytje fra Bakka i Hålandsdalen" } }, "image": "https://dms07.dimu.org/image/012uPWhRJx5e", "distance": 404, "group_id": 160, "id": 1091, "location": { "latitude": 59.905354, "longitude": 10.678743 }, "owner": { "id": 46, "title": "Norsk Folkemuseum" } }, { "contents": { "en": { "description": null, "title": "85. Stable from Øye in Varaldsøy" }, "no": { "description": null, "title": "85. Stall fra Øye i Varaldsøy" } }, "image": "https://dms07.dimu.org/image/012uPWhRJx5f", "distance": 407, "group_id": 160, "id": 1132, "location": { "latitude": 59.905303, "longitude": 10.678716 }, "owner": { "id": 46, "title": "Norsk Folkemuseum" } } ] } |
/v2/record/map/simpleGET Returns list with simple version of the records for a map, with location, distance, owner_id and id - optionally belonging to a specific owner Example: https://api.kulturpunkt.org/v2/record/map/simple?location=59.908452,10.676749&owner_id=46
|
---|
{ "data": [ { "distance": 52567, "id": 3292, "location": { "latitude": 61.1145543, "longitude": 10.4615076 }, "owner_id": 54 }, { "distance": 12164243, "id": 5187, "location": { "latitude": -55.98333299999999, "longitude": -67.2666668 }, "owner_id": 51 } ], "result": "success" } |
/v2/owner/nearbyGET Returns owner nearby a specified location Example: https://api.kulturpunkt.org/v2/owner/nearby?location=61.108960,10.466015&start=0&rows=5
|
---|
{ result: "success", "data": [ { "id": 289, "name": "Norsk Folkemuseum", "description": "<p>Norsk Folkemuseum is located at Bygdøy, Oslo.</p>", "distance": 70664, "location": { "latitude": 61.114347, "longitude": 10.463788 }, "groups": [ { "default_language": "en", "id": 877, "platform": "mobile", "status": "published", "title": "The open air museum" }, { "default_language": "en", "id": 875, "platform": "mobile", "status": "published", "title": "Paintings from the 17. century" } ] } ] } |
/v2/owners/GETReturns all owners Parameters: None
|
---|
/v2/owners/<owner_id>GETReturns one owner, with groups
|
---|
{ "data": { "default_language": "sv", "description": "<p>Nordiska Museet sine utstillinger.</p>", "location": { "latitude": 61.114347, "longitude": 10.463788 }, "groups": [ { "contents": { "sv": { "description": "Beskrivning", "title": "Tittel" } }, "default_language": "sv", "id": 187, "start_record_id": 2201, "title": "Testtittel" } ], "id": 48, "identifier": "s-nm", "name": "Nordiska museet" }, "result": "success" } |
/v2/owners/<owner_id>/groups/<group_id>GET Returns one group, with presentations and their metadata
|
---|
{ result: "success", "data": { "contents": { "sv": { "description": "Nybble-beskrivning", "title": "Nybble" }, "en": { "description": "Nybble-description", "title": "Nybble ..." }, "no": { "description": "Nybble-beskrivelse", "title": "Nybble ..." } }, "languages": [ { "code": "en", "name": { "name": "English", "native_name": "English" } }, { "code": "sv", "name": { "name": "Swedish", "native_name": "Svenska" } }, { "code": "no", "name": { "name": "Norwegian", "native_name": "Norsk" } } ], "default_language": "sv", "id": 187, "presentations": [ { "contents": { "sv": { "description": "Nybble-beskrivning-karta", "title": "Karta" } }, "icon": "http://mm01.dimu.no/image/012uPWhYiDXd", "id": 507, "type": "map_google" } ], "start_record_id": 2201, "start_record_image": "http://mm01.dimu.no/image/012uPWhYiDXd", "title": "Nybble" } } |
/v2/owners/<owner_id>/presentations/<presentation_id>GET Returns one presentation, with records and their metadata
|
---|
{ "data": { "contents": { "sv": { "description": "Nybble-beskrivning-karta", "title": "Karta" } }, "group": "Nybble", "group_id": 187, "id": 507, "map_type": "HYBRID", "records": [ { "contents": { "sv": { "description": "", "title": "Tre generationer vägar" } }, "location": { "latitude": 59.158996, "longitude": 16.020583 }, "member_id": 5283, "position": 1, "record_id": 1737, "resources": [ { "id": 4620, "type": "image", "url": "http://mm01.dimu.no/image/012uPWhYiDTA" } ] }, { "contents": { "sv": { "description": "", "title": "Potatisåkern" } }, "location": { "latitude": 59.159751, "longitude": 16.019469 }, "member_id": 5284, "position": 2, "record_id": 1802, "resources": [ { "id": 8221, "type": "image", "url": "http://mm01.dimu.no/image/012wWWjuUGRs" } ] }, { "contents": { "sv": { "description": "", "title": "Potatisgropar som förvaring" } }, "location": { "latitude": 59.159092, "longitude": 16.01921 }, "member_id": 5285, "position": 3, "record_id": 1800, "resources": [ { "id": 4621, "type": "image", "url": "http://mm01.dimu.no/image/012uPWhYiDTB" } ] }, { "contents": { "sv": { "description": "Nybble är namnet på denna historiska plats som är en del av Julita gård.", "title": "Välkommen till Nybble" } }, "location": { "latitude": 59.158822, "longitude": 16.020963 }, "member_id": 5287, "position": 4, "record_id": 2201, "resources": [ { "id": 4633, "type": "image", "url": "http://mm01.dimu.no/image/012uPWhYiDXd" } ] }, { "contents": { "sv": { "description": "", "title": "Mitt i Nybble by" } }, "location": { "latitude": 59.159556, "longitude": 16.020676 }, "member_id": 5288, "position": 5, "record_id": 1801, "resources": [ { "id": 4628, "type": "image", "url": "http://mm01.dimu.no/image/012uPWhYiDXY" } ] }, { "contents": { "sv": { "description": "", "title": "Fattigstugan från 1742" } }, "location": { "latitude": 59.159422, "longitude": 16.018447 }, "member_id": 5289, "position": 6, "record_id": 1799, "resources": [ { "id": 4623, "type": "image", "url": "http://mm01.dimu.no/image/012uPWhYiDTD" } ] } ], "resources": { "icon": null, "map_image": null, }, "type": "map_google" }, "result": "success" } |
/v2/owners/<owner_id>/groups/<group_id>/records/<record_id>GET Returns a published record, with its content, pages, location and license, along with related records and the presentation(s) it belongs to.
Example: /v2/owners/1/groups/4/records/2?presentation_id=3 |
---|
{ "data": { "all_presentations": [ { "contents": { "de": { "title": "" }, "en": { "title": "" }, "es": { "title": "" }, "fr": { "title": "" }, "no": { "title": "" }, "sv": { "title": "Karta" } }, "id": 507, "type": "map_google" } ], "children": [ { "contents": { "sv": { "description": "", "title": "Mitt i Nybble by" } }, "image": { "url": "http://mm01.dimu.no/image/012uPWhYiDXX" }, "record_id": 1801 }, { "contents": { "sv": { "description": "", "title": "Potatisåkern" } }, "image": { "url": "http://mm01.dimu.no/image/012wWWjuUGRs" }, "record_id": 1802 }, { "contents": { "sv": { "description": "", "title": "Fattigstugan från 1742" } }, "image": { "url": "http://mm01.dimu.no/image/012uPWhaCXzE" }, "record_id": 1799 }, { "contents": { "sv": { "description": "", "title": "Potatisgropar som förvaring" } }, "image": { "url": "http://mm01.dimu.no/image/012uPWhYiDTB" }, "record_id": 1800 } ], "contents": { "sv": { "description": "", "pages": [ { "blocks": [ { "data": [ { "contents": { "sv": { "description": "", "title": "Kartan visar var de tidigare landsvägarna låg" } }, "credits": [ { "name": "Lantmäteriet, bearbetning Anna Berg", "type": "photographer" } ], "dms_id": "012wWWQMLQxp", "filename": "Nybblekarta5.jpg", "id": 6944, "type": "image", "url": "http://mm01.dimu.no/image/012wWWQMLQxp" }, { "contents": { "sv": { "description": "", "title": "Den äldsta vägdragningen på karta från år 1775." } }, "credits": [ { "name": "Ur Nordiska museets arkiv", "type": "photographer" } ], "dms_id": "012wWWQMLR35", "filename": "Nybbleutsnitt.jpg", "id": 6945, "type": "image", "url": "http://mm01.dimu.no/image/012wWWQMLR35" }, { "contents": { "sv": { "description": "", "title": "Lindar är en del av den gamla allén." } }, "credits": [ { "name": "Karolina Kristensson, Nordiska museet", "type": "photographer" } ], "dms_id": "012uPWhYiDTA", "filename": "_FOA5556.jpg", "id": 4620, "type": "image", "url": "http://mm01.dimu.no/image/012uPWhYiDTA" } ], "id": 5034, "position": 1, "type": "image_video" }, { "data": [ { "contents": { "sv": { "description": "Tre generationer vägar", "title": "Tre generationer vägar" } }, "credits": [], "dms_id": "012wWWQGs6or", "filename": "Tre generationer vägar.mp3", "id": 5796, "type": "audio", "url": { "mp3": "http://mm.dimu.org/multimedia/012wWWQGs6or.mp3?mmid=012wWWQGs6or&a=none", "ogg": "http://mm.dimu.org/multimedia/012wWWQGs6or.ogg?mmid=012wWWQGs6or&a=none" } } ], "id": 6755, "position": 2, "type": "audio" }, { "data": "<p>Landsvägen har genom åren haft tre olika sträckningar genom Nybble.</p>", "id": 5035, "position": 3, "type": "text" }, { "contents": { "no": { "description": "", "title": "Test av Sketchfab-objekt" } }, "credits": [], "id": 16229, "owner_id": 37, "title": "Sketchfab-test", "type": "sketchfab", "type_id": 8, "u_id": "block-20653-resource-20653", "url": "https://sketchfab.com/models/a668103a96874b80a8421f22fbb5c74f/embed", } ], "id": 3097, "position": 1, "title": "Tre generationer vägar" } ], "title": "Tre generationer vägar" } }, "id": 1737, "images": [], "license": { "code": "copyright", "description": "Copyright", "id": 1 }, "location": { "latitude": 59.158996, "longitude": 16.020583 }, "parents": [ { "contents": { "sv": { "description": "Nybble är namnet på denna historiska plats som är en del av Julita gård.", "title": "Välkommen till Nybble" } }, "image": { "url": "http://mm01.dimu.no/image/012uPWhYiDXd" }, "record_id": 2201 }, { "contents": { "sv": { "description": "", "title": "Mitt i Nybble by" } }, "image": { "url": "http://mm01.dimu.no/image/012uPWhYiDXX" }, "record_id": 1801 }, { "contents": { "sv": { "description": "", "title": "Potatisåkern" } }, "image": { "url": "http://mm01.dimu.no/image/012wWWjuUGRs" }, "record_id": 1802 }, { "contents": { "sv": { "description": "", "title": "Fattigstugan från 1742" } }, "image": { "url": "http://mm01.dimu.no/image/012uPWhaCXzE" }, "record_id": 1799 }, { "contents": { "sv": { "description": "", "title": "Potatisgropar som förvaring" } }, "image": { "url": "http://mm01.dimu.no/image/012uPWhYiDTB" }, "record_id": 1800 } ], "presentation": { "contents": { "sv": { "title": "Karta" } }, "id": 507, "type": "map_google" }, "use_simple_list": true }, "result": "success" } |
Comments: All_presentations contains all of the presentations the record is a member of.
Presentation contains the presentation specified in parameter presentation_id.
Children contains related records, usually meaning something like "These are naturally the next records to check out!"
Parents also contains related records, but these are records that naturally leads to this one (previous).
/v2/owners/<owner_id>/records/<record_id>/simpleGET Returns a simple version of one record Example: https://api.kulturpunkt.org/v2/owners/51/records/5085/simple Parameters: None |
---|
{ "data": { "contents": { "de": { "active": false, "description": null, "pages": [], "title": null }, "en": { "active": false, "description": null, "pages": [], "title": null }, "es": { "active": false, "description": null, "pages": [], "title": null }, "fr": { "active": false, "description": null, "pages": [], "title": null }, "no": { "active": false, "description": null, "pages": [], "title": null }, "sv": { "active": true, "description": null, "pages": [], "title": "Briggen ANNA CHATARINA" } }, "group_id": 380, "id": 5085, "image": "https://dms-cf-09.dimu.org/image/032ykz1yJe1V", "owner_id": 51 }, "result": "success" } |
/v2/owners/<owner_id>/groups/<group_id>/geographyGET Returns all records within a published presentation in a group, that have geographic coordinates. Returns record metadata (id, title, description and coordinates). This can for instance be used to make a map over an entire group.
|
---|
{ "result": "success", "data": { "records": [ { "contents": { "en": { "description": "The Nordiska museet is a museum located on Djurgården, Stockholm, dedicated to the cultural history and ethnography of Sweden.", "title": "Nordiska museet: Points of Interest" }, "sv": { "description": "Nordiska museet ligger på Djurgården i Stockholm och är ett museum för kulturhistoria i Sverige.", "title": "Nordiska museets kulturpunkter" } }, "latitude": 59.329296, "longitude": 18.094326, "record_id": 27710 }, { "contents": { "sv": { "description": null, "title": "Märta Helena Reenstjerna" } }, "latitude": 59.32893, "longitude": 18.06491, "record_id": 27131 } ] } } |
/v2/owners/<owner_id>/groups/<group_id>/nearbyGET Returns all published, geographically placed records within a specified radius of a specific geographic point.
Example: /v2/owners/1/groups/1/nearby?lat=60.927227&long=10.697916&radius=20000 |
---|
{ "result": "success", "data": { "records": [ { "contents": { "en": { "description": "The Nordiska museet is a museum located on Djurgården, Stockholm, dedicated to the cultural history and ethnography of Sweden.", "title": "Nordiska museet: Points of Interest" }, "sv": { "description": "Nordiska museet ligger på Djurgården i Stockholm och är ett museum för kulturhistoria i Sverige.", "title": "Nordiska museets kulturpunkter" } }, "latitude": 59.329296, "longitude": 18.094326, "record_id": 27710 }, { "contents": { "sv": { "description": null, "title": "Märta Helena Reenstjerna" } }, "latitude": 59.32893, "longitude": 18.06491, "record_id": 27131 } ] } } |
/v2/code/<code>GET Get record data associated with a code Example: https://api.kulturpunkt.org/v2/code/abc123
|
---|
{ "data": { "group_id": 138, "media_modal_from_code": true, "owner": { "ga_code": "UA-29787204-5", "id": 37, "identifier": "kit" }, "record_id": 521, "type": "record" }, "result": "success" } |
/v2/beaconGET Get record data associated with a beacon
|
---|
{ "result": "success", "data": { "beacon": { "uuid": "b9407f30-f5f8-466e-aff9-25556b57fe6d", "major": 47745, "minor": 60940, "alert_user": false }, "record": { "contents": { "no": { "description": "Ellew Olsen dimitteres etter 11 års militær tjeneste.", "title": "Historien om soldaten Ellew Olsen Sandboe (digital fortelling)" } }, "group_id": 868, "id": 26494, "image": "https://dms-test.dimu.org:8443/image/012uNWbcwPVe", "owner": { "id": 288, "title": "Maihaugen" } } } } |
/v2/beacon/allGET Get all beacons associated with published records Example: http://api.kulturpunkt.org/v2/beacon/all No parameters needed
|
---|
/v2/owners/<owner_id>/searchGet Returns all records with a title matching a search string. If a group id is specified, only records from this group are returned. Otherwise, all of the owner's records are queried. Records are queried with a simple "LIKE" on their language specific titles.
Example: /v2/owners/1/search?q=punkt%203&lang=no&group_id=1 |
---|
{ result: "success", data: [ { record_id: 4, contents: [ { description: "Beskrivelse kulturpunkt 3 norsk", title: "Kulturpunkt 3 norsk" } ], }, { record_id: 24, contents: [ { description: "Beskrivelse kulturpunkt 3 norsk", title: "Kulturpunkt 3 norsk" } ] } ] } |
Comments: If group_id is omitted, all of the owner's records are queried.