mapping-commons / sssom-api

Apache License 2.0
7 stars 0 forks source link

Implement a basic service to rertrieve all mapping sets (mappingset) #8

Closed anitacaron closed 1 year ago

anitacaron commented 2 years ago

The result from this endpoint should have mappings as a link.

{
  "mapping_set_id": "this_is_an_id",
  "mappings": [
     {
        "href": "https://localhost:8080/mappings/122345"
     },
     {
        "href": "https://localhost:8080/mappings/122346"
     }
   ]
}

However, the database TTL file uses blank nodes to specify the mappings of a mapping set, so it is impossible to have the links redirect correctly.

cc @matentzn

anitacaron commented 1 year ago

Because of the possibility of having thousands of mappings in a mapping_set, the link is this way now:

{
  "mapping_set_id": "this_is_an_id",
  "mappings": {
        "href": "https://localhost:8080/mapping_sets/122345/mappings"
     }
}
matentzn commented 1 year ago

Great, use relative mappings, but else, good one!

{
  "mapping_set_id": "this_is_an_id",
  "mappings": {
        "href": "mapping_sets/122345/mappings"
     }
}
anitacaron commented 1 year ago

In the OXO API, the links are absolute.

 "_links": {
    "self": {
      "href": "https://www.ebi.ac.uk/spot/oxo/api/datasources/AEO"
    },
    "terms": {
      "href": "https://www.ebi.ac.uk/spot/oxo/api/terms?datasource=AEO"
    }
  }