radmon.org API
3 years 1 month ago - 3 years 1 month ago #6310
by Simomax
Personal Use License:
You may download and save my content from this website for your personal use and enjoyment only. You may not share, redistribute, or transmit it to others, or use it commercially. All rights remain my own.
https://www.blinkyslab.co.uk/content-usage-notice
Replied by Simomax on topic radmon.org API
I have added three small new API functions - ping, time and pingtime (detailed below).
Function
ping
Description
Returns a reply. Can be used to see if the server, or at least the web server is operational and online.
Examples
https://radmon.org/radmon.php?function=ping
Result
pong
Function
time
Description
Returns the server date and time in php format (Y-m-d H:i:s)
Examples
https://radmon.org/radmon.php?function=time
Result
2022-12-09 17:37:38
Function
pingtime
Description
Returns a reply and returns the server date and time in php format (Y-m-d H:i:s). The separator used is & sign instead of a space as this can easily be used to parse the string.
Examples
https://radmon.org/radmon.php?function=pingtime
Result
pong&2022-12-09 17:39:48
Function
ping
Description
Returns a reply. Can be used to see if the server, or at least the web server is operational and online.
Examples
https://radmon.org/radmon.php?function=ping
Result
pong
Function
time
Description
Returns the server date and time in php format (Y-m-d H:i:s)
Examples
https://radmon.org/radmon.php?function=time
Result
2022-12-09 17:37:38
Function
pingtime
Description
Returns a reply and returns the server date and time in php format (Y-m-d H:i:s). The separator used is & sign instead of a space as this can easily be used to parse the string.
Examples
https://radmon.org/radmon.php?function=pingtime
Result
pong&2022-12-09 17:39:48
Personal Use License:
You may download and save my content from this website for your personal use and enjoyment only. You may not share, redistribute, or transmit it to others, or use it commercially. All rights remain my own.
https://www.blinkyslab.co.uk/content-usage-notice
Last edit: 3 years 1 month ago by Simomax.
Please Log in or Create an account to join the conversation.
3 years 1 month ago - 1 year 11 months ago #6316
by Simomax
Personal Use License:
You may download and save my content from this website for your personal use and enjoyment only. You may not share, redistribute, or transmit it to others, or use it commercially. All rights remain my own.
https://www.blinkyslab.co.uk/content-usage-notice
Replied by Simomax on topic radmon.org API
Hello All!
Below is the complete user API for radmon.org. There is also a much prettier PDF attached at the bottom of this post. I shall endeavour to keep it up to date and let you all know of any updates as and when they happen.
Cheerio!
API Specification 2024-02-16
Functions are executed with the following URL:
https://radmon.org/radmon.php?function=[function]&[parameter]=[parameter]
Example: https://radmon.org/radmon.php?function=showuserpage&user=Simomax
General status functions
Function: getstatus
Parameters:
Description: Gets the status of the server.
Example: https://radmon.org/radmon.php?function=getstatus
Returns: 'Raspberry Pi 4 server stats: CPU 32% Memory 15% Swap 12% CPU temp=58.4'C Filesystem 63% used Uptime 12 Days'
Function: ping
Parameters:
Description: Returns a reply. Can be used to see if the server, or at least the web server is operational and online.
Example: https://radmon.org/radmon.php?function=ping
Returns: 'pong'
Function: time
Parameters:
Description: Returns the server date and time in php format (Y-m-d H:i:s).
Example: https://radmon.org/radmon.php?function=time
Returns: '2022-12-09 17:37:38'
Function: pingtime
Parameters:
Description: Returns a reply and returns the server date and time in php format (Y-m-d H:i:s). The separator used is & sign instead of a space as this can
easily be used to parse the string.
Example: https://radmon.org/radmon.php?function=pingtime
Returns: 'pong&2022-12-09 17:39:48'
Station Submission
Function: submit
Parameters: user, password, value, unit
Description: Submits a station reading. Note: the unit should always be CPM.
Example: https://radmon.org/radmon.php?function=submit&user=Simomax&password=datasendingpassword&value=100&unit=CPM
Returns: 'OK'
Function: submitwithlatlng
Parameters: user, password, value, unit, latitude, longitude
Description: Submits a station reading and sets the station latitude and longitude. Note: the unit should always be CPM.
Example: https://radmon.org/radmon.php?function=submit&user=Simomax&password=datasendingpassword&value=100&unit=CPM&latitude=54.8097&longitude=-2.01445
Returns: 'OK'
Station Settings
Function: updatedescription
Parameters: user, password, description
Description: Used for updating the station description.
Example:
https://radmon.org/radmon.php?function=updatedescription&user=Simomax&password=datasendingpassword&description=My%20Station%20Is%20Fantas
tic!
Debug returns: 'Set user description successfully.'
Function: setlatitudelongitude
Parameters: user, password, latitude, longitude
Description: Sets the station latitude and longitude.
Example: https://radmon.org/radmon.php?function=setlatitudelongitude&user=Simomax&password=datasendingpassword&latitude=53.80951&longitude=-
3.014777
Debug returns: 'Set user latitude and longitude successfully.'
Function: setconversionfactor
Parameters: user, password, value
Description: Used for setting the station's GM tube conversion factor.
Example: https://radmon.org/radmon.php?function=setconversionfactor&user=Simomax&password=datasendingpassword&value=0.00833
Debug returns: 'Set conversion factor successfully.'
Function: setwarnalert
Parameters: user, password, warn, alert
Description: Returns Sets the station's alert and warning levels.
Example: https://radmon.org/radmon.php?function=setwarnalert&user=Simomax&password=datasendingpassword&warn=70&alert=120
Debug returns: 'Set warn and alert level successfully.'
Function: setalertsenabled
Parameters: user, password
Description: Enables alerts for the station.
Example: https://radmon.org/radmon.php?function=setalertsenabled&user=Simomax&password=datasendingpassword
Debug returns: 'Set alerts to enable successfully.'
Function: setalertsdisabled
Parameters: user, password
Description: Disables alerts for the station.
Example: https://radmon.org/radmon.php?function=setalertsdisabled&user=Simomax&password=datasendingpassword
Debug returns: 'Set alerts to disable successfully.'
Station details
Function: showuserpage
Parameters: user
Description: Shows the station page for the user.
Example: https://radmon.org/radmon.php?function=showuserpage&user=Simomax
Returns: Displays the user page
Function: lastreading
Parameters: user
Description: Displays the last reading of a station in CPM.
Example: https://radmon.org/radmon.php?function=lastreading&user=Simomax
Returns: '18 CPM on 2022-12-03 17:49:31UTC at Blackpool, Lancashire, United Kingdom'
Function: lastreadingusv
Parameters: user
Description: Displays the last reading of a station in uSv/hr.
Example: https://radmon.org/radmon.php?function=lastreadingusv&user=Simomax
Returns: '0.225 uSv/hr on 2022-12-03 17:45:31UTC at Blackpool, Lancashire, United Kingdom'
Data Manipulation
Function: deletealerts
Parameters: user, password, hours
Description: Deletes a station's alerts for the last X hours.
Example: https://radmon.org/radmon.php?function=deletealerts&user=Simomax&password=datasendingpassword&hours=24
Debug returns: 'Deleted alerts successfully.'
Function: deleteabove
Parameters: user, password, hours, above
Description: Deletes any readings from the last X hours where they are above X CPM,
Example: https://radmon.org/radmon.php?function=deleteabove&user=Simomax&password=datasendingpassword&hours=10&above=35
Debug returns: 'Deleted user data above successfully.'
Function: deleteuserdatahours
Parameters: user, password, hours
Description: Deletes the last X hours of data.
Example: https://radmon.org/radmon.php?function=deleteuserdatahours&user=Simomax&password=datasendingpassword&hours=1
Debug Returns: 'Deleted user data for last hour successfully.'
Graph drawing
Function: forcegraphrefresh
Parameters: user
Description: Forces a refresh of the station's graphs.
Example: https://radmon.org/radmon.php?function=forcegraphrefresh&user=Simomax
Returns: 'Graphs successfully generated.' if successful, or 'Server is too busy. Try again another time.' if server load is high.
Function: drawall
Parameters: user
Description: Refreshes (draws) the daily, weekly and monthly graphs.
Example: https://radmon.org/radmon.php?function=drawall&user=Simomax
Returns: Nothing
Function: graphtoday
Parameters: user
Description: Refreshes today's graph.
Example: https://radmon.org/radmon.php?function=graphtoday&user=Simomax
Returns: Nothing
Function: graphweek
Parameters: user
Description: Refreshes the weekly graph.
Example: https://radmon.org/radmon.php?function=graphweek&user=Simomax
Returns: Nothing
Function: graphmonth
Parameters: user
Description: Refreshes the monthly graph.
Example: https://radmon.org/radmon.php?function=graphmonth&user=Simomax
Returns: Nothing
Function: graphquarter
Parameters: user
Description: Refreshes the quarterly graph.
Example: https://radmon.org/radmon.php?function=graphquarter&user=Simomax
Returns: Nothing
Function: drawgraph24hr
Parameters: user
Description: Draws a graph from the station's last 24 hours submissions.
Example: https://radmon.org/radmon.php?function=drawgraph24hr&user=radspod_north
Returns: A graph
Function: drawsmallgraph
Parameters: user
Description: Draws a small graph of the station's last 12 hours submissions.
Example: https://radmon.org/radmon.php?function=drawsmallgraph&user=Simomax
Returns: A small graph
CPM Graphics
Function: cpmreading
Parameters: user
Description: Draws a small png of the station's last submission and status indicator.
Example: https://radmon.org/radmon.php?function=cpmreading&user=Simomax
Returns: PNG image
Function: cpmmeter
Parameters: user
Description: Draws a small png horizontal bar the station's last submission.
Example: https://radmon.org/radmon.php?function=cpmmeter&user=Simomax
Returns: PNG image
Listing Functions
Function: showuserlist
Parameters:
Description: Displays a list of active stations.
Example: https://radmon.org/radmon.php?function=showuserlist
Returns: List of active stations
Function: showuserlistinactive
Parameters:
Description: Displays list of inactive stations.
Example: https://radmon.org/radmon.php?function=showuserlistinactive
Returns: List of inactive stations
Below is the complete user API for radmon.org. There is also a much prettier PDF attached at the bottom of this post. I shall endeavour to keep it up to date and let you all know of any updates as and when they happen.
Cheerio!
API Specification 2024-02-16
Functions are executed with the following URL:
https://radmon.org/radmon.php?function=[function]&[parameter]=[parameter]
Example: https://radmon.org/radmon.php?function=showuserpage&user=Simomax
General status functions
Function: getstatus
Parameters:
Description: Gets the status of the server.
Example: https://radmon.org/radmon.php?function=getstatus
Returns: 'Raspberry Pi 4 server stats: CPU 32% Memory 15% Swap 12% CPU temp=58.4'C Filesystem 63% used Uptime 12 Days'
Function: ping
Parameters:
Description: Returns a reply. Can be used to see if the server, or at least the web server is operational and online.
Example: https://radmon.org/radmon.php?function=ping
Returns: 'pong'
Function: time
Parameters:
Description: Returns the server date and time in php format (Y-m-d H:i:s).
Example: https://radmon.org/radmon.php?function=time
Returns: '2022-12-09 17:37:38'
Function: pingtime
Parameters:
Description: Returns a reply and returns the server date and time in php format (Y-m-d H:i:s). The separator used is & sign instead of a space as this can
easily be used to parse the string.
Example: https://radmon.org/radmon.php?function=pingtime
Returns: 'pong&2022-12-09 17:39:48'
Station Submission
Function: submit
Parameters: user, password, value, unit
Description: Submits a station reading. Note: the unit should always be CPM.
Example: https://radmon.org/radmon.php?function=submit&user=Simomax&password=datasendingpassword&value=100&unit=CPM
Returns: 'OK'
Function: submitwithlatlng
Parameters: user, password, value, unit, latitude, longitude
Description: Submits a station reading and sets the station latitude and longitude. Note: the unit should always be CPM.
Example: https://radmon.org/radmon.php?function=submit&user=Simomax&password=datasendingpassword&value=100&unit=CPM&latitude=54.8097&longitude=-2.01445
Returns: 'OK'
Station Settings
Function: updatedescription
Parameters: user, password, description
Description: Used for updating the station description.
Example:
https://radmon.org/radmon.php?function=updatedescription&user=Simomax&password=datasendingpassword&description=My%20Station%20Is%20Fantas
tic!
Debug returns: 'Set user description successfully.'
Function: setlatitudelongitude
Parameters: user, password, latitude, longitude
Description: Sets the station latitude and longitude.
Example: https://radmon.org/radmon.php?function=setlatitudelongitude&user=Simomax&password=datasendingpassword&latitude=53.80951&longitude=-
3.014777
Debug returns: 'Set user latitude and longitude successfully.'
Function: setconversionfactor
Parameters: user, password, value
Description: Used for setting the station's GM tube conversion factor.
Example: https://radmon.org/radmon.php?function=setconversionfactor&user=Simomax&password=datasendingpassword&value=0.00833
Debug returns: 'Set conversion factor successfully.'
Function: setwarnalert
Parameters: user, password, warn, alert
Description: Returns Sets the station's alert and warning levels.
Example: https://radmon.org/radmon.php?function=setwarnalert&user=Simomax&password=datasendingpassword&warn=70&alert=120
Debug returns: 'Set warn and alert level successfully.'
Function: setalertsenabled
Parameters: user, password
Description: Enables alerts for the station.
Example: https://radmon.org/radmon.php?function=setalertsenabled&user=Simomax&password=datasendingpassword
Debug returns: 'Set alerts to enable successfully.'
Function: setalertsdisabled
Parameters: user, password
Description: Disables alerts for the station.
Example: https://radmon.org/radmon.php?function=setalertsdisabled&user=Simomax&password=datasendingpassword
Debug returns: 'Set alerts to disable successfully.'
Station details
Function: showuserpage
Parameters: user
Description: Shows the station page for the user.
Example: https://radmon.org/radmon.php?function=showuserpage&user=Simomax
Returns: Displays the user page
Function: lastreading
Parameters: user
Description: Displays the last reading of a station in CPM.
Example: https://radmon.org/radmon.php?function=lastreading&user=Simomax
Returns: '18 CPM on 2022-12-03 17:49:31UTC at Blackpool, Lancashire, United Kingdom'
Function: lastreadingusv
Parameters: user
Description: Displays the last reading of a station in uSv/hr.
Example: https://radmon.org/radmon.php?function=lastreadingusv&user=Simomax
Returns: '0.225 uSv/hr on 2022-12-03 17:45:31UTC at Blackpool, Lancashire, United Kingdom'
Data Manipulation
Function: deletealerts
Parameters: user, password, hours
Description: Deletes a station's alerts for the last X hours.
Example: https://radmon.org/radmon.php?function=deletealerts&user=Simomax&password=datasendingpassword&hours=24
Debug returns: 'Deleted alerts successfully.'
Function: deleteabove
Parameters: user, password, hours, above
Description: Deletes any readings from the last X hours where they are above X CPM,
Example: https://radmon.org/radmon.php?function=deleteabove&user=Simomax&password=datasendingpassword&hours=10&above=35
Debug returns: 'Deleted user data above successfully.'
Function: deleteuserdatahours
Parameters: user, password, hours
Description: Deletes the last X hours of data.
Example: https://radmon.org/radmon.php?function=deleteuserdatahours&user=Simomax&password=datasendingpassword&hours=1
Debug Returns: 'Deleted user data for last hour successfully.'
Graph drawing
Function: forcegraphrefresh
Parameters: user
Description: Forces a refresh of the station's graphs.
Example: https://radmon.org/radmon.php?function=forcegraphrefresh&user=Simomax
Returns: 'Graphs successfully generated.' if successful, or 'Server is too busy. Try again another time.' if server load is high.
Function: drawall
Parameters: user
Description: Refreshes (draws) the daily, weekly and monthly graphs.
Example: https://radmon.org/radmon.php?function=drawall&user=Simomax
Returns: Nothing
Function: graphtoday
Parameters: user
Description: Refreshes today's graph.
Example: https://radmon.org/radmon.php?function=graphtoday&user=Simomax
Returns: Nothing
Function: graphweek
Parameters: user
Description: Refreshes the weekly graph.
Example: https://radmon.org/radmon.php?function=graphweek&user=Simomax
Returns: Nothing
Function: graphmonth
Parameters: user
Description: Refreshes the monthly graph.
Example: https://radmon.org/radmon.php?function=graphmonth&user=Simomax
Returns: Nothing
Function: graphquarter
Parameters: user
Description: Refreshes the quarterly graph.
Example: https://radmon.org/radmon.php?function=graphquarter&user=Simomax
Returns: Nothing
Function: drawgraph24hr
Parameters: user
Description: Draws a graph from the station's last 24 hours submissions.
Example: https://radmon.org/radmon.php?function=drawgraph24hr&user=radspod_north
Returns: A graph
Function: drawsmallgraph
Parameters: user
Description: Draws a small graph of the station's last 12 hours submissions.
Example: https://radmon.org/radmon.php?function=drawsmallgraph&user=Simomax
Returns: A small graph
CPM Graphics
Function: cpmreading
Parameters: user
Description: Draws a small png of the station's last submission and status indicator.
Example: https://radmon.org/radmon.php?function=cpmreading&user=Simomax
Returns: PNG image
Function: cpmmeter
Parameters: user
Description: Draws a small png horizontal bar the station's last submission.
Example: https://radmon.org/radmon.php?function=cpmmeter&user=Simomax
Returns: PNG image
Listing Functions
Function: showuserlist
Parameters:
Description: Displays a list of active stations.
Example: https://radmon.org/radmon.php?function=showuserlist
Returns: List of active stations
Function: showuserlistinactive
Parameters:
Description: Displays list of inactive stations.
Example: https://radmon.org/radmon.php?function=showuserlistinactive
Returns: List of inactive stations
Personal Use License:
You may download and save my content from this website for your personal use and enjoyment only. You may not share, redistribute, or transmit it to others, or use it commercially. All rights remain my own.
https://www.blinkyslab.co.uk/content-usage-notice
Last edit: 1 year 11 months ago by Simomax.
Please Log in or Create an account to join the conversation.
Moderators: Gamma-Man
Time to create page: 0.202 seconds