GuardAPI Catalog Entry Functions

add_entry_location

Adds a new archive entry to the internal catalog location table.

Parameters

Parameter

Description

entryType

Required string. Must be one of the following:

  • CollectorDataArcive

  • AggDataArchive

  • AggResultArchive

processDesc

String. Used and required only when the above is AggResultArchive.

fileName

Required string. Identifies the file.

hostName

Required string. Identifies the host.

path

Required string. For FTP: specify the directory relative to the FTP account home directory; for SCP: Specify the directory as an absolute path.

user

Required string. User account to access the host.

password

Required string. Password for above.

retention

Optional integer. The number of days this entry is to be kept in the catalog (the default is 365).

storageSystem

Required string. Must be one of the following: EMC CENTERA, FTP, SCP, TSM.

Example

grdapi  add_entry_location entryType=CollectorDataArcive  fileName=733392-g7.guardium.com-w20071223.133546-d2007-12-27.dbdump.enc password=somePassword user=someUser path=/var/dump/ hostName=192.168.1.241  storageSystem=scp

Error Codes

ERR

Description

500

Could not add entry location - must specify a value for entryType

501

Could not add entry location - invalid entryType - should be one of : CollectorDataArcive, AggDataArchive, AggResultArchive

502

Could not add entry location - for Results Archives, must specify a value for processDesc

503

Could not complete the operation - must specify a value for hostName

504

Could not add entry location - must specify a value for path

505

Could not add entry location - both password & user should have values.

506

Could not add entry location - must specify a value for fileName

507

Wrong file name format for archived result:  -<myHostname>-d<res_process_id>_<run_no>_<execution_date>.res.<sql-ver>.tar.gz

508

Wrong file name format for archived data:  <day of data>-<gmachine>-w<time of zip>-d<execution_date>.agg.<sql-ver>.tar.gz.enc

509

Wrong file name format for collector archived data:  <day of data>-<gmachine>-w<time of zip>-d<execution_date>.dbdump.enc

510

Could not add entry location - fileName validation failed

511

Could not add entry location

512

Could not add entry location - An archive file with the same fileName,hostName,and path already exists.

513

Could not complete the operation - invalid hostName

514

Could not complete the operation - Special characters "\\$|&;`'"()!" are not allowed in fileName

515

Could not complete the operation - Special characters "$|&;`'"()!" are not allowed in hostName

516

Could not complete the operation - Special characters "$|&;`'"()!" are not allowed in path

517

Could not complete the operation - Special characters "\\$|&;`'"()!" are not allowed in user

528

Could not perform the operation - must specify a value for storageSystem

529

Could not perform the operation - check storageSystem

list_entry_location

Lists one archive location if a fileName is specified, or lists multiple multiple archive locations when the fileName is omitted.

Parameters

Parameter

Description

fileName

Optional string. Identifies the single file location to be listed. If omitted, all file locations on the specified hostName and path (see below) will be listed.

hostName

Required string. Identifies the host.

path

Required string. For FTP: specify the directory relative to the FTP account home directory; for SCP: Specify the directory as an absolute path.

Example

grdapi list_entry_location   path=/mnt/nfs/ogazit/archive_results/ hostName=192.168.1.33

Error Codes

ERR

Description

503

Could not complete the operation - must specify a value for hostName

513

Could not complete the operation - invalid hostName

515

Could not complete the operation - Special characters "$|&;`'"()!" are not allowed in hostName

560

Could not read entry location - must specify a value for hostName

561

Could not read entry location - must specify a value for path

562

Could not read entry location(s)

563

Could Not find any archive location

remove_entry_location

Updates one archive location if a fileName is specified, or removes multiple archive locations when the fileName is omitted.

Parameters

Parameter

Description

fileName

Optional string. Identifies the single file location to be removed. If omitted, all file locations on the specified hostName and path (see below) will be removed.

hostName

Required string. Identifies the host.

path

Required string. For FTP: specify the directory relative to the FTP account home directory; for SCP: Specify the directory as an absolute path.

Example

grdapi remove_entry_location  path=/var/dump/mojgan hostName=192.168.1.18

Error Codes

ERR

Description

503

Could not complete the operation - must specify a value for hostName

513

Could not complete the operation - invalid hostName

515

Could not complete the operation - Special characters "$|&;`'"()!" are not allowed in hostName

550

Could not remove entry location - must specify a value for hostName

551

Could not remove entry location - must specify a value for path

552

Could not remove entry location(s)

203

Could not complete the operation - must specify a value for hostName

204

Could not complete the operation - invalid hostName

205

Could not remove entry location - must specify a value for hostName

206

Could not remove entry location - must specify a value for path

207

Could not remove entry location(s)

update_entry_location

Updates one archive locations if a fileName is specified, or updates multiple archive locations when the fileName is omitted.

Parameters

Parameter

Description

fileName

Optional string. Identifies the single file location to be updated. If omitted, all file locations on the specified hostName and path (see below) will be updated.

hostName

Required string. Identifies the host.

path

Required string. For FTP: specify the directory relative to the FTP account home directory; for SCP: Specify the directory as an absolute path.

newHostName

Optional string. When used, specifies the new host name.

newPath

Optional string. When used, specifies the new path.

user

Required string. User account to access the host.

password

Required string. Password for above.

retention

Optional integer. The number of days this entry is to be kept in the catalog (the default is 365).

storageSystem

Required string. Must be one of the following: EMC CENTERA, FTP, SCP, TSM.

Example

grdapi update_entry_location  fileName=g11.guardium.com-1_4_2008-01-10_10:27:24.res.70.tar.gz.enc path=/mnt/nfs/ogazit/archive_results/ hostName=qaserver    storageSystem=SCP newPath=/var/dump/mojgan  newHostName=192.168.1.18

Error Codes

ERR

Description

503

Could not complete the operation - must specify a value for hostName

513

Could not complete the operation - invalid hostName

515

Could not complete the operation - Special characters "$|&;`'"()!" are not allowed in hostName

528

Could not perform the operation - must specify a value for storageSystem

529

Could not perform the operation - check storageSystem

530

Could not update entry location - must specify a value for hostName

531

Could not update entry location - must specify a value for path

532

Could not update entry location - No match were found

533

Could not update entry location - problem getting entry type

534

Could not update all entry locations, however, some were updated

535

Could not update any entry locations

536

Could not update entry location - more than one archive location with the same fileName,hostName,and path exists.

537

Could not update entry location - invalid newhostName

538

Could not update entry location - Special characters "$|&;`'"()!" are not allowed in newhostName

539

Could not update entry location - Special characters "$|&;`'"()!" are not allowed in newPath

540

Could not update entry location - Special characters "\\$|&;`'"()!" are not allowed in user