Read the status of the platform backup
AuthorizationBearer <token>A credential of funcd's config, sent as Authorization: Bearer followed by its token.
OK
application/json- response
earliestRestorePoint?stringWhen the oldest generation that funcd restore run can load was written.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$date-timeenabled*booleanTrue when funcd runs the platform backup, which needs backup.target and storage.mode file.
held*booleanTrue while the platform is held: the backups wait for the release. It reads false, as interval and rpo read 0s, when funcd runs no backup: under storage.mode memory, or with neither backup.target nor kvstore.backup.enabled set.
interval*stringHow often the platform backup runs: backup.interval; 0s when funcd runs no backup.
^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$lastFailure?The last run that failed since funcd started; a run that succeeds clears it.
lastSuccessTime?stringWhen the newest complete generation on the target was written.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$date-timelastVerifiedTime?stringWhen the newest generation that funcdctl backup verify checked was written; absent when none is verified or its original has expired.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$date-timenextRunTime?stringWhen the next run is due.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$date-timerpo*stringThe most data that a loss may take: backup.objectives.rpo; 0s when funcd runs no backup.
^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$rpoRisk*booleanTrue when the platform backup is on and no verified generation is newer than backup.objectives.rpo; funcd then logs backup rpo at risk, and funcdctl backup verify clears it.
streams?The runs of the other backups since funcd started, by stream: blob for the mirror of Blob's files, kv for the KV backup.
curl -X GET 'https://example.com/apis/funcd.io/v1alpha1/platformbackup'{ "earliestRestorePoint": "2019-08-24T14:15:22Z", "enabled": true, "held": true, "interval": "string", "lastFailure": { "error": "string", "time": "2019-08-24T14:15:22Z" }, "lastSuccessTime": "2019-08-24T14:15:22Z", "lastVerifiedTime": "2019-08-24T14:15:22Z", "nextRunTime": "2019-08-24T14:15:22Z", "rpo": "string", "rpoRisk": true, "streams": { "property1": { "lastFailure": { "error": "string", "time": "2019-08-24T14:15:22Z" }, "lastSuccessTime": "2019-08-24T14:15:22Z" }, "property2": { "lastFailure": { "error": "string", "time": "2019-08-24T14:15:22Z" }, "lastSuccessTime": "2019-08-24T14:15:22Z" } }}Answers
| Status | Problem type | When | What to do |
|---|---|---|---|
| 200 | OK | ||
| 401 | urn:funcd:problem:unauthorized | The request carries no bearer token or API key, or one that funcd does not know. | Send a credential of funcd's config as a bearer token in the Authorization header, or in X-Api-Key. |
| 403 | urn:funcd:problem:forbidden | The credential's role does not allow it to read the status of the platform backup: only an admin's does. | Use an admin's credential. |
| 503 | urn:funcd:problem:unavailable | funcd could not list backup.target, where the platform backup writes: the bucket does not exist, the URL is wrong, or the target fails. | Check backup.target and the key of backup.credentialsFile, then read the status again. |