Commit graph

66 commits

Author SHA1 Message Date
Peter Goodhall
aaf3aa85a6 Add API endpoint for accessible public slugs
Introduce API method logbook_public_slugs_accessible($key) that authorizes the API key, updates last-used timestamp, and returns JSON of all station logbooks (owned or shared) that have non-empty public slugs for the key owner. Add Logbooks_model::public_slugs_accessible_by_user($user_id) to select matching logbooks, label access_level as "owner" for owners or the stored permission_level for shared entries, and order results by logbook_name. Endpoint returns 401 for missing/invalid keys and a success payload with status, count, and logbooks on success.
2026-04-03 22:35:25 +01:00
Peter Goodhall
78209d497b Add API endpoint for logbook public slugs
Introduce GET /api/logbook_public_slugs/{key} in the API controller to return a JSON list of the API key owner's station logbooks that have non-empty public slugs. The endpoint authorizes the key, updates last-used timestamp, responds with 401 for missing/invalid keys or 200 with status, count and logbook entries. Add Logbooks_model::public_slugs_by_user to query station_logbooks for non-null/non-empty public_slug values ordered by logbook_name.
2026-04-03 22:00:35 +01:00
Peter Goodhall
41bc5a2104 Add gridsquare support to worked status API
Expose an optional `gridsquare` parameter to logbook_worked_status: update the docblock, parse and normalize the incoming gridsquare, and include it in the response payload. Add worked flags `grid_overall` and `grid_band` (and set them based on logbook_model->check_if_grid_worked_in_logbook results) so clients can check whether a grid square has been worked overall or on a specific band. Input is upper-cased/trimmed like other fields; existing DB logic is left intact.
2026-04-02 14:28:36 +01:00
Peter Goodhall
4ab0bff623 Add logbook_worked_status API endpoint
Introduce POST /api/logbook_worked_status to check "worked" and "confirmed" status for a given callsign (and derived country) against a public logbook. The endpoint requires an API key, logbook_public_slug and callsign, and accepts optional band and mode. It validates input and logbook/station relationships, resolves country via DXCC lookup, maps mode to a main mode, and queries the logbook table for overall and band-specific worked status as well as LoTW/QSL confirmations. Returns structured JSON with worked and confirmed subfields and appropriate HTTP status codes (400/401/404/200). Models used: api_model, logbook_model, logbooks_model; uses configured table_name for DB queries.
2026-04-02 14:06:05 +01:00
Peter Goodhall
25a03ab1fa Add optimized radio command APIs and QSY integration
Introduces an optimized API endpoint to fetch all pending radio commands for a user in a single call, along with a maintenance endpoint for cleaning up expired and old commands. Updates the documentation to reflect these new endpoints and usage patterns. Adds a QSY endpoint to Dxcluster for queuing frequency/mode commands from the bandmap, and integrates client-side JavaScript to send QSY commands to the selected radio with user feedback. Enhances backend models to support user-scoped cleanup of expired and old commands.
2025-10-04 13:34:42 +01:00
Peter Goodhall
5c63e5099e Add radio command queueing and management system
Introduces a new radio command queueing system with API endpoints and a user interface for sending, viewing, and managing radio commands. Adds migration for the radio_commands table, extends the Cat model with command-related methods, and implements new controllers and views for both API and web interfaces. This enables integration with desktop apps and provides users with tools to send, track, and cancel radio commands.
2025-10-04 11:48:48 +01:00
Peter Goodhall
952007467d Add latitude and longitude to DXCC lookup results
Enhanced the DXCC lookup in Logbook_model to include latitude and longitude in the returned array. Updated API controller to utilize these new fields when returning recent QSOs and callsign lookups, providing more detailed location data in API responses.
2025-09-12 13:14:31 +01:00
Peter Goodhall
b7c065dbdd Add input validation for recent_qsos limit parameter
The recent_qsos API endpoint now validates and sanitizes the $limit parameter, enforcing a default of 10, a minimum of 1, and a maximum of 50. Additionally, get_last_qsos in Logbook_model ensures $num is always an integer to prevent SQL injection.
2025-09-09 14:25:40 +01:00
Peter Goodhall
11c83f5908 Update Api.php 2025-09-09 14:21:53 +01:00
Peter Goodhall
72ea1e3353 Remove limit validation and update SQL join in logbook
Removed the limit parameter validation and sanitization from Api.php, delegating limit handling elsewhere. Changed the SQL query in Logbook_model.php to use LEFT JOIN for station_profile, ensuring all logbook records are included even if no matching station_profile exists.
2025-09-09 14:19:15 +01:00
copilot-swe-agent[bot]
49038e21d3 Add API endpoint for recent QSO data
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
2025-07-30 21:23:45 +00:00
Peter Goodhall
be4b34feec [API] Adds logbook_check_country call 2025-06-24 15:24:20 +01:00
Emiliano Macedonio
fc6b1966e3 Added the possibility of sending data to the "qso" method API also in www-x-form-urlencoded format to allow the automatic sending of QSOs via software such as Log4OM 2024-05-21 16:55:59 +02:00
Peter Goodhall
b2168badd9 [API] Add check_auth function with json output 2024-05-04 14:00:57 +01:00
int2001
a2d9da8a3e
Prevent empty Call on editing or logging via API 2023-12-13 05:41:07 +00:00
tudacs
d0d740bc34 Rename import-count-field of return 2023-09-17 21:55:22 +02:00
tudacs
0ad31bb000 Add additional output to QSO-API call
Two return fields added for improved reporting:
- Messages returned from Logbook-import
- Number of QSO's added without message
2023-09-14 07:25:51 +02:00
phl0
c5e050f548
Check station callsign in station profile 2023-09-06 00:02:07 +02:00
int2001
522cc2a980
Refactores lookup_call and grid at API / Removed more unused stuff 2023-08-08 15:08:38 +00:00
int2001
1e269b18b2
removed a lot of unused (and dangerous) functions 2023-08-08 13:47:23 +00:00
int2001
12da0b1075
Added "Already imported to clublog" to ADIF-Importer 2023-08-07 05:23:57 +00:00
phl0
318fc29449
Use LoTW as official abbreviation 2023-07-27 09:16:55 +02:00
int2001
259336c5fb
Added 401 in case of missing key to api/radio for easier debugging 2023-07-26 12:23:52 +00:00
int2001
4a9ec6e87f
Removed old API-Endpoints for country_ and grid_worked 2023-07-25 12:50:07 +00:00
int2001
cfc9b6c8a0 Removed useless else at Api because script will never get there 2023-07-14 07:49:13 +00:00
int2001
723e575af3 Add HRDLog to Cloudlog 2023-07-07 11:33:15 +00:00
Peter Goodhall
7090c95447
Merge pull request #2253 from int2001/api_1632
Resolves issue 1632.
2023-07-05 15:23:58 +01:00
int2001
f938270f4c Resolves issue 1632. JSON-Array of stations will be returned if /index.php/api/station_info/[key] is called 2023-07-05 14:16:53 +00:00
Peter Goodhall
cfa0a59156 typo 2023-07-05 14:48:38 +01:00
Peter Goodhall
355070438d [API] Removed search_callsign()
Think search_callsign() is a left over from testing code but isn't used
2023-07-05 14:48:22 +01:00
Andreas
33a81154b6 [API] Corrected variable name and check 2023-06-15 09:26:17 +02:00
Andreas
563554dae5 [API] Added extra check for station_id 2023-06-15 08:12:57 +02:00
phl0
c57932be86
Make stats publicly usable with API key 2023-04-27 21:08:09 +02:00
Peter Goodhall
d02375fba6 [API] Fixes issue where nullable vars was first 2023-03-29 15:02:36 +01:00
Peter Goodhall
9f94f99f46 [API] Adds logbook_check_grid call 2023-03-28 14:57:43 +01:00
Peter Goodhall
0be6f42999 [API] Adds API call "logbook_check_callsign" to check if a callsign is in the logbook 2023-03-28 14:38:50 +01:00
phl0
6929a061eb
Add a column to API keys to show last usage timestamp
Squashed commit of the following:

commit 83f12cc945fa717945062a841854498368d8cb10
Author: phl0
Date:   Tue Mar 21 12:24:53 2023 +0100

    Change default value to current date/time

commit e1cb72f3fc80f581ee30d927772efe0ffe155059
Author: phl0
Date:   Tue Mar 21 12:05:46 2023 +0100

    Add functions to update timestamps

commit d303f629a0b2d200e49da36766cf72ed37c3fe92
Merge: 01a9606a 7dd76923
Author: phl0
Date:   Tue Mar 21 11:13:21 2023 +0100

    Merge remote-tracking branch 'origin/dev' into apiKeyLastUsed

commit 01a9606afde6aad6be0f07f34f8584e540c50e8c
Author: phl0
Date:   Tue Mar 21 11:11:51 2023 +0100

    Reorder DB migration due to previous commits

commit ec5cd743b96dc1ed0f2740f7b2051f88549f4248
Author: phl0
Date:   Fri Mar 17 16:23:34 2023 +0100

    Basics for API key last used
2023-03-21 12:26:15 +01:00
Ondřej Nový
da739e080f API: Detect wrong JSON and return correct error message 2022-01-24 16:25:16 +00:00
Peter Goodhall
96d7a2537d [API][QSO] Skips check_station_is_accessible() if import is coming from API
Skips check_station_is_accessible() if import is coming from API this is because api qso import doesn't have a session thus automatically fails.

Extra checks must be done on the api calls to make sure things are safe.

Fixes #1381

Co-Authored-By: Florian (DF2ET) <github@florian-wolters.de>
2022-01-24 16:13:25 +00:00
Peter Goodhall
8cb990fc30 [API] Allows all users to access 2021-11-14 11:57:21 +00:00
Peter Goodhall
6bf7d97df8 Removed test function. 2021-09-28 17:21:56 +01:00
Peter Goodhall
8b1770feab [API][CAT] Fixes issue where user_id isn't getting added to the hardware entry 2021-09-28 17:18:04 +01:00
Andreas
64827f4506 [ADIF Import] Added option to always use login call as operator. Request by OE3IDE. 2021-05-01 19:52:13 +02:00
Andreas
ae1c82815f [ADIF import] Skip QRZ Logbook upload when importing ADIF from import, and LoTW. 2020-12-11 10:49:33 +01:00
Andreas
b03a753ab6 [ADIF Import / Export] GUI tweaking. Split into tabs. Added option for marking QSOs as exported to QRZ Logbook when importing from ADIF. 2020-12-04 14:52:00 +01:00
Peter Goodhall
48679662de [API][QSO] Adds field "station_profile_id"
This adds the field station_profile_id to the QSO API this is the number thats shown when you are editing a profile.
2020-10-29 18:10:46 +00:00
Paul Beesley
2ebf33a084 Update admin page titles
Trying to bring the page title into line with the Admin menu dropdown entry or vice-versa, depending on which one is most used
2020-10-20 22:03:37 +01:00
Peter Goodhall
235c977040 Added Migration to delete the LoTW User List table and removed some unneeded coded 2020-09-21 14:10:55 +01:00
Kim Huebel
9cbd65b0cd Merge branch 'master' of https://github.com/magicbug/Cloudlog into configurable_modes
some futher modifications
2020-05-24 08:51:30 +02:00
Peter Goodhall
f6d8d02357 Added US State and County to the local data look up for the API lookup function 2020-04-07 00:07:17 +01:00