Skip to content

API Design

mark-bell-tna edited this page Jun 2, 2023 · 9 revisions

Hierarchy of data

Project data follows a standard archival hierarchy: archives contain collections which contain documents which have content.

   graph LR
   archive-->collection;
   collection-->document;
   document-->content;
Loading

API entities and filter properties

Linked Data generally consists of Entities which are linked through Relationships. Archive, Collections, and Documents are specific entity types related to the process of organising archived documents. The remainder of the entities in the data fall into four broad categories: Agent (person or organisation), Location (physical or virtual), Event, Object.

Every entity has the following properties:

  • Identifier (unique)
  • Name
  • Entity Type (one of Archive, Collection, Document, Agent, Location, Event, Object)
  • Sub Type (derived from relationships in linked data)

Additionally, Locations and Events are complex objects having extra properties. Locations may have geographical coordinates, and events are associated with date ranges.

Entity Properties
Agent name
Place name, coordinates
Event name, from date, to date
Object name

API entity associations and examples

Each entity type may have properties which are one of the other entity types. Some examples are in the following table.

. Agent Place Event Object
Agent Name Place of residence Date of birth Medal
Place Mayor Name Founded Statue
Event Involved Happened at Name x
Object Belonged to Made at Sold Name

Example queries and response types

Q1. Which archives uploaded new records last week?

  • Select Entities of type Document
  • Select those with Event name = 'Created' and Date during last week
  • Find archives those Documents are held in
  • Return unique list of Ids and names of archives
Clone this wiki locally