Admin API: read-only operational endpoints

Admin API: read-only operational endpoints 1.0.0 beta 1

Free Download via Daily Lucky Task
Summary
XenForo's REST API is a content API:
XenForo's REST API is a content API: it reads and writes threads, posts and members. It cannot tell a monitoring script whether anything is in the error log, which add-ons are installed at which version, whether cron is running, or how the forum is configured.

This add-on adds read-only endpoints for exactly that, so that a monitoring system, a dashboard or an agent can ask about a forum's operational state without being given the admin control panel. No endpoint changes the forum: the only thing any of them writes is a line in the admin log for each member lookup.

  • Error log summary: errors grouped by signature, with counts, the add-on each comes from, whether it came from a web request, a job or the command line, and how many members were affected. Never the message, the trace, or who was behind it.
  • Logs: counts from every log XenForo keeps, including the IP, login attempt and upgrade logs the control panel has no page for.
  • Add-ons: every add-on and its version, whether its files match, and any upgrade left pending.
  • Add-on checks: whether an add-on's own validate checks pass, for add-ons that declare them.
  • Cron entries and the job queue: overdue entries, stalled and failed jobs.
  • Who is online, the approval queue, reports, registrations and content by state, and user upgrades: counts.
  • Options and config.php: which settings are set, or their values with every secret withheld, behind a scope of its own.
Troubleshooting sometimes needs a member: which other accounts have used this IP address, who the moderators and administrators are, which upgrades a member holds. Those endpoints each need a scope of their own and XenForo's own admin permission for the same thing, so the API is never a way round the control panel. Every member lookup is written to the admin log.

  • A user API key only. Super user keys and OAuth tokens are refused.
  • Each capability is a scope ticked on the key. A key set to "all scopes" is refused, so that one radio button cannot hand over member data or the values of settings.
  • The key's user needs the Use the Admin API admin permission.
Two code events let an add-on take part: hampel_admin_api_redaction declares which of its options and config.php keys are secrets, so that the rest of its settings can be shown; hampel_admin_api_validate declares its own checks, so that they can be run over the API. The README has the details.

admin-api:config shows how the add-on is set up and which keys can use it; admin-api:validate proves it works. admin-api:fault-* plant real faults on a test forum, so that there is something for every endpoint to report. They refuse to run unless the forum's config.php enables them.

  • XenForo 2.2.0 or later (a few fields XenForo 2.2 does not record are reported as absent)
  • PHP 7.4 or later
  • The REST API enabled
This is a beta. It has run on several production forums, polled every few minutes by monitoring, without a defect, but the endpoints may still change before 1.0.0. The full documentation, with every endpoint and field, is in the README in the download.

Author
axtona
Views
1
Extension type
zip
File size
151.1 KB
First release
Last update
Latest file name
Hampel-AdminApi-1.0.0b1.zip
MD5
53a0670ed271a5958ed9aa8710959611
VirusTotal
View report
Ratings 0.00 star(s) 0 ratings
Link was Broken? Send message to the Website Team and we will assist you quickly!
Support Developer If you are satisfied with the test or your project has earned you money, Click the More Information button to support the developer by purchasing.

More resources from axtona

xfmcp: using agents to monitor your forum A
Ask an assistant why your forum's mail stopped and it can only guess.
Orboni crypto payments A
Orboni is a third-party service that integrates with XenForo to facilitate account upgrades for users...
Plaxswap Crypto Payment Gateway A
Plaxswap Crypto Payment Gateway is a native XenForo payment provider that allows users to accept crypto...

Similar resources

[OzzModz] TMDb TV Thread Starter: IMDb API A
The product integrates IMDb ratings into the TMDb TV addon, enhancing its functionality by providing users...
[OzzModz] TMDb Movie Thread Starter: IMDb API A
The product adds IMDb ratings to the TMDb Movie thread starter add-on, enhancing users' movie viewing...
[021] Real time threads A
The product is called Real-Time Messaging, and it allows users to engage in real-time conversations...
Back
Top