Skip to content
Philipp Wambach edited this page Oct 28, 2019 · 5 revisions

Layers

GET /layers/layers-{lang}.json

[
  {
    "id": string,
    "name": string,
    "description": string,
    "subLayers": [
      {
        "id": string,
        "name": string,
        "description": string
      }
    ]
  }
]

Example:

[
  {
    "id": "layer1",
    "name": "Layer 1",
    "description": "This is the first layer",
    "subLayers": [
      {
        "id": "layer1a",
        "name": "Layer 1a",
        "description": "This is the first sublayer of Layer 1"
      }
    ]
  },
  {
    "id": "layer2",
    "name": "A layer without sublayers",
    "description": "This is the second top level layer",
    "subLayers": []
  }
]

GET /layers/{id}/metadata.json

{
  "id": string,
  "type": "image" | "tiles",
  "timeFormat": {
    "year"?: 'numeric' | '2-digit';
    "month?": 'numeric' | '2-digit' | 'narrow' | 'short' | 'long';
    "day?": 'numeric' | '2-digit';
    "hour"?: 'numeric' | '2-digit';
    "minute"?: 'numeric' | '2-digit';
    "second"?: 'numeric' | '2-digit';
  };
  "timestamps": string[]
}

Notes:

Example:

{
  "id": "sst",
  "type": "image",
  "timeFormat": {
    "year": "numeric",
    "month": "numeric",
    "day": "numeric",
    "hour": "numeric",
    "minute": "numeric",
    "second": "numeric"
  },
  "timestamps": [
    "2008-01-03",
    "2008-01-11",
    "2008-01-19",
  ]
}

Stories

GET /stories/stories-{lang}.json

[
  {
    "id": string,
    "title": string,
    "description": string,
    "image": string
  }
]

Example:

[
  {
    "id": "story1",
    "title": "Story 1",
    "description": "This is story 1",
    "image": "https://example.com/preview.jpg"
  }
]

GET /stories/{id}/{id}-{lang}.json

{
  "id": string,
  "slides": [
    {
      "title": string,
      "subtitle": string,
      "bodytext": string,
      "image": string
    }
  ]
}

Example:

{
  "id": "story1",
  "slides": [
    {
      "title": "Story slide 1",
      "subtitle": "Das ist story slide 1",
      "bodytext": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolor option isi nobis quas ut.",
      "image": "http://example.com/story1.jpeg"
    }
  ]
}