Repository navigation
Conversation
Author
|
Discussion in #3484 |
finlstrm
marked this pull request as ready for review
October 29, 2026 01:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
api/get_contacts_adifendpoint for incremental ADIF exportSummary
Adds
POST /api/get_contacts_adif, which lets an API client download the QSOs of one station location as ADIF using a QSO-ID cursor, so new contacts can be synced without re-downloading the whole logbook.The response includes
exported_qsos,lastfetchedid(pass it asfetchfromidnext time),has_moreand theadifstring.limitdefaults to 5000, maximum 10000.Security
rorrwrights, with an owning user.station_idmust be a station location owned by the key's user. The SQL is scoped by station and owner, so changing the ID or cursor can't reach another user's data. Nonexistent and unauthorized stations return the same 403.Changes
Api.php: newget_contacts_adif()method.Adif_data.php: new scoped query.AdifHelper.php: newgetAdifHeader().Adif_export_request.phpfor request validation.docs/api_get_contacts_adif.md.No schema changes or migrations, and no existing endpoints are modified.
Tests
No unit tests have been included or written.
Active testing live against my own Cloudlog installation at v2.8.19 with no errors.
Inspiration
Developing my own unofficial desktop companion to Cloudlog, kc1mjp/cloudlog-desktop, I wanted to pull down my logbooks from Cloudlog via the API. Among other things, this allows an operator to see worked-before information using an offline local QSO cache. This would be great for the POTA/SOTA operator.
Other than the clunky method I was already using the Backup function of Cloudlog kc1mjp-tools/cloudlogBackup.sh and requires server-side cleanup of backups, I discovered there was still no proper API endpoint pulling down QSOs.
What I did find was Wavelog had implemented just the endpoint I was looking for, but I've already standardized on Cloudlog. So to scratch another itch, I implemented it here for Cloudlog.
Limitations
The cursor only detects newly added QSOs, not edits or deletions, though re-download of entire logbook is supported. Stations shared through a shared logbook are not exportable.