Services can also be controlled individually through a number of endpoints. Some are the same as the
main replicator service endpoints (service, status, online, offline, purge, reset
), but other are
specific to services, for a full list, review the Replicator API Developer Docs
A few examples of a selection of these endpoints follow
Returns the defined backup capabilities for the service.
This is a GET
request to
GET 'https://127.0.0.1:8097/api/v8/replicator/services/west/backup-capabilities'
and returns a BackupCapabilitiesPayload
, for exmaple:
{ "payloadType": "BackupCapabilitiesPayload", "payloadVersion": "1", "payload": { "storageAgents": [ "fs" ], "backupAgents": [ "mariabackup-full", "mariabackup-incremental", "mysqldump", "xtrabackup-incremental", "xtrabackup-full", "mariabackup", "xtrabackup" ], "defaultBackupAgent": "mysqldump", "defaultStorageAgent": "fs" } }
Backups or restores the service.
This is a POST
request :
POST 'https://127.0.0.1:8097/api/v8/replicator/services/west/backup' or POST 'https://127.0.0.1:8097/api/v8/replicator/services/west/restore'
and a BackupPayLoad
can be specified to provide different settings :
{ "payloadType": "BackupPayload", "payloadVersion": "1", "payload": { "agentName": "mysqldump", "storageName": "fs" } }
If no payload is provided, backup will use the default backup and storage agents, as shown by
backupCapabilities
, while restore will use the last available backup of the service.
Changes the role of the replicator service.
This is a POST
request
PUT 'https://127.0.0.1:8097/api/v8/replicator/services/west/role'
A payload is mandatory to specify which should be the new role, for example:
{ "payloadType": "SetRolePayload", "payloadVersion": "1", "payload": { "role": "primary" } }
Valid roles are : primary, replica, relay, archive, thl_server, thl_client, direct
For other calls, refer to the Replicator API Developer documentation.