I am building a single programmatic export/backup of GiraffeSpotter data to replicate all fields currently in the two manual web exports (Standard Format and Encounter Annotation). Fields from both are required, e.g., sometimes we filter by right side images only, or by survey type.
After testing get_encounter() against the live API, several fields present in the web export are missing or shaped differently in the v3 response.
Fields missing or differently shaped in get_encounter():
- decimalLatitude / decimalLongitude — currently nested inside locationGeoPoint: {lat, lon}
- Annotation bbox — not returned at all (annotationViewpoints and annotationIAClasses are returned as flat lists, but no bounding box data is available via the API)
- Annotation MatchAgainst — not returned
- sourceUrl (the encounter page URL) — not returned
- alternateID — not returned
- submitterOrganization — not returned
- recordedBy — not returned
- Photographer email — submitters[] contains displayName and imageURL but no email address
Some occurrence fields are partially embedded in the encounter response under different names (occurrenceComments, occurrenceGroupBehavior, occurrenceGroupComposition) but the most-needed fields — sightingPlatform, fieldSurveyCode, group size estimates, and transect data — require a separate occurrence fetch entirely (see related PR #18).
A full export that matches the web UI currently requires:
- search_encounters() for basic fields
- get_encounter() per record for annotations, state, media
- A raw session call to /api/v3/search/occurrence for survey/occurrence fields
- get_individual() per record for individual names and social units
Ideally the v3 API would either flatten the nested fields or document these structural differences so client libraries can handle them correctly.
I am building a single programmatic export/backup of GiraffeSpotter data to replicate all fields currently in the two manual web exports (Standard Format and Encounter Annotation). Fields from both are required, e.g., sometimes we filter by right side images only, or by survey type.
After testing get_encounter() against the live API, several fields present in the web export are missing or shaped differently in the v3 response.
Fields missing or differently shaped in get_encounter():
Some occurrence fields are partially embedded in the encounter response under different names (occurrenceComments, occurrenceGroupBehavior, occurrenceGroupComposition) but the most-needed fields — sightingPlatform, fieldSurveyCode, group size estimates, and transect data — require a separate occurrence fetch entirely (see related PR #18).
A full export that matches the web UI currently requires:
Ideally the v3 API would either flatten the nested fields or document these structural differences so client libraries can handle them correctly.