system.provisioning.snapshot

Description

Provides methods to access and delete system snapshots.

Namespace:

system.provisioning.snapshot

Method: addTagToSnapshot

Description:

Adds tag to snapshot

Parameters:

  • string sessionKey

  • int snapshotId - Id of the snapshot

  • string tag - Name of the snapshot tag

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: deleteSnapshot

Description:

Deletes a snapshot with the given snapshot id

Parameters:

  • string sessionKey

  • int snapshotId - Id of snapshot to delete

Returns:

  • int - 1 on success, exception thrown otherwise.

Available since API version: 10.1

Method: deleteSnapshots

Description:

Deletes all snapshots across multiple systems based on the given date criteria. For example,

If the user provides startDate only, all snapshots created either on or after
the date provided will be removed.
If user provides startDate and endDate, all snapshots created on or between the
dates provided will be removed.
If the user doesn't provide a startDate and endDate, all snapshots will be
removed.

Parameters:

  • string sessionKey

  • struct - date details

    • dateTime.iso8601 "startDate" - Optional, unless endDate is provided.

    • dateTime.iso8601 "endDate" - Optional.

Returns:

  • int - 1 on success, exception thrown otherwise.

Available since API version: 10.1

Method: deleteSnapshots

Description:

Deletes all snapshots for a given system based on the date criteria. For example,

If the user provides startDate only, all snapshots created either on or after
the date provided will be removed.
If user provides startDate and endDate, all snapshots created on or between the
dates provided will be removed.
If the user doesn't provide a startDate and endDate, all snapshots associated
with the server will be removed.

Parameters:

  • string sessionKey

  • int sid - system id of system to delete snapshots for

  • struct - date details

    • dateTime.iso8601 "startDate" - Optional, unless endDate is provided.

    • dateTime.iso8601 "endDate" - Optional.

Returns:

  • int - 1 on success, exception thrown otherwise.

Available since API version: 10.1

Method: listSnapshotConfigFiles

Description:

List the config files associated with a snapshot.

Parameters:

  • string sessionKey

  • int snapId

Returns:

  • array :

  • struct - Configuration Revision information

    • string "type"

    • file

    • directory

    • symlink

    • string "path" - File Path

    • string "target_path" - Symbolic link Target File Path. Present for Symbolic links only.

    • string "channel" - Channel Name

    • string "contents" - File contents (base64 encoded according to the contents_enc64 attribute)

    • boolean "contents_enc64" - Identifies base64 encoded content

    • int "revision" - File Revision

    • dateTime.iso8601 "creation" - Creation Date

    • dateTime.iso8601 "modified" - Last Modified Date

    • string "owner" - File Owner. Present for files or directories only.

    • string "group" - File Group. Present for files or directories only.

    • int "permissions" - File Permissions (Deprecated). Present for files or directories only.

    • string "permissions_mode" - File Permissions. Present for files or directories only.

    • string "selinux_ctx" - SELinux Context (optional).

    • boolean "binary" - true/false , Present for files only.

    • string "sha256" - File’s sha256 signature. Present for files only.

    • string "macro-start-delimiter" - Macro start delimiter for a config file. Present for text files only.

    • string "macro-end-delimiter" - Macro end delimiter for a config file. Present for text files only.

Available since API version: 10.2

Method: listSnapshotPackages

Description:

List the packages associated with a snapshot.

Parameters:

  • string sessionKey

  • int snapId

Returns:

  • array :

  • struct - package nvera

    • string "name"

    • string "epoch"

    • string "version"

    • string "release"

    • string "arch"

Available since API version: 10.1

Method: listSnapshots

Description:

List snapshots for a given system. A user may optionally provide a start and end date to narrow the snapshots that will be listed. For example,

If the user provides startDate only, all snapshots created either on or after
the date provided will be returned.
If user provides startDate and endDate, all snapshots created on or between the
dates provided will be returned.
If the user doesn't provide a startDate and endDate, all snapshots associated
with the server will be returned.

Parameters:

  • string sessionKey

  • int serverId

  • struct - date details

    • dateTime.iso8601 "startDate" - Optional, unless endDate is provided.

    • dateTime.iso8601 "endDate" - Optional.

Returns:

  • array :

  • struct - server snapshot

    • int "id"

    • string "reason" - the reason for the snapshot’s existence

    • dateTime.iso8601 "created"

    • array "channels"

      • string - labels of channels associated with the snapshot

    • array "groups"

      • string - Names of server groups associated with the snapshot

    • array "entitlements"

      • string - Names of system entitlements associated with the snapshot

    • array "config_channels"

      • string - Labels of config channels the snapshot is associated with.

    • array "tags"

      • string - Tag names associated with this snapshot.

    • string "Invalid_reason" - If the snapshot is invalid, this is the reason (optional).

Available since API version: 10.1

Method: rollbackToSnapshot

Description:

Rollbacks server to snapshot

Parameters:

  • string sessionKey

  • int serverId

  • int snapshotId - Id of the snapshot

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: rollbackToTag

Description:

Rollbacks server to snapshot

Parameters:

  • string sessionKey

  • int serverId

  • string tagName - Name of the snapshot tag

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: rollbackToTag

Description:

Rollbacks server to snapshot

Parameters:

  • string sessionKey

  • string tagName - Name of the snapshot tag

Returns:

  • int - 1 on success, exception thrown otherwise.