Offentligkonst.se/Om projektet/Teknisk dokumentation/Api/output

Examples for various output formats of action=get&id=k0180/001

xml

<?xml version="1.0" encoding="UTF-8"?>
<callback xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schema.xsd">
    <head>
        <status>1</status>
        <hits>0–1 of 1</hits>
        <limit>10</limit>
    </head>
    <body>
        <hit>
            <id>k0180/001</id>
            <title>Birger Jarl</title>
            <artist>Bengt Erland Fogelberg</artist>
            <descr></descr>
            <year>1854</year>
            <year_cmt>resningsår</year_cmt>
            <type>Staty</type>
            <material>brons</material>
            <inside>0</inside>
            <address>Birger Jarls torg</address>
            <county>AB</county>
            <muni>180</muni>
            <district>Gamla stan</district>
            <lat>59.3251055555556</lat>
            <lon>18.0638527777778</lon>
            <image>Statue of Birger jarl Riddarholmstorget september 2011.jpg</image>
            <source>k0180</source>
            <ugc>1</ugc>
            <changed>2013-10-24 12:19:40</changed>
            <created>2013-05-31 20:40:41</created>
            <wiki_article>Q10429912</wiki_article>
            <commons_cat></commons_cat>
            <official_url></official_url>
            <same_as/>
            <free>pd</free>
            <cmt></cmt>
            <owner>Stockholms stad</owner>
        </hit>
    </body>
</callback>

php

a:2:{s:4:"head";a:3:{s:6:"status";s:1:"1";s:4:"hits";s:10:"0–1 of 1";s:5:"limit";i:10;}s:4:"body";a:1:{i:0;a:1:{s:3:"hit";a:27:{s:2:"id";s:9:"k0180/001";s:5:"title";s:11:"Birger Jarl";s:6:"artist";s:22:"Bengt Erland Fogelberg";s:5:"descr";s:0:"";s:4:"year";s:4:"1854";s:8:"year_cmt";s:11:"resningsår";s:4:"type";s:5:"Staty";s:8:"material";s:5:"brons";s:6:"inside";i:0;s:7:"address";s:17:"Birger Jarls torg";s:6:"county";s:2:"AB";s:4:"muni";s:3:"180";s:8:"district";s:10:"Gamla stan";s:3:"lat";s:16:"59.3251055555556";s:3:"lon";s:16:"18.0638527777778";s:5:"image";s:58:"Statue of Birger jarl Riddarholmstorget september 2011.jpg";s:6:"source";s:5:"k0180";s:3:"ugc";i:1;s:7:"changed";s:19:"2013-10-24 12:19:40";s:7:"created";s:19:"2013-05-31 20:40:41";s:12:"wiki_article";s:9:"Q10429912";s:11:"commons_cat";s:0:"";s:12:"official_url";s:0:"";s:7:"same_as";N;s:4:"free";s:2:"pd";s:3:"cmt";s:0:"";s:5:"owner";s:15:"Stockholms stad";}}}}


json

{
    "head": {
        "status": "1",
        "hits": "0\u20131 of 1",
        "limit": 10
    },
    "body": [
        {
            "hit": {
                "id": "k0180\/001",
                "title": "Birger Jarl",
                "artist": "Bengt Erland Fogelberg",
                "descr": "",
                "year": "1854",
                "year_cmt": "resnings\u00e5r",
                "type": "Staty",
                "material": "brons",
                "inside": 0,
                "address": "Birger Jarls torg",
                "county": "AB",
                "muni": "180",
                "district": "Gamla stan",
                "lat": "59.3251055555556",
                "lon": "18.0638527777778",
                "image": "Statue of Birger jarl Riddarholmstorget september 2011.jpg",
                "source": "k0180",
                "ugc": 1,
                "changed": "2013-10-24 12:19:40",
                "created": "2013-05-31 20:40:41",
                "wiki_article": "Q10429912",
                "commons_cat": "",
                "official_url": "",
                "same_as": null,
                "free": "pd",
                "cmt": "",
                "owner": "Stockholms stad"
            }
        }
    ]
}

json=compact

{"head":{"status":"1","hits":"0\u20131 of 1","limit":10},"body":[{"hit":{"id":"k0180\/001","title":"Birger Jarl","artist":"Bengt Erland Fogelberg","descr":"","year":"1854","year_cmt":"resnings\u00e5r","type":"Staty","material":"brons","inside":0,"address":"Birger Jarls torg","county":"AB","muni":"180","district":"Gamla stan","lat":"59.3251055555556","lon":"18.0638527777778","image":"Statue of Birger jarl Riddarholmstorget september 2011.jpg","source":"k0180","ugc":1,"changed":"2013-10-24 12:19:40","created":"2013-05-31 20:40:41","wiki_article":"Q10429912","commons_cat":"","official_url":"","same_as":null,"free":"pd","cmt":"","owner":"Stockholms stad"}}]}


geojson

{
    "head": {
        "status": "1",
        "hits": "0\u201310 of 200",
        "limit": 10,
        "continue": 10
    },
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "id": "k0180\/001",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    18.063852777778,
                    59.325105555556
                ]
            },
            "properties": {
                "title": "Birger Jarl",
                "artist": "Bengt Erland Fogelberg",
                "descr": "",
                "year": "1854",
                "year_cmt": "resnings\u00e5r",
                "type": "Staty",
                "material": "brons",
                "inside": 0,
                "address": "Birger Jarls torg",
                "county": "SE-AB",
                "muni": "180",
                "district": "Gamla stan",
                "image": "Statue of Birger jarl Riddarholmstorget september 2011.jpg",
                "source": "k0180",
                "ugc": 1,
                "changed": "2013-10-24 12:19:40",
                "created": "2013-05-31 20:40:41",
                "wiki": "Q10429912",
                "commons_cat": "",
                "official_url": "",
                "same_as": null,
                "free": "pd",
                "cmt": "",
                "owner": "Stockholms stad"
            }
        }
    ]
}


geojson=full

{
    "head": {
        "status": "1",
        "hits": "0\u201310 of 200",
        "limit": 10,
        "continue": 10
    },
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "id": "k0180\/001",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    18.063852777778,
                    59.325105555556
                ]
            },
            "properties": {
                "spatial": {
                    "inside": 0,
                    "address": "Birger Jarls torg",
                    "county": "SE-AB",
                    "muni": "180",
                    "district": "Gamla stan"
                },
                "image": {
                    "filename": "Statue of Birger jarl Riddarholmstorget september 2011.jpg",
                    "thumb": "https:\/\/commons.wikimedia.org\/w\/thumb.php?f=Statue_of_Birger_jarl_Riddarholmstorget_september_2011.jpg&width=100"
                },
                "descriptions": {
                    "descr": "",
                    "wiki": "https:\/\/sv.wikipedia.org\/wiki\/Birger_jarl_(staty)",
                    "wikidata": "Q10429912",
                    "official": null,
                    "ingress": "Birger jarl (staty) \u00e4r en regentskulptur p\u00e5 Birger jarls torg p\u00e5 Riddarholmen i Stockholm.\nStatyn av Birger jarl best\u00e4lldes av Stockholms borgerskap 1852 f\u00f6r att h\u00f6gtidligh\u00e5lla Stockholms stads 600-\u00e5rsjubileum. Den \u00e4r modellerad av Bengt Erland Fogelberg..."
                },
                "artist": [
                    {
                        "wiki": "https:\/\/sv.wikipedia.org\/wiki\/Bengt_Erland_Fogelberg",
                        "wikidata": "Q725846",
                        "name": "Bengt Erland Fogelberg"
                    }
                ],
                "title": "Birger Jarl",
                "year": "1854",
                "year_cmt": "resnings\u00e5r",
                "type": "Staty",
                "material": "brons",
                "source": "k0180",
                "ugc": 1,
                "changed": "2013-10-24 12:19:40",
                "created": "2013-05-31 20:40:41",
                "commons_cat": "",
                "same_as": null,
                "free": "pd",
                "cmt": "",
                "owner": "Stockholms stad"
            }
        }
    ]
}

kml

<?xml version="1.0" encoding="UTF-8"?>
<!--0–1 of 1-->
<kml xmlns="http://www.opengis.net/kml/2.2">
    <Document>
        <Style id="monumentStyle">
            <IconStyle id="monumentIcon">
                <Icon>
                    <href>http://maps.google.com/mapfiles/kml/paddle/ylw-blank.png</href>
                </Icon>
                <hotSpot x="0.5" y="0" xunits="fraction" yunits="fraction"/>
            </IconStyle>
        </Style>
        <Style id="monPicStyle">
            <IconStyle id="monPicIcon">
                <Icon>
                    <href>http://maps.google.com/mapfiles/kml/paddle/blu-circle.png</href>
                </Icon>
                <hotSpot x="0.5" y="0" xunits="fraction" yunits="fraction"/>
            </IconStyle>
        </Style>
        <Placemark id="k0180/001">
            <title>Birger Jarl</title>
            <description><![CDATA[<a href="http://commons.wikimedia.org/wiki/File:Statue%20of%20Birger%20jarl%20Riddarholmstorget%20september%202011.jpg" target="_blank"><img src="https://commons.wikimedia.org/w/thumb.php?f=Statue_of_Birger_jarl_Riddarholmstorget_september_2011.jpg&width=100" align="right" /></a><ul><li> <b>Birger Jarl</b></li><li> <a href="https://sv.wikipedia.org/wiki/Bengt_Erland_Fogelberg" target="_blank">Bengt Erland Fogelberg</a> - 1854</li><li> Stockholm (Gamla stan) - Birger Jarls torg</li><br/><li>Birger jarl (staty) är en regentskulptur på Birger jarls torg på Riddarholmen i Stockholm.
Statyn av Birger jarl beställdes av Stockholms borgerskap 1852 för att högtidlighålla Stockholms stads 600-årsjubileum. Den är modellerad av Bengt Erland Fogelberg...</li><br/><li>Läs mer om <a href="https://sv.wikipedia.org/wiki/Birger_jarl_(staty)" target="_blank">konstverket på Wikipedia</a>.</li></ul>]]></description>
            <styleUrl>#monPicStyle</styleUrl>
            <Point>
                <coordinates>18.0638527777778,59.3251055555556</coordinates>
            </Point>
        </Placemark>
    </Document>
</kml>

wiki

<!--0–1 of 1-->
{{Offentligkonstlista-huvud}}
{{Offentligkonstlista
| id           = k0180/001
| id-länk      = 
| titel        = Birger Jarl
| artikel      = Birger jarl (staty)
| konstnär     = [[Bengt Erland Fogelberg]]
| årtal        = 1854
| beskrivning  = 
| typ          = Staty
| material     = brons
| fri          = pd
| plats        = Birger Jarls torg
| inomhus      = 
| län          = AB
| kommun       = Stockholm
| stadsdel     = Gamla stan
| lat          = 59.3251055555556
| lon          = 18.0638527777778
| bild         = Statue of Birger jarl Riddarholmstorget september 2011.jpg
| commonscat   = 
}}
|}