Feature #2491
closedAPI: New endpoint "chained_events"
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:
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.
Updated by Bernhard Koschiček-Krombholz 10 months ago
- Tracker changed from Bug to Question
- Status changed from New to Acknowledged
Updated by Bernhard Koschiček-Krombholz 10 months ago
- Status changed from Acknowledged to In Progress
- Target version set to 8.12.0
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.
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.
Updated by Bernhard Koschiček-Krombholz 10 months ago
- Related to Feature #2494: API: 0.4.7 added
Updated by Bernhard Koschiček-Krombholz 10 months ago
- Status changed from In Progress to Closed
Updated by Alexander Watzinger 9 months ago
- Target version changed from 8.12.0 to 8.11.0