system.provisioning.snapshot
Description
Provides methods to access and delete system snapshots.
Namespace:
system.provisioning.snapshot
Method: addTagToSnapshot
HTTP POST
Description:
Adds tag to snapshot
Parameters:
-
string sessionKey
-
int snapId - ID of the snapshot
-
string tagName - Name of the snapshot tag
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: deleteSnapshot
HTTP POST
Description:
Deletes a snapshot with the given snapshot id
Parameters:
-
string sessionKey
-
int snapId - ID of snapshot to delete
Returns:
-
int - 1 on success, exception thrown otherwise.
Available since API version: 10.1
Method: deleteSnapshots
HTTP POST
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
-
dateTime.iso8601 startDate
-
dateTime.iso8601 endDate
Returns:
-
int - 1 on success, exception thrown otherwise.
Available since API version: 10.1
Method: deleteSnapshots
HTTP POST
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 - ID of system to delete snapshots for
-
dateTime.iso8601 startDate
-
dateTime.iso8601 endDate
Returns:
-
int - 1 on success, exception thrown otherwise.
Available since API version: 10.1
Method: deleteSnapshots
HTTP POST
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 dateDetails
-
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
HTTP POST
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 - ID of system to delete snapshots for
-
struct dateDetails
-
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
HTTP GET
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
HTTP GET
Description:
List the packages associated with a snapshot.
Parameters:
-
string sessionKey
-
int snapId
Returns:
-
array :
-
struct package nevra
-
string "name"
-
string "epoch"
-
string "version"
-
string "release"
-
string "arch"
-
Available since API version: 10.1
Method: listSnapshots
HTTP GET
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 sid
-
dateTime.iso8601 startDate
-
dateTime.iso8601 endDate
Returns:
-
array :
-
struct server snapshot
-
int "id"
-
string "reason" - the reason for the snapshot’s existence
-
dateTime.iso8601 "created"
-
string array "channels" - labels of channels associated with the snapshot
-
string array "groups" - names of server groups associated with the snapshot
-
string array "entitlements" - names of system entitlements associated with the snapshot
-
string array "config_channels" - labels of config channels the snapshot is associated with
-
string array "tags" - 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: listSnapshots
HTTP GET
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 sid
-
struct dateDetails
-
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"
-
string array "channels" - labels of channels associated with the snapshot
-
string array "groups" - names of server groups associated with the snapshot
-
string array "entitlements" - names of system entitlements associated with the snapshot
-
string array "config_channels" - labels of config channels the snapshot is associated with
-
string array "tags" - 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
HTTP POST
Description:
Rollbacks server to snapshot
Parameters:
-
string sessionKey
-
int sid
-
int snapId - ID of the snapshot
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: rollbackToTag
HTTP POST
Description:
Rollbacks server to snapshot
Parameters:
-
string sessionKey
-
int sid
-
string tagName - Name of the snapshot tag
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: rollbackToTag
HTTP POST
Description:
Rollbacks server to snapshot
Parameters:
-
string sessionKey
-
string tagName - Name of the snapshot tag
Returns:
-
int - 1 on success, exception thrown otherwise.