Carbon copies and do.ashx

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Sep/2015, at 17:43

Old versions have a 'code' property that differentiate normal version from 'carbon copy' versions (see http://forum.teradp.com/topic.asp?whichpage=1&TOPIC_ID=564#3243).

Retrieving old versions using

 ../do.ashx?cmd=version&ids=2545

returns something like this:

  <ActionList . . .>

    <ActionDesc xsi:type="UpdateActionDesc" Time="2011-08-09T21:47:50.66Z" . . . ObjVersionCode="Normal" . . . />

    <ActionDesc xsi:type="UpdateActionDesc" Time="2011-08-09T21:47:23.84Z" . . . ObjVersionCode="Normal" . . . />

    <ActionDesc xsi:type="UpdateActionDesc" Time="2011-08-09T21:46:50.387Z" . . . ObjVersionCode="Carbon" . . . />

  </ActionList>

where the 'ObjVersionCode' attribute indicates the code of each version. By default do.ashx?cmd=version returns all versions regardless of their code, but it is also possible to filter by code using the new 'codes' option, e.g.

  ../do.ashx?cmd=version&ids=2545&codes=carbon

returns only carbon copy versions.

The cmd4 'audit' command when used with the '-version' option to return only old versions works in the same way, and has a new '-codes' option as well.

The cmd4 'removeversions' command has a new '-codes' option to filter the versions to delete by code, e.g.

  cmd4 removeversions -ids 2545 -codes carbon -userName xxxx -password yyyy

where xxxx is the name of a GN4 user who can logon to system with sufficient permissions to perform this operation and yyyy is the password.

Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples.

removes all the carbon copy versions of the object with id 2545. If '-codes' is not specified 'removeversions' consider only normal versions and does not delete any carbon copy.

The versioning rules do not affect the carbon copies - i.e. carbon copies are never automatically deleted based on the number of versions to keep.

See also

State history and carbon copies