Project

General

Profile

Actions

Feature #2491

closed

API: New endpoint "chained_events"

Added by Katharina Wünsche 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Start date:
2025-03-05
Estimated time:

Description

When calling the /linked_entities_by_properties_recursive/ endpoint with the property P134 ("continues"), the order of returned movements does not reflect the order of preceding and succeeding events as entered in the database. E.g., when connecting five move events ("My first move"... "My fifth move"), we get the following unordered API result:


Related issues 1 (0 open1 closed)

Related to OpenAtlas - Feature #2494: API: 0.4.7ClosedBernhard Koschiček-Krombholz2025-03-11Actions
Actions #1

Updated by Bernhard Koschiček-Krombholz 10 months ago

Well, the API don't know which order you prefer, because you can add additional properties and I don't know how you want it to order.

You can add P134 to your shown relation_type parameter, then you can get the ID of the event before and after that one.
Or you can also sort for dates, if the events have dates.

I took the liberty to change it from bug to question.

Actions #2

Updated by Bernhard Koschiček-Krombholz 10 months ago

  • Tracker changed from Bug to Question
  • Status changed from New to Acknowledged
Actions #3

Updated by Bernhard Koschiček-Krombholz 10 months ago

  • Status changed from Acknowledged to In Progress
  • Target version set to 8.12.0
Actions #4

Updated by Bernhard Koschiček-Krombholz 10 months ago

  • Tracker changed from Question to Feature
  • Subject changed from Wrong order of results in /linked_entities_by_properties_recursive/ to API: New endpoint "chained_events"

Talked with Katharina today, we decided that it would be best to have an extra endpoint just for the event chain. It will be an Entitiy endpoint and the results are in a fixed order, how the events are chained in the database.

Actions #5

Updated by Bernhard Koschiček-Krombholz 10 months ago

  • Description updated (diff)

Since we came to problems with multiple chains, I will set up a complete new format to better display hierarchies. It will be something like:

{
  "name": "First",
  "id": 1111,
  "system_class": "move",
  "geometries": [],
  "children": [
    {
      "name": "Second",
      "id": 2222,
      "system_class": "acquisition",
      "geometries": [],
      "children": [
        {
          "name": "forth",
          "id": 4444,
          "system_class": "activity",
          "geometries": [],
          "children": []
        }
      ]
    },
    {
      "name": "Third",
      "id": 3333,
      "system_class": "event",
      "geometries": [],
      "children": [
        {
          "name": "fifth",
          "id": 5555,
          "system_class": "creation",
          "geometries": [],
          "children": [
            {
              "name": "sixth",
              "id": 6666,
              "system_class": "production",
              "geometries": [],
              "children": []
            }
          ]
        }
      ]
    }
  ]
}

This should be sufficient to bring the data to the visualisation, e.g. map, network or diagrams. For more information, the entity itself should be loaded. But we can for sure enrich the data with types, dates and description.

Actions #6

Updated by Bernhard Koschiček-Krombholz 10 months ago

Actions #7

Updated by Bernhard Koschiček-Krombholz 10 months ago

  • Status changed from In Progress to Closed
Actions #9

Updated by Alexander Watzinger 9 months ago

  • Target version changed from 8.12.0 to 8.11.0
Actions

Also available in: Atom PDF