getBackupDetails — Retrieving details of backup

The getBackupDetails method retrieves the backup of a website. The request needs to be made once for each site. The response returns a previous backup’s result.

The API endpoint is:

https://api.sitelock.com/v1/partner

Request format

  • SiteLockOnlineRequest: This element is used to delineate the full API request.

    • authentication: The partner’s username, password, and branding

      • username: The partner’s API username

      • password: The partner’s API password

      • partner: (Optional) The brand name to use in messaging

    • getBackupDetails: The method name

      • site_id: The ID of the site for which to manage backups

      • backup_id: The ID of the backup for which to retrieve details

Example request

<SiteLockOnlineRequest>
    <authentication>
        <user>Username</user>
        <password>Password</password>
    </authentication>
    <getBackupDetails>
        <site_id>10900</site_id>
        <backup_id>1234</backup_id>
    </getBackupDetails>
</SiteLockOnlineRequest>

Response format

  • SiteLockOnlineResponse: This element is used to delineate the full API response.

    • getBackupDetails: The method name

      • backup_files: The backup files

        • backup_root: The directory where the website is installed.

        • dirs: A list of the website’s directories

          • dir: The directory name

        • files: A list of backup files

          • file: (Repeatable) The file information

            • id: A unique numerical identifier of the file

            • name: The filename

        • num_files: The number of files in this backup

        • size_kb: The total size in KB of this backup

      • backup_id: The ID of the backup for which the details were retrieved.

      • created_at: The backup creation date

      • site_id: The ID of the site for which the backup details were retrieved.

      • status: Either ok or error

Example response

<SiteLockOnlineResponse>
    <getBackupDetails>
        <backup_files>
            <backup_root>./supportdemo.sldev5.com/</backup_root>
            <dirs>
                <dir>wp-admin</dir>
                <dir>wp-content</dir>
                ...
            </dirs>
            <files>
                <file>
                    <name>.htaccess</name> <id>56903</id>
                        </file>
                        <file>
                    <name>index.php</name> <id>56904</id>
                </file>
                ...
            </files>
            <num_files>1840</num_files>
            <size_kb>41672</size_kb>
        </backup_files>
        <backup_id>420</backup_id>
        <created_at>2020-01-17 15:36:44</created_at>
        <site_id>10900</site_id>
        <status>ok</status>
    </getBackupDetails>
</SiteLockOnlineResponse>