-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpending-releasePending release for the nexdt versionPending release for the nexdt versiontestingRequires completing test casesRequires completing test cases
Milestone
Description
Gallagher's REST APIs return configurable fields (per instance of the server) called Personal Data Fields (PDFs). These are additional fields that are relevant to the organisation and are not common. These key of the fields are always prefixed with an @ symbol e.g @Student ID in an example from their docs:
{
"href": "https://localhost:8904/api/cardholders/325",
"id": "325",
"firstName": "Algernon",
"lastName": "Boothroyd",
"shortName": "Q",
"description": "Quartermaster",
"authorised": true,
"lastSuccessfulAccessTime": "2004-11-18T19:21:52Z",
"lastSuccessfulAccessZone": {
"href": "https://localhost:8904/api/access_zones/333",
"name": "Twilight zone"
},
"serverDisplayName": "ruatoria.satellite.int",
"division": {
"href": "https://localhost:8904/api/divisions/2"
},
"@Student ID": "8904640"
}We are using pyndatic schemas to parse the API response. The aim would be to use event based methods to dynamically parse these and make them available as a dictionary:
cardholder.pdfs["StudentId"]for the API user to access these fields in a Pythonic manner.
Note that the response has a field called personalDataDefinitions which contains references to each one of the PDF definitions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpending-releasePending release for the nexdt versionPending release for the nexdt versiontestingRequires completing test casesRequires completing test cases