Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page describes the APIs that can be used to retrieve and update StandbyMP Configurations.

Configuration(s) Listing API

Purpose:

Returns existing Configuration(s) and related settings, such as Automated Standby Update, Standby Update Delay, Email and Slack settings, Observer, etc.

...

Expand
titleJSON
Code Block
languagejson
{
    "Status": 200,
    "Result": {
        "ConfigurationId": 1,
        "ConfigurationType": "PostgreSQL",
        "ConfigurationName": "PG1",
        "PrimaryAgentManagerId": "2w3l87blxgy2k",
        "PrimaryAgent": {
            "AgentManagerConfig": {
                "NatsAddress": "controlcenter",
                "NatsPort": 5533,
                "HostAddress": "postgresql1",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.27.0.3"
                ],
                "ServiceUser": "postgres",
                "AgentManagerId": "2w3l87blxgy2k",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890,
                "EnableDebugServer": true
            },
            "UserScript": "",
            "SpecificData": {
                "Port": 5432,
                "BinaryDirectory": "/usr/lib/postgresql/9.6/bin"
            }
        },
        "StandbyAgentManagerId": "2ig8qsjfi1c3r",
        "StandbyAgent": {
            "AgentManagerConfig": {
                "NatsAddress": "controlcenter",
                "NatsPort": 5533,
                "HostAddress": "postgresql2",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.27.0.4"
                ],
                "ServiceUser": "postgres",
                "AgentManagerId": "2ig8qsjfi1c3r",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890,
                "EnableDebugServer": true
            },
            "UserScript": "",
            "SpecificData": {
                "Port": 5432,
                "BinaryDirectory": "/usr/lib/postgresql/9.6/bin"
            }
        },
        "Settings": {
            "ApplicationDelayMinutes": 0,
            "StandbyModeConfig": {
                "UndoFilePath": "",
                "Enabled": false
            },
            "AutoSyncConfig": {
                "Enabled": false,
                "IntervalSeconds": 0,
                "BackupType": ""
            },
            "NotifierConfig": {
                "To": null
            },
            "ObserverConfigurationSettings": {
                "Enabled": false,
                "NotificationOnly": false,
                "CheckIntervalSeconds": 0,
                "MaxFailCount": 0,
                "SendEmail": false,
                "SendSlack": false,
                "HeartbeatEnabled": false,
                "HeartbeatHour": 0,
                "HeartbeatMinute": 0,
                "Rule": ""
            }
        },
        "HasFailedOver": false,
        "Disabled": false,
        "LicenseKey": "4jo70-qwp4l-7gplh-g1eji-yln5f-1gbil-1wzwk"
    }
}

Edit Configuration API

Purpose:

Allows updating Configuration parameters and settings, such as Automated Standby Update, Standby Update Delay, Email and Slack settings, Observer, etc.

Warning: This API allows to change all the Configuration parameters. Please be careful while using.

...

Code Block
languagejson
{
  "Status": 200,
  "Result": {}
}

Configuration(s) API Usage Examples

For getting comprehensive JSON output results, while using API, we parse all outputs with ā€œjqā€ which can be easily installed by for example as root:

...

In all below examples we use authentication method via ā€œ-uā€ for authentication method via cookie, check the /wiki/spaces/DSMP/pages/3432415233 Authentication page

Configuration Details

...