SlideShare a Scribd company logo
This project has received funding from the European Union’s Horizon 2020 research and
Innovation programme under grant agreement No. 825775
This project has received funding from the Canadian Institute of Health Research under
grant agreement #404896
Lighting a Beacon:
Training for (future) implementers
Who is this talk for?
Beacon implementors
and software developers
Beacon users
Contents
• Beacon Framework

• Beacon Model

• How to start implementing a beacon from scratch
PART 1
PART 2
What is Beacon?
HTTP
API
DB
Request
(GET or POST + JSON)
Response
(JSON)
Framework
Model
Beacon Framework
Framework
Model
• Specifies the structure of the wrapper
of the results.

• Allows the interoperability of beacons
with different data, since they all
understand the same protocol.
Beacon Framework: Types of beacon
Framework
Model
Boolean Beacon
Count Beacon
ResultSets Beacon
Beacon Model
Framework
Model
• Describes the entities that the beacon
supports.

• Describes the schemas of those
entities.
Beacon Model: Entities
Analyses Biosamples Cohorts
Datasets Genomic Variations Individuals
Runs
Framework
Model
https://beacon-schema-2.readthedocs.io
Beacon Model viewer:
Example request & response
Request Response
{

"meta": {

"beaconId":"org.example.beacon.v2",

"apiVersion": "v2.0",

"returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"receivedRequestSummary": {

"apiVersion": "v2.0",

"filters": …,

"requestParameters": …,

"includeResultsetResponses": "HIT",

"requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"pagination": { "skip": 0, “limit":10 },

“requestedGranularity”: “count”

}

},

"responseSummary":{

"exists": true,

"numTotalResults": 25355

},

"info": {

"someInterestingStuff": "this is the interesting stuff"

},

“beaconHandovers":[ 

{

"handoverType": { "id":"EFO:0004157", "label":"BAM format" },

"url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0",

"note":"This handover link provides access to a summarized VCF."

}

]

{

"meta": {

"apiVersion": "v2.0",

"requestedSchemas": [{

"entityType": "EntryTypeA", 

"schema": “entry-typeA-schema-v2.0”

}]

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"includeResultsetResponses": "HIT",

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": “count"

}

}
Example request
Request
{

"meta": {

"apiVersion": "v2.0",

"requestedSchemas": [{

"entityType": "EntryTypeA", 

"schema": “entry-typeA-schema-v2.0”

}]

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"includeResultsetResponses": "HIT",

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": "count"

}

}
Example request & response
Request Response
{

"meta": {

"beaconId":"org.example.beacon.v2",

"apiVersion": "v2.0",

"returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"returnedGranularity": "count",

"receivedRequestSummary": {

"apiVersion": "v2.0",

"filters": …,

"requestParameters": …,

"includeResultsetResponses": "HIT",

"requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"pagination": { "skip": 0, “limit":10 },

“requestedGranularity”: “count”

}

},

"responseSummary":{

"exists": true,

"numTotalResults": 25355

},

"info": {

"someInterestingStuff": "this is the interesting stuff"

},

“beaconHandovers":[ 

{

"handoverType": { "id":"EFO:0004157", "label":"BAM format" },

"url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0",

"note":"This handover link provides access to a summarized VCF."

}

]

}

{

"meta": {

"apiVersion": "v2.0",

"requestedSchemas": [{

"entityType": "EntryTypeA", 

"schema": “entry-typeA-schema-v2.0”

}]

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"includeResultsetResponses": "HIT",

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": “count"

}

}
Beacon Verifier
• Verify that all of your endpoints follow the
framework

• Optionally, you can verify that the returned
results match the model of the beacon
https://ga4gh-approval-service-registry-test.ega-archive.org
Questions
Break
How to implement a Beacon
• Endpoints

• Types of filters

• Mapping the DB to the BFF

• Database queries

• Pagination

• Responses
Endpoints
┌── common
├── configuration
├── endpoints.json
├── LICENSE
├── README.md
├── requests
└── responses
┌── analyses
│ ├── defaultSchema.json
│ ├── endpoints.json
│ └── filteringTerms.json
├── biosamples
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ └── filteringTerms.json
├── cohorts
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ └── filteringTerms.json
└── datasets
├── defaultSchema.json
├── endpoints.json
└── filteringTerms.json
┌── genomicVariations
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ ├── filteringTerms.json
│ ├── requestParameters.json
│ └── requestParametersComponents.json
├── individuals
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ └── filteringTerms.json
└── runs
├── defaultSchema.json
├── endpoints.json
└── filteringTerms.json
beacon-framework-v2 beacon-v2-Models
• Where can you find the endpoints
Endpoints
Framework endpoints Model endpoints
Endpoints: GET vs. POST
GET Request POST Request
{

"meta": {

"apiVersion": "2.0",

…

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": "boolean"

}

}
?requestedSchema=beacon-individuals-v2.0&skip=0&limit=10
With query parameters: With body (application/json):
Endpoints: List your endpoints
{
"meta":{
"apiVersion": "v2.0.0",
"beaconId": “org.organizationName.beaconId",
"createDateTime": “2007-01-09",
"returnedSchemas": …,
"updateDateTime": "2021-11-16"
},
"response":{
"endpointSets": {
…
"individual": {
"endpoints": {
"biosample": {
"returnedEntryType": "biosample",
"url": "https://examplebeacons.org/individuals/{id}/biosamples"
},
"genomicVariation": {
"returnedEntryType": "genomicVariation",
"url": "https://examplebeacons.org/individuals/{id}/genomicVariations"
}
},
"entryType": "individual",
"filteringTermsUrl": "https://examplebeacons.org/filteringTerms",
"rootUrl": "https://examplebeacons.org/individuals",
"singleEntryUrl": "https://examplebeacons.org/individuals/{id}"
}
}
}
}
Filters: Types of filters
Ontology Filter
Filters: Types of filters
Alphanumeric Filter
Filters: Types of filters
Custom Filter
Filters: filters vs. requestParameters
Should it be a filter or a
request parameter?
Filter Request parameter
It requires its
own schema
It can be represented
with an ontology term
Anything else
Database mapping exercise
• Mapping the data of your database to the correct entities of the
model (and their properties)

• Extending the model to include additional entities that you may
provide and are not represented in the model
Database queries
• The new version of the Reference Implementation uses MongoDB:

• Each entity can be thought of as a collection

• Allows for a flexible evolution of the schema
Pagination
• We support two types of pagination:
skip & limit pagination cursor-like pagination
• We skip n elements and return the
next m elements.
• We add a hash to the response
encoding the next m elements of the
page
Error responses
{
"meta": …,
"error": {
"errorCode": 404,
"errorMessage": "Entry not found"
}
}
• Same meta as an OK response

• Error information
Tools provided
• Beacon-verifier
• Reference
Implementation • BFF utility
Coming soon
https://beacon-schema-2.readthedocs.io
Beacon Model viewer:
• Beacon Framework
• Beacon Model
Summary
• The Beacon Framework defines the structure of the response.

• The Beacon Model defines the structure of the response data.

• Implementing a beacon:

• Start with a boolean beacon

• List your available endpoints

• Map the data from your DB to the models

• Handle the different types of filters

• Build a response following the framework
Funding
This project has received funding from the
Canadian Institute of Health Research
under grant agreement #404896
This project has received funding from the
European Union's Horizon 2020 Research
and Innovation Programme under grant
agreement #825775
Questions

More Related Content

PPTX
IP based standards for IoT
PPTX
Web of Things to the edge
PPTX
Ipso smart object seminar
PPTX
Access Control for Linked Data: Past, Present and Future
PDF
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...
PPTX
OMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
PPTX
Osiot14 buildout
IP based standards for IoT
Web of Things to the edge
Ipso smart object seminar
Access Control for Linked Data: Past, Present and Future
Scalable policy-aware Linked Data architecture for prIvacy, transparency and ...
OMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
Osiot14 buildout

What's hot (10)

PPTX
Play Your API with MuleSoft API Notebook
PDF
Implementing Authorization
PPTX
Advance java session 11
PPTX
Mendix rest services
DOCX
PPTX
Sabrina Kirrane INSIGHT Viva Presentation
PPTX
Opa microservice authorization
PPTX
Dependency property
PPTX
GraphQL Security
PPTX
Kantara OTTO slides
Play Your API with MuleSoft API Notebook
Implementing Authorization
Advance java session 11
Mendix rest services
Sabrina Kirrane INSIGHT Viva Presentation
Opa microservice authorization
Dependency property
GraphQL Security
Kantara OTTO slides
Ad

Similar to Lighting a Beacon: training for (future) implementers (20)

PPTX
MongoDB Days UK: Building Apps with the MEAN Stack
PPTX
Introduction to ASP.NET MVC
PPTX
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
PPTX
Asp.Net MVC 5 in Arabic
PDF
(ATS6-PLAT04) Query service
PPTX
Hypermedia System Architecture for a Web of Things
PPTX
angularJs Workshop
PDF
Java UI Course Content
PDF
A Beginner's Guide to Ember
PPTX
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
PPTX
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
PPTX
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
PPTX
Hypermedia System Architecture for a Web of Things
PDF
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
PPTX
Data-Analytics using python (Module 4).pptx
PPTX
Building Your First App with MongoDB
PDF
OSMC 2023 | Experiments with OpenSearch and AI by Jochen Kressin & Leanne La...
PDF
PredictionIO – A Machine Learning Server in Scala – SF Scala
PPTX
Integrate MongoDB & SQL data with a single REST API
MongoDB Days UK: Building Apps with the MEAN Stack
Introduction to ASP.NET MVC
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
Asp.Net MVC 5 in Arabic
(ATS6-PLAT04) Query service
Hypermedia System Architecture for a Web of Things
angularJs Workshop
Java UI Course Content
A Beginner's Guide to Ember
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
Hypermedia System Architecture for a Web of Things
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Data-Analytics using python (Module 4).pptx
Building Your First App with MongoDB
OSMC 2023 | Experiments with OpenSearch and AI by Jochen Kressin & Leanne La...
PredictionIO – A Machine Learning Server in Scala – SF Scala
Integrate MongoDB & SQL data with a single REST API
Ad

More from CINECAProject (12)

PDF
CINECA webinar slides: Modular and reproducible workflows for federated molec...
PDF
Beacon v2 Reference Implementation: An Overview
PDF
CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
PDF
CINECA webinar slides: How to make training FAIR
PDF
CINECA webinar slides: Practically FAIR
PDF
CINECA webinar slides: FAIR software tools
PDF
CINECA webinar slides: Making cohort data FAIR
PDF
CINECA webinar slides: Open science through fair health data networks dream o...
PDF
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
PDF
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
PDF
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
PDF
CINECA webinar slides: Ethical, legal and societal issues in international da...
CINECA webinar slides: Modular and reproducible workflows for federated molec...
Beacon v2 Reference Implementation: An Overview
CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
CINECA webinar slides: How to make training FAIR
CINECA webinar slides: Practically FAIR
CINECA webinar slides: FAIR software tools
CINECA webinar slides: Making cohort data FAIR
CINECA webinar slides: Open science through fair health data networks dream o...
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
CINECA webinar slides: Ethical, legal and societal issues in international da...

Recently uploaded (20)

PPT
STD NOTES INTRODUCTION TO COMMUNITY HEALT STRATEGY.ppt
PPT
OPIOID ANALGESICS AND THEIR IMPLICATIONS
PDF
Transcultural that can help you someday.
PPTX
anaemia in PGJKKKKKKKKKKKKKKKKHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH...
PDF
Oral Aspect of Metabolic Disease_20250717_192438_0000.pdf
PDF
Cardiology Pearls for Primary Care Providers
PPTX
obstructive neonatal jaundice.pptx yes it is
PPTX
Stimulation Protocols for IUI | Dr. Laxmi Shrikhande
PDF
Medical Evidence in the Criminal Justice Delivery System in.pdf
PPTX
regulatory aspects for Bulk manufacturing
PDF
Human Health And Disease hggyutgghg .pdf
PPTX
MANAGEMENT SNAKE BITE IN THE TROPICALS.pptx
PPTX
Transforming Regulatory Affairs with ChatGPT-5.pptx
PPT
Management of Acute Kidney Injury at LAUTECH
PPTX
Important Obstetric Emergency that must be recognised
PPTX
NASO ALVEOLAR MOULDNIG IN CLEFT LIP AND PALATE PATIENT
PPTX
Electrolyte Disturbance in Paediatric - Nitthi.pptx
PPTX
surgery guide for USMLE step 2-part 1.pptx
PPTX
Chapter-1-The-Human-Body-Orientation-Edited-55-slides.pptx
PPT
HIV lecture final - student.pptfghjjkkejjhhge
STD NOTES INTRODUCTION TO COMMUNITY HEALT STRATEGY.ppt
OPIOID ANALGESICS AND THEIR IMPLICATIONS
Transcultural that can help you someday.
anaemia in PGJKKKKKKKKKKKKKKKKHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH...
Oral Aspect of Metabolic Disease_20250717_192438_0000.pdf
Cardiology Pearls for Primary Care Providers
obstructive neonatal jaundice.pptx yes it is
Stimulation Protocols for IUI | Dr. Laxmi Shrikhande
Medical Evidence in the Criminal Justice Delivery System in.pdf
regulatory aspects for Bulk manufacturing
Human Health And Disease hggyutgghg .pdf
MANAGEMENT SNAKE BITE IN THE TROPICALS.pptx
Transforming Regulatory Affairs with ChatGPT-5.pptx
Management of Acute Kidney Injury at LAUTECH
Important Obstetric Emergency that must be recognised
NASO ALVEOLAR MOULDNIG IN CLEFT LIP AND PALATE PATIENT
Electrolyte Disturbance in Paediatric - Nitthi.pptx
surgery guide for USMLE step 2-part 1.pptx
Chapter-1-The-Human-Body-Orientation-Edited-55-slides.pptx
HIV lecture final - student.pptfghjjkkejjhhge

Lighting a Beacon: training for (future) implementers

  • 1. This project has received funding from the European Union’s Horizon 2020 research and Innovation programme under grant agreement No. 825775 This project has received funding from the Canadian Institute of Health Research under grant agreement #404896 Lighting a Beacon: Training for (future) implementers
  • 2. Who is this talk for? Beacon implementors and software developers Beacon users
  • 3. Contents • Beacon Framework • Beacon Model • How to start implementing a beacon from scratch PART 1 PART 2
  • 4. What is Beacon? HTTP API DB Request (GET or POST + JSON) Response (JSON) Framework Model
  • 5. Beacon Framework Framework Model • Specifies the structure of the wrapper of the results. • Allows the interoperability of beacons with different data, since they all understand the same protocol.
  • 6. Beacon Framework: Types of beacon Framework Model Boolean Beacon Count Beacon ResultSets Beacon
  • 7. Beacon Model Framework Model • Describes the entities that the beacon supports. • Describes the schemas of those entities.
  • 8. Beacon Model: Entities Analyses Biosamples Cohorts Datasets Genomic Variations Individuals Runs Framework Model https://beacon-schema-2.readthedocs.io Beacon Model viewer:
  • 9. Example request & response Request Response { "meta": { "beaconId":"org.example.beacon.v2", "apiVersion": "v2.0", "returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "receivedRequestSummary": { "apiVersion": "v2.0", "filters": …, "requestParameters": …, "includeResultsetResponses": "HIT", "requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "pagination": { "skip": 0, “limit":10 }, “requestedGranularity”: “count” } }, "responseSummary":{ "exists": true, "numTotalResults": 25355 }, "info": { "someInterestingStuff": "this is the interesting stuff" }, “beaconHandovers":[ { "handoverType": { "id":"EFO:0004157", "label":"BAM format" }, "url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0", "note":"This handover link provides access to a summarized VCF." } ] { "meta": { "apiVersion": "v2.0", "requestedSchemas": [{ "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0” }] }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "includeResultsetResponses": "HIT", "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": “count" } }
  • 10. Example request Request { "meta": { "apiVersion": "v2.0", "requestedSchemas": [{ "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0” }] }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "includeResultsetResponses": "HIT", "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": "count" } }
  • 11. Example request & response Request Response { "meta": { "beaconId":"org.example.beacon.v2", "apiVersion": "v2.0", "returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "returnedGranularity": "count", "receivedRequestSummary": { "apiVersion": "v2.0", "filters": …, "requestParameters": …, "includeResultsetResponses": "HIT", "requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "pagination": { "skip": 0, “limit":10 }, “requestedGranularity”: “count” } }, "responseSummary":{ "exists": true, "numTotalResults": 25355 }, "info": { "someInterestingStuff": "this is the interesting stuff" }, “beaconHandovers":[ { "handoverType": { "id":"EFO:0004157", "label":"BAM format" }, "url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0", "note":"This handover link provides access to a summarized VCF." } ] } { "meta": { "apiVersion": "v2.0", "requestedSchemas": [{ "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0” }] }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "includeResultsetResponses": "HIT", "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": “count" } }
  • 12. Beacon Verifier • Verify that all of your endpoints follow the framework • Optionally, you can verify that the returned results match the model of the beacon https://ga4gh-approval-service-registry-test.ega-archive.org
  • 14. Break
  • 15. How to implement a Beacon • Endpoints • Types of filters • Mapping the DB to the BFF • Database queries • Pagination • Responses
  • 16. Endpoints ┌── common ├── configuration ├── endpoints.json ├── LICENSE ├── README.md ├── requests └── responses ┌── analyses │ ├── defaultSchema.json │ ├── endpoints.json │ └── filteringTerms.json ├── biosamples │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ └── filteringTerms.json ├── cohorts │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ └── filteringTerms.json └── datasets ├── defaultSchema.json ├── endpoints.json └── filteringTerms.json ┌── genomicVariations │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ ├── filteringTerms.json │ ├── requestParameters.json │ └── requestParametersComponents.json ├── individuals │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ └── filteringTerms.json └── runs ├── defaultSchema.json ├── endpoints.json └── filteringTerms.json beacon-framework-v2 beacon-v2-Models • Where can you find the endpoints
  • 18. Endpoints: GET vs. POST GET Request POST Request { "meta": { "apiVersion": "2.0", … }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": "boolean" } } ?requestedSchema=beacon-individuals-v2.0&skip=0&limit=10 With query parameters: With body (application/json):
  • 19. Endpoints: List your endpoints { "meta":{ "apiVersion": "v2.0.0", "beaconId": “org.organizationName.beaconId", "createDateTime": “2007-01-09", "returnedSchemas": …, "updateDateTime": "2021-11-16" }, "response":{ "endpointSets": { … "individual": { "endpoints": { "biosample": { "returnedEntryType": "biosample", "url": "https://examplebeacons.org/individuals/{id}/biosamples" }, "genomicVariation": { "returnedEntryType": "genomicVariation", "url": "https://examplebeacons.org/individuals/{id}/genomicVariations" } }, "entryType": "individual", "filteringTermsUrl": "https://examplebeacons.org/filteringTerms", "rootUrl": "https://examplebeacons.org/individuals", "singleEntryUrl": "https://examplebeacons.org/individuals/{id}" } } } }
  • 20. Filters: Types of filters Ontology Filter
  • 21. Filters: Types of filters Alphanumeric Filter
  • 22. Filters: Types of filters Custom Filter
  • 23. Filters: filters vs. requestParameters Should it be a filter or a request parameter? Filter Request parameter It requires its own schema It can be represented with an ontology term Anything else
  • 24. Database mapping exercise • Mapping the data of your database to the correct entities of the model (and their properties) • Extending the model to include additional entities that you may provide and are not represented in the model
  • 25. Database queries • The new version of the Reference Implementation uses MongoDB: • Each entity can be thought of as a collection • Allows for a flexible evolution of the schema
  • 26. Pagination • We support two types of pagination: skip & limit pagination cursor-like pagination • We skip n elements and return the next m elements. • We add a hash to the response encoding the next m elements of the page
  • 27. Error responses { "meta": …, "error": { "errorCode": 404, "errorMessage": "Entry not found" } } • Same meta as an OK response • Error information
  • 28. Tools provided • Beacon-verifier • Reference Implementation • BFF utility Coming soon https://beacon-schema-2.readthedocs.io Beacon Model viewer: • Beacon Framework • Beacon Model
  • 29. Summary • The Beacon Framework defines the structure of the response. • The Beacon Model defines the structure of the response data. • Implementing a beacon: • Start with a boolean beacon • List your available endpoints • Map the data from your DB to the models • Handle the different types of filters • Build a response following the framework
  • 30. Funding This project has received funding from the Canadian Institute of Health Research under grant agreement #404896 This project has received funding from the European Union's Horizon 2020 Research and Innovation Programme under grant agreement #825775