Change History

3 minute readReference

getDeploymentHistoryItems

Retrieves all the deployment history items for a specific environment.

You must specify projectName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

applicationName

(Optional) The application that owns the deployment history item.

Argument type: String

environmentName

(Optional) The name of the environment where the application runs.

Argument type: String

environmentProjectName

(Optional) The name for the project to which the environment or environment template belongs.

Argument type: String

latest

(Optional) < Boolean flag— 0|1|true|false >

If this is set to 1 or true, only the latest deployment information is returned.

Argument type: Boolean

processName

(Optional) The process that owns the deployment history item.

Argument type: String

snapshotName

(Optional) The snapshot that owns the deployment history item.

Argument type: String

Positional arguments

projectName

Response

Returns zero or more deployment history items.

ec-perl

syntax: $<object>->getDeploymentHistoryItems (<projectName>, {<optionals>});

Example

$ec->getSnapshot ("Tutorials", {applicationName => "Deploy"});

ectool

syntax: ectool getSnapshot <projectName> [optionals]

Example

ectool getSnapshot "Tutorials" --applicationName "Deploy"

getEntityChange

Retrieves the entity changes.

You must specify entityId, entityPath, or entityType.

Arguments Descriptions

entityId

Entity ID.

Argument Type: String

entityPath

Path to the entity.

Argument Type: String

entityType

Type of entity.

Argument Type: String

modifiedBy

(Optional) Login ID of the user who modified the object.

Argument Type: String

timeSince

(Optional) Changes since this time, the start time for changes.

This is the time line:

entity change timeline

Argument Type: Long

timeUntil

(Optional) Changes up to this time, the end time for changes. If this argument is not specified, the default is Now .

This is the time line:

entity change timeline

Argument Type: Long

Positional arguments

entityId, entityPath, or entityType

Response

Returns entity changes during the time interval between timeSince and timeUntil.

ec-perl

Enter one of these commands:

syntax: $<object>->getEntityChange(<entityId>, {<optionals>});

syntax: $<object>->getEntityChange(<entityPath>, {<optionals>});

syntax: $<object>->getEntityChange(<entityType>, {<optionals>});

Example

If the entityType is component:

$ec->getEntityChange("WAR file", {timeUntil => 1600});

ectool

Enter one of these commands:

syntax: ectool getEntityChange <entityId> [optionals]

syntax: ectool getEntityChange <entityPath> [optionals]

syntax: ectool getEntityChange <entityType> [optionals]

Example

If the entityType is component:

ectool getEntityChange "WAR file" --timeUntil 1600

getEntityChangeDetails

Retrieves the differences between entities.

You must specify entityId, entityType, and revisionNumber.

When CloudBees CD/RO exports entity changes in XML, as well as listing the ec_change_history_revision id as changeHistoryRevisionId, it now also lists this as revisionNumber.
Arguments Descriptions

entityId

The entity ID.

Argument type: UUID

entityType

The entity type.

Argument type: String

revisionNumber

The revision number of the entity.

Argument type: Integer

Positional arguments

entityId, entityType, revisionNumber

ResponseDetails.

Returns an entityChange element.

ec-perl

syntax: $<object>->getEntityChangeDetails (<entityId>, <entityType>, <revisionNumber>);

Example

$ec->getEntityChangeDetails("4fa914dd-73f1-11e3-b67e-b0a420524153", "Process", "4");

ectool

syntax: ectool getEntityChangeDetails <entityId> <entityType> <revisionNumber>

Example

ectool getSnapshots "4fa914dd-73f1-11e3-b67e-b0a420524153" "Process" "4"

pruneChangeHistory

Prunes obsolete-for-days data from the Change History tables.

You must enter daysToKeep.

Arguments Descriptions

daysToKeep

Number of days of Change History data to keep. The minimum is 7.

Argument type: Long

forcePruneAll

(Optional) Use this argument with caution. It is used most often for testing. It overrides the specified daysToKeep value and prunes the entire Change History, keeping nothing discardable. The forcePruneAll value = < Boolean flag - 0|1|true|false >. The default is 0 or false.

Argument type: Boolean

Positional arguments

daysToKeep

Response

None or a status OK message.

ec-perl

syntax: $<object>->pruneChangeHistory (<daysToKeep>, {<optionals>});

Example

$ec->pruneChangeHistory (14, {forcePruneAll => 0});

ectool

syntax: `ectool pruneChangeHistory <daysToKeep> [optionals] `

Example

ectool pruneChangeHistory 14 --forcePruneAll 0

revert

Reverts the state of the object to a previous state.

You must enter objectID, objectType, and revisionNumber.

You must have the Read , Modify , and Execute permissions to access to this API call.

When CloudBees CD/RO exports entity changes in XML, as well as listing the ec_change_history_revision id as changeHistoryRevisionId, it now also lists this as revisionNumber.
Arguments Descriptions

objectId

Object ID.

Argument type: UUID

objectType

Object type.

Argument Type: String

revisionNumber

Revision number of the object.

Argument Type: Integer

Positional arguments

objectID, objectType, revisionNumber

Response

None or a status OK message.

ec-perl

syntax: $<object>->revert (<objectID>, <objectType>, <revisionNumber>);

Example

$ec->revert ("4fa914dd-73f1-11e3-b67e-b0a420524153", "property", 3);

ectool

syntax: ectool revert <objectID> <objectType> <revisionNumber>

Example

ectool revert "4fa914dd-73f1-11e3-b67e-b0a420524153" "property" 3

searchEntityChange

Searches for entity changes.

You must enter the entityId, entityPath, or entityType.

Arguments Descriptions

entityId

The entity ID.

Argument Type: String

entityPath

Path to the entity.

Argument Type: String

entityType

Type of entity.

Argument Type: String

modifiedBy

(Optional) The login ID of the user who modified the object.

Argument Type: String

timeSince

(Optional) Start of the time interval for changes. CloudBees CD/RO searches for changes since this time.

This is the time line:

entity change timeline

Argument type: Long

timeUntil

(Optional) End of the time interval for changes. CloudBees CD/RO searches for changes up to this time.

If this argument is not specified, the default is Now .

This is the time line:

entity change timeline

Argument Type: Long

Positional arguments

entityId, entityPath, or entityType

Response

Returns entity changes during the time interval.

ec-perl

Enter one of these commands:

syntax: $<object>->searchEntityChange (<entityId>, {<optionals>});

syntax: $<object>->searchEntityChange (<entityPath>, {<optionals>});

syntax: $<object>->searchEntityChange (<entityType>, {<optionals>});

Example

If the entityType is component:

$ec->searchEntityChange("component", {timeUntil => 1600});

ectool

Enter one of these commands:

syntax: ectool searchEntityChange <entityId> [optionals]

syntax: ectool searchEntityChange <entityPath> [optionals]

syntax: ectool searchEntityChange <entityType> [optionals]

Example

If the entityType is component:

ectool searchEntityChange "component" --timeUntil 1600