Kulturpunkt API v2 Documentation

Introduction

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.

Architecture 

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.

  • Owner – Usually a museum or an institution. Most API clients only have access to one owner.
  • Group – Within an owner you may want a way to separate different types of content. Groups are the way to do that. A group is basically a collection of presentations.
  • Presentation – A presentation is where you find the actual objects. We currently have three types of presentations:
    • Theme – A theme is a collection of objects in a flat structure, with a theme that they all have in common. Examples are Paintings, Edvard Munch and Oslo. The objects have a position within the presentation.
    • Map – A geographic map with objects placed with latitude/longitude
    • Tour – Same as map, but in addition to a placement on the map, the objects are organized in routes, determined by their position

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.

  • (Member – A member is an entity that represents a record in a presentation. The member holds the record, in addition to presentation-specific attributes like position and map coordinates) 
  • Record – The main object (a kulturpunkt is a record). A record can have a image, title and description in multiple languages (under 'content'). A record can be a building, a painting, a person, or similar. The rest of the content is located in the record's pages.
  • Language - An abstract level. Each page belongs to one (and only one) language. 
  • Page – Pages belong to a record. A record can have multiple pages. Pages are the main container for contents, organized in content blocks. Having more than one page in each record is not recommended.
  • Block - Blocks of content. See "Types" for the different types of blocks. The type "image_video" can contain a mix of images and videos. 

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. 

"Types"

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:

  • License (Creative Commons + copyright)
    • Description: "Copyright", code: "copyright"
    • Description: "Attribution-NonCommercial-NoDerivs", code: "by-nc-nd"
    • Description: "Attribution-NonCommercial-ShareAlike", code: "by-nc-sa"
    • Description: "Attribution-ShareAlike", code: "by-sa"
    • Description: "Attribution-NoDerivs", code: "by-nd"
    • Description: "Attribution-NonCommercial", code: "by-nc"
    • Description: "Attribution", code: "by"
    • Description: "Public Domain Dedication", code: "pdd"
    • Description: "Public Domain Mark", code: "pdm"
  • Resource - Type
    • "image", "audio", "video", "youtube", "vimeo", "document", "sketchfab", "other"
  • Credit - Type
    • "photographer", "artist", "author", "director", "voice", "owner"
  • Presentation - Type
    • "map_google", "tour", "theme"
  • Block - Type
    • "text", "links", "audio", "image_video", "document"

Multimedia

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.

URL examples

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

API Endpoints

Get records nearby

/v2/record/nearby

 GET

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

ParameterTypeDescriptionRequired
locationStringlatitude and longitude, separated by commaYes
startIntegerOffset in result set. Use for pagingNo (default is 0)
rowsIntegerNr of results. Use for paging. Maximum 200. If 'radius' is included, 'rows' and 'start' is ignored.No (default is 10)
radiusIntegerRadius from 'location' in metres to include in the search. If used, 'rows' and 'start' is ignored.No
owner_idIntegerOwner's id. If included, only records from this owner are includedNo
group_idIntegerGroup's id. If included, only records from this group are includedNo
Example of return data
{
	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"
            }
        }
	]
}

Get records for map

/v2/record/map

 GET

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

ParameterTypeDescriptionRequired
locationStringlatitude and longitude, separated by commaYes
owner_idIntegerOwner's id. If included, only records from this owner are includedNo
group_idIntegerGroup's id. If included, only records from this group are includedNo
Example of return data
{
	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"
            }
        }
	]
}

Get simple records for map

/v2/record/map/simple

 GET

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

ParameterTypeDescriptionRequired
locationStringlatitude and longitude, separated by commaYes
owner_idIntegerOwner's id. If included, only records from this owner are includedNo
group_idIntegerGroup's id. If included, only records from this group are includedNo
Example of return data
{
    "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"
}

Get owners nearby

/v2/owner/nearby

 GET

Returns owner nearby a specified location

Example: https://api.kulturpunkt.org/v2/owner/nearby?location=61.108960,10.466015&start=0&rows=5

ParameterTypeDescriptionRequired
locationStringlatitude and longitude, separated by commaYes
startIntegerOffset in result set. Use for pagingNo (default is 0)
rowsIntegerNr of results. Use for paging. Maximum 20No (default is 5)
Example of return data
 {
	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"
                }
            ]
        }
	]
}

Get all owners

/v2/owners/

GET

Returns all owners

Parameters: None

Example of return data
{
	result: "success",
	data: [
		{
			description: "Maihaugen er et stort museum på Lillehammer",
			id: 1,
			identifier: "MH",
			name: "Maihaugen",
			"default_language": "no",
			"location": {
                "latitude": 61.114347,
                "longitude": 10.463788
            },
			"groups": [
                {
                    "contents": {
                        "no": {
                            "description": null,
                            "title": "Museet og omegn"
                        }
                    },
                    "default_language": "no",
                    "id": 207,
                    "start_record_id": 2712,
                    "title": "Museet og omegn"
                }
			]
		},
		{
			description: "Norsk Folkemuseum ligger på Bygdøy i Oslo",
			id: 2,
			identifier: "NF",
			name: "Norsk Folkemuseum",
			"default_language": "no",
			"groups": [
                {
                    "contents": {
                        "no": {
                            "description": null,
                            "title": "Byen"
                        },
						"en": {
                            "description": null,
                            "title": "The town"
                        }
                    },
                    "default_language": "no",
                    "id": 207,
                    "start_record_id": 2712,
                    "title": "Byen"
                }
			]
		}
	],
}

Get one owner, with groups

/v2/owners/<owner_id>

 GET

Returns one owner, with groups

ParameterTypeDescriptionRequired
owner_idIntegerOwner's idYes
Example of return data
{
    "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"
}

Get one group, with presentations

/v2/owners/<owner_id>/groups/<group_id>

 GET

Returns one group, with presentations and their metadata

ParameterTypeDescriptionRequired
owner_idIntegerOwner's idYes
group_idIntegerGroup's idYes
Example of return data
 {
	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"
    }
}

Get one presentation, with records

/v2/owners/<owner_id>/presentations/<presentation_id>

GET

Returns one presentation, with records and their metadata

ParameterTypeDescriptionRequired
owner_idIntegerOwner's idYes
presentation_idIntegerPresentation's idYes
Example of return data
 {
    "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"
}

Get one record

/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. 

ParameterTypeDescriptionRequired
owner_idIntegerOwner's id

Yes

record_idIntegerRecord's idYes
presentation_idInteger

Used to specify which presentation the record belongs to (or which presentation the user came from).
If present, the presentation's metadata will be included (in presentation).
If present, it must be correct, otherwise the record is not found.

No

Example: /v2/owners/1/groups/4/records/2?presentation_id=3

Example of return data
 {
    "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).

Get simple record

/v2/owners/<owner_id>/records/<record_id>/simple

GET

Returns a simple version of one record

Example: https://api.kulturpunkt.org/v2/owners/51/records/5085/simple 

Parameters: None

Example of return data
{
    "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"
}

Get geographically placed records from a group

/v2/owners/<owner_id>/groups/<group_id>/geography

GET

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.

ParameterTypeDescriptionRequired
owner_idIntegerOwner's idYes
group_idIntegerGroup's idYes
Example of return data
{
	"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
            }        
		]
    }
}

Get records nearby a specified location, within a specific group

/v2/owners/<owner_id>/groups/<group_id>/nearby

GET

Returns all published, geographically placed records within a specified radius of a specific geographic point.

ParameterTypeDescriptionRequired
owner_idIntegerOwner's idYes
group_idIntegerGroup's idYes
latFloatLatitude (WGS84)Yes
longFloatLongitude (WGS84)Yes
radiusIntegerRadius in meters from the point specified by lat/longYes

Example: /v2/owners/1/groups/1/nearby?lat=60.927227&long=10.697916&radius=20000

Example of return data
{
    "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
            }        
        ]
    }
}

Get record from code

/v2/code/<code>

GET

Get record data associated with a code

Example: https://api.kulturpunkt.org/v2/code/abc123

ParameterTypeDescriptionRequired
codeStringCodeYes


Example of return data
 {
    "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"
}

Get record from beacon

/v2/beacon

 GET

Get record data associated with a beacon

Example: http://api.kulturpunkt.org/v2/beacon?uuid=b9407f30-f5f8-466e-aff9-25556b57fe6d&major=47745&minor=60940

ParameterTypeDescriptionRequired
uuidStringBeacon uuidYes
majorIntegerBeacon majorYes
minorIntegerBeacon minorYes
Example of return data
 {
    "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"
            }
        }
    }
}


Get all beacons (not available for all clients)

/v2/beacon/all

 GET

Get all beacons associated with published records

Example: http://api.kulturpunkt.org/v2/beacon/all

No parameters needed

Example of return data
{
    "result": "success",
    "data": [
        {
            "beacon": {
                "uuid": "b9407f30-f5f8-466e-aff9-25556b57fe6d",
                "major": 47745,
                "minor": 60940,
				"alert_user": true
            },
            "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"
                }
            }
        },
        {
            "beacon": {
				"uuid": "b9407f30-f5f8-466e-aff9-25556b57fe6d",
                "major": 59944,
                "minor": 46357,               
				"alert_user": true
            },
            "record": {
                "contents": {
                    "no": {
                        "description": "",
                        "title": "Anders Sandvig - Maihaugens grunnlegger"
                    }
                },
                "group_id": 868,
                "id": 26499,
                "image": "https://dms-test.dimu.org:8443/image/012uNWbYW6mN",
                "owner": {
                    "id": 288,
                    "title": "Maihaugen"
                }
            }
        }
    ]
}

NOT READY YET:

Search records

/v2/owners/<owner_id>/search

Get

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.

ParameterTypeDescriptionRequired
owner_idIntegerOwner's idYes
qStringSearch string for matching against record's titlesYes
langStringLanguage used in the search. This must be the langauges locale code (ex: "no", "se", "en")Yes
group_idIntegerSpecify witch group to search withinNo

Example: /v2/owners/1/search?q=punkt%203&lang=no&group_id=1

Example of return data
{
	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.