Import and export

Add or retrieve events in bulk.

Import and export let you work on your events outside BerlinOne: get them in a file, touch them up, add many at once. The file is in JSON format.

Everything happens on the Studio's Events page, with the green Import/Export button, at the top, at the end of the search bar.

Who can use it

Bulk import and export are reserved for the Premium and Premium+ plans, and for the category's owner. They only apply to published events: choose Approved in the Statuses filter, in the left-hand panel, for the button to be active.

One event at a time, on the other hand, can be exported and re-imported on every plan: see below.

Exporting a category's events

  1. On the Events page, choose the category, then the Approved filter.
  2. Click Import/Export, then the Export tab.
  3. Check the events you want, or Select all.
  4. Click Export … event(s): the file downloads.

For each event, the file holds its dates, precision, importance, nature, image, references, and its text in all three languages.

Importing events

  1. On the Events page, choose the category that will receive them, then the Approved filter.
  2. Click Import/Export; the Import tab is open.
  3. Choose what to do with duplicates — an event carrying the same identifier as an existing event:
    • Skip duplicates: they are left aside;
    • Update existing events: the file replaces what is there;
    • Create all events: everything is added, duplicates included.
  4. Click Choose a file. BerlinOne checks it right away: "3 event(s) ready to import", or the list of errors, line by line.
  5. Click Import … event(s).

At the end, a detailed report downloads: what was created, updated, skipped or refused. Missing translations are then done automatically.

The file

The simplest is to start from an exported file. To write one by hand, here is the shortest form:

{
  "events": [
    {
      "title": "First step on the Moon",
      "description": "Neil Armstrong sets foot on the Moon.",
      "start_date": "1969-07-21",
      "date_precision": "day",
      "importance": 5,
      "territory": "Moon"
    },
    {
      "title": "Cold War",
      "description": "Rivalry between the United States and the USSR.",
      "start_date": "1947",
      "end_date": "1991",
      "temporal_type": "continuous",
      "date_precision": "year",
      "importance": 5
    }
  ]
}

Each event needs a title (title), a description (description) and a start date (start_date). The rest is optional:

  • end_date: the end date of a period;
  • temporal_type: punctual for a one-time event, continuous for a period;
  • date_precision: day, month, year, decade, century or era;
  • importance: from 1 to 5;
  • territory: the place;
  • is_highlighted: true for a featured event;
  • language: the language of the text, fr, en or es.

Dates are written YYYY, YYYY-MM or YYYY-MM-DD, always with a four-digit year: 0476 for the year 476. Before Christ, add BC: 0044-03-15 BC for March 15, 44 BC.

A single event

On every plan, an event's ⋮ menu, on the right of its row on the Events page, offers:

  • Export as JSON: the event alone, in a file;
  • Import update: the same file, once touched up.

If the event is yours, the update is applied. If it belongs to someone else, it becomes a proposal: BerlinOne asks you to explain to the owner what you changed.

The file must come back to the same event, in the same category, and in the application's language: the one you exported it in.

If something goes wrong

The Import/Export button is grayed out — hover over it to see why: your plan is Free, the category isn't yours, or the Statuses filter isn't on Approved.

"JSON must be an array of objects or an object with an "events" property" — the file doesn't have the expected shape. Start from an exported file.

"Line 2: invalid date format" — the date isn't YYYY, YYYY-MM or YYYY-MM-DD. Check the four digits of the year, and the BC before Christ.

"Line 1: missing description" — every event needs a title, a description and a start date.

"This file is not in the application's language" — for a single event: switch the interface to the file's language, or export the event again.