Trigarde
Monitor · Secure · Back up
Uptime monitoringSites, APIs and databases checked as often as every minute Security auditA grade from A to E, with the fix for every issue Instant alertsEmail, Telegram or WhatsApp, the moment it breaks Daily backupEncrypted, verified and stored off-site How it works
Pricing Docs Security Status : Degraded performance
Log inGet started
Log in Get started
Developers

Agent API

Version 1.0 · JSON over HTTPS · base URL https://trigatde.cloud/api/v1/

1. Getting started2. Authentication3. Errors and limits 4. Ping5. Health report6. Security report 7. Backup upload8. Encryption format9. Ready-made agents

The agent API lets a small program on your server send Trigarde its backups, its health and an internal security check. You do not need to write code: our ready-made agents for WordPress, Linux and PHP already use it. This page is for developers who want to build their own integration.

1. Getting started

  1. Add your website in your dashboard (Monitoring → Add a site).
  2. Open the site, go to the Agent and API section and create an API key. It starts with trg_ and is shown only once: we only keep its fingerprint.
  3. Check the key:
curl -H "Authorization: Bearer trg_your_key" https://trigatde.cloud/api/v1/ping

Each key belongs to one site. Use one key per server so you can revoke one without affecting the others.

2. Authentication

Send the key in the Authorization header on every request. Optionally send X-Agent-Version so the dashboard can show which version is installed.

Authorization: Bearer trg_your_key
X-Agent-Version: my-script/1.2
Content-Type: application/json

A key has one or more scopes: sauvegarde (backups), sante (health) and securite (security). New keys have all three. Requests with a missing or unknown key are logged and repeated failures from the same address are blocked.

3. Errors and limits

Errors always use the same shape:

{"error": {"code": "INVALID_API_KEY", "message": "Unknown or revoked API key."}}
StatusCodeMeaning
400BAD_REQUEST, BAD_CHUNKInvalid JSON, field or chunk size
401MISSING_API_KEY, INVALID_API_KEYNo key, or a revoked or unknown key
402SUBSCRIPTION_INACTIVE, BACKUP_OPTION_REQUIREDSubscription expired, or the daily backup option is not active
403SCOPE_DENIEDThe key does not have the required scope
404NOT_FOUNDUnknown upload
405METHOD_NOT_ALLOWEDWrong HTTP method
409OFFSET_MISMATCH, CLOSEDChunk sent at the wrong position, or upload already closed
413TOO_LARGEArchive above 5 GB
422(upload status echec)Size or SHA-256 check failed when completing
429RATE_LIMITED, TOO_MANY_UPLOADSMore than 240 requests per minute, or 3 uploads already open
507QUOTA_EXCEEDEDStorage quota of 25 GB per account reached

4. Ping

GET/api/v1/ping

Checks the key and returns what it can do. Call it first.

{
  "ok": true,
  "api_version": "1.0",
  "site": "My shop",
  "address": "https://example.com/",
  "scopes": ["sauvegarde", "sante", "securite"],
  "backup": {"allowed": true, "max_size": 5368709120, "chunk_size": 8388608, "kept": 14}
}

Sizes are in bytes. If backup.allowed is false, skip the upload and send only health and security reports.

5. Health report

POST/api/v1/healthscope sante

Sends the state of the server. Every field is optional: send what you can measure. Sizes are in bytes. Maximum body size: 512 KB.

{
  "disque":   {"total": 85899345920, "libre": 41875931136},
  "memoire":  {"total": 8589934592, "disponible": 5368709120},
  "charge":   [0.42, 0.37, 0.30],
  "coeurs":   4,
  "services": [{"nom": "nginx", "actif": true}, {"nom": "postgresql", "actif": true}],
  "os":       {"nom": "Ubuntu 24.04 LTS"},
  "noyau":    "6.8.0-45-generic",
  "base":     {"connectee": true, "version": "PostgreSQL 16.4"}
}

Response 201: {"ok": true, "level": "ok"}. The level is ok, attention or critique: disk above 80 % or memory above 85 % raises a warning, a stopped service or an unreachable database is critical.

6. Security report

POST/api/v1/securityscope securite

Sends what the agent found inside the server. Lists are truncated to 200 entries. Maximum body size: 2 MB.

{
  "php_version": "8.3.12",
  "cms": {"nom": "WordPress", "version": "6.7.1"},
  "premier_inventaire": false,
  "total_fichiers": 1874,
  "fichiers_modifies": ["wp-includes/version.php"],
  "fichiers_ajoutes": ["wp-content/uploads/2026/11/x.php"],
  "suspects": [{"fichier": "wp-content/uploads/x.php", "motif": "eval(base64_decode"}],
  "php_dans_uploads": ["wp-content/uploads/2026/11/x.php"],
  "permissions": [{"fichier": "wp-config.php", "mode": "0666"}],
  "fichiers_sensibles": [".env", "backup.sql"],
  "os": {"id": "ubuntu", "version": "24.04", "nom": "Ubuntu 24.04 LTS"},
  "systeme": {"ssh_root": false, "ssh_mot_de_passe": false, "pare_feu": "ufw", "pare_feu_actif": true,
              "fail2ban": true, "mises_a_jour_securite": 3, "redemarrage_requis": false}
}

The response lists each finding with its status (ok, avertissement, echec or info). A critical report sends an email alert to the site owner, with the fix to apply.

7. Backup upload

Backups are uploaded in chunks of at most 8 MB, so a broken connection never restarts from zero. Requires the sauvegarde scope and the daily backup option. The last 14 archives of each site are kept.

POST/api/v1/backupsopen an upload

{"name": "backup_2026-11-30.zip.trg", "size": 52428800,
 "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
 "encrypted": true, "meta": {"files": 1520, "database": "mysql"}}

Response 201: {"id": "…", "status": "reception", "size": 52428800, "received": 0, "chunk_size": …}. meta is free-form (4 KB max) and shown in the dashboard.

PUT/api/v1/backups/<id>/datasend a chunk

Send the raw bytes as the body (Content-Type: application/octet-stream) with X-Offset set to the number of bytes already received. If the offset is wrong, the API answers 409 OFFSET_MISMATCH with the current received value: resume from there.

curl -X PUT -H "Authorization: Bearer trg_your_key" \
     -H "X-Offset: 0" -H "Content-Type: application/octet-stream" \
     --data-binary @chunk-0.bin https://trigatde.cloud/api/v1/backups/<id>/data

GET/api/v1/backups/<id>state, to resume

Returns the same object as above. Use received to know where to resume after an interruption.

POST/api/v1/backups/<id>/completefinish

The server checks the size and the SHA-256 of the whole file. 200 with "status": "ok" means the archive is stored and appears in "My backups"; 422 with "status": "echec" means the check failed and the upload must be restarted.

8. Encryption format

We recommend encrypting archives on your server before upload, with a passphrase that only you know: Trigarde then stores data it cannot read. Our agents use the TRG1 format, which you can also produce yourself:

"TRG1" (4 bytes) | salt (16 bytes)
then, for each 1 MB block of the original file:
  length of ciphertext (4 bytes, big-endian) | IV (12 bytes) | GCM tag (16 bytes) | ciphertext

key = PBKDF2-HMAC-SHA256(passphrase, salt, 200 000 iterations, 32 bytes)
cipher = AES-256-GCM, a new random IV for every block

To decrypt a downloaded archive: php trigarde-agent.php dechiffrer archive.trg out.zip or trigarde-agent dechiffrer archive.trg out.tar.gz on Linux. If you lose the passphrase, nobody can recover the backup, including us.

9. Ready-made agents

  • WordPress: trigarde-wordpress.zip. Upload it in Plugins → Add new, then Settings → Trigarde.
  • Linux server: install.sh and the agent source. Read it, then run sudo bash install.sh.
  • Other PHP site: download trigarde-agent.php from your site's page in the dashboard.

All agents are plain source code that you can read before installing. Questions? Create an account or contact us from your dashboard.

Trigarde
Monitor · Secure · Back up

The control tower for business websites and web apps, wherever they are hosted.

Product

FeaturesDaily backupPricingFAQAPI docs

Trust

Security & privacySystem statusReport a vulnerability

Account

Create an accountLog in
© 2026 Trigarde. All rights reserved. · Terms · Privacy Payments secured by GeniusPay · Prices in FCFA (XOF)
Cookies

We only use cookies that are essential for the site to work: keeping you signed in, protecting forms, and remembering your language and country. No advertising, social media or analytics cookies. Cookie policy

NamePurposeDuration
sessionidKeep you signed in12 hours
csrftokenProtect forms against forgery1 year
langueRemember your chosen language1 year
paysShow the payment methods of your country1 year

These cookies are strictly necessary: they cannot be turned off without breaking the site. Your light or dark theme is kept in your browser and never sent to us.