API docs

GeoNorge Download API

GeoNorge Download API documented here.

Geonorge ATOM Feed API

ResourceDescription
GET api/atomfeedsList all datasets available as Atom Feed
GET api/atom/{metadataUuid}List all files for a given dataset as Atom Feed

Example with api/atomfeeds

    <?xml version="1.0" encoding="UTF-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom">
      <title>GEONORGE DATASET ATOM FEEDS</title>
      <link rel="alternate" href="https://myserver.mydomain.com:443/api/atomfeeds" />
      <subtitle>ATOM Feeds for Datasets</subtitle>
      <entry>
        <title>My dataset title</title>
        <link rel="alternate" href="https://myserver.mydomain.com:443/api/atom/6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7" />
        <author>
          <name />
        </author>
        <summary type="text/plain">Dataset ATOM Feed</summary>
      </entry>
    </feed>
        

Internal Dataset API

ResourceDescription
GET api/internal/dataset List some information on all available dataset.
GET api/internal/dataset/{metadataUuid} Get information on the given dataset.
POST/PUT api/internal/dataset/{metadataUuid} Update some information on the given dataset or store it as a new dataset.
DELETE api/internal/dataset/{metadataUuid} Delete the given dataset.

Example with static file

The example below show how to store, fetch and delete a dataset using the Internal Dataset API.

$ cat new_dataset 
{
    "metadataUuid": "6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7",
    "title": "A title",
    "files": [
        {
            "downloadUrl": "http://a.url/to/a/file.zip",
            "name": "file.zip",
            "fileId": "e7782d3f-1499-4512-a93b-4a787d5e9402",
            "metadataUuid": "6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7",
            "area": "01",
            "areaName": "Østfold",
            "projection": "32632",
            "projectionName": "EPSG:WGS 84 / UTM zone 32N",
            "format": "SOSI",
            "fileDate": "2017-11-29T10:33:27.176Z",
            "metadataName": "Grunnvannsborehull"
        }
    ]
}
$ curl --user username:password -X POST -H "Content-Type: application/json" -d @new_dataset http://127.0.0.1:10000/api/internal/dataset/6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7
$ curl --user username:password http://127.0.0.1:10000/api/internal/dataset/6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7
{
    "metadataUuid": "6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7",
    "title": "A title",
    "files": [
        {
            "downloadUrl": "http://a.url/to/a/file.zip",
            "name": "file.zip",
            "fileId": "e7782d3f-1499-4512-a93b-4a787d5e9403",
            "metadataUuid": "6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7",
            "area": "01",
            "areaName": "Østfold",
            "projection": "32632",
            "projectionName": "EPSG:WGS 84 / UTM zone 32N",
            "format": "SOSI",
            "fileDate": "2017-11-29T10:33:27.176Z",
            "metadataName": "Grunnvannsborehull"
        }
    ]
}
$ curl --user username:password -X DELETE http://127.0.0.1:10000/api/internal/dataset/6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7

Example with async FME task

The example below show how to store, fetch and delete a dataset using the Internal Dataset API.

$ cat new_external_dataset.json 
{
    "metadataUuid": "77ba5993-94bd-48f9-91d4-3a5f4ba7d9b8",
    "title": "A title",
    "external": {
        "type": "ngufme",
        "urlPrefix": "http://download.ngu.no",
        "username": "xxx",
        "password": "yyy",
        "repository": "Datanedlasting",
        "workspace": "GrunnvannBorehull_Nedlasting.fmw"
    }
}
$ curl --user username:password -X POST -H "Content-Type: application/json" -d @new_external_dataset.json http://127.0.0.1:10000/api/internal/dataset/6aba5993-94bd-48f9-91d4-3a5f4ba7d9a7