Loading...

Supported XML Elements and Parameters Used in Index Queries

As supplied, the templates perform as described. However, you can change certain behaviors by modifying the values shown in this table if they appear in the template for that query. This list is not exhaustive, but a selection of the most common parameters you might want to use.

Parameter

Description

Values

queries type="type"

Required. An element where you specify the kind of query to perform. Optionally, can begin a structure for entering test criteria.

type can be set to:

  • DATA, to receive an alphabetically sorted list of file and folder metadata.
  • TOPBOTTOM, to receive a number of rows from the top or bottom of a sorted list of file and folder metadata. TOPBOTTOM queries imply a sort order, and use the topBottomParam element to specify the particulars of the query. topBottomParam supports these values:
    • ascending, determines the sort order. Valid values are "TRUE" and "" (null, which interprets as false)
    • count ="count"
    • field ="field_name" (see field names listed in XML_Output)
  • AGGREGATE, to receive a value that results from the application of logic across returned metadata. Available logic operators include:
    • MAX, the maximum numeric value for the numeric field specified in all returned file or folder metadata rows.
    • MIN, the minimum numeric value for the numeric field specified in all returned file or folder metadata rows.
    • AVG, the mathematical average of the numeric field specified in all returned file or folder metadata rows.
    • SUM, the mathematical sum of the numeric field specified in all returned file or folder metadata rows.
    • COUNT, the number of rows returned that met the specified testing criteria.
    • TOP, the first row of metadata in the results.
    • BOTTOM, the last row of metadata in the results.

      These operators are case-sensitive. Be sure to enter them in all capital letters, as shown.

whereClause structure

Provides a structure into which you can put one or more tests through which data is filtered.

A query can have multiple whereClause structures.

whereClause connector="connector"

Defines the relationship between multiple "where" clauses. Required in whereClauses after the first one when using more than one.

  • AND
  • OR

criteria field="fieldname"

Names the file metadata field to test.

  • FileSize, the size of a file. Folders return a FileSize of "0" (zero).
  • FolderSize, the size of a folder.

criteria dataOperator="operator"

Defines the relationship of the tested field to the value being tested against.

Numeric: GT and LT

Alphanumeric: relationship tests supported by SQL (LIKE, IN, NIN)

criteria dataUnits="unit"

Defines the units to apply to the value.

KB, MB, GB TB, PB

values val="value"

The value to test the field against.

  • For numeric tests, must be an ASCII-coded integer.
  • For alphanumeric tests, numbers and letters are valid, though they are constrained by the valid characters for that field (for example, a slash character is not valid when testing for a file name, though a wildcard is if valid for the LIKE operator).
  • If the test uses <criteria dataOperator> of "IN", such as with the Find Files Modified Yesterday example, supported values for this parameter include:
    • Today
    • Yesterday
    • ThisWeek (encompasses Sunday through Saturday)
    • ThisMonth
    • ThisYear
    • LastWeek
    • LastMonth
    • LastYear

topBottomParam count="number"

The number of results to be returned by a TOPBOTTOM operation.

A nonzero integer

topBottomParam ascending="option"

Controls whether the largest or smallest files are returned by a TOPBOTTOM operation.

  • True returns the smallest values
  • False (or null) returns the largest values

timeRange structure

A structure in which to place a backup fromTime and toTime to filter on. Its structure is:

<timeRange>
    <fromTime>date</fromTime>
    <toTime>date</toTime>
</timeRange>

See the descriptions for

  • fromTime
  • toTime

fromTime

A starting date (and optional time) of a range when the backup was taken.

Any valid date in the format "Mmm dd, yyyy" or "yyyy-mm-dd". Time of day is optional, in hh:mm:ss format, such as "Dec 03, 2013 19:05:00". Template value is null.

toTime

A ending date (and optional time) of a range when the backup was taken.

Any valid date in the format "Mmm dd, yyyy" or "yyyy-mm-dd". Time of day is optional, in hh:mm:ss format, such as "Dec 04, 2013 04:55:00". Template value is null.

ModifiedDate values val=date

The time when a file was last modified.

Any valid Unix timestamp value, consisting of a number of seconds counted from January 1, 1970, such as "1399420800" (May 6, 2014 20:00:00 EDT).

options structure

A structure in which to place various available options. Its structure is:

<options>
    <option_name>value</option_name>
</options>

Any available option, such as the restoreIndex, showDeletedFiles and caseInsensitive options listed in this table.

options restoreIndex

If the index is not available, restore it or abort the query.

true or null, where true means restore the index rather than abort.

options showDeletedFiles

Include deleted files in the results.

true or null, where true means include the deleted files.

Deleted files are identified in the XML output by a deleted="1" field in the <flags> element.

options caseInsensitive

When testing literal values, such as file name, ignore character case.

true or null, where true means do not consider character case. Default is null.

ma client_name

The fully qualified domain name of the MediaAgent computer. This needs to be the host name as specified in the CommCell Console.

A valid fully qualified domain name.

dataParam

Provides a structure by which to control paging and sorting of the XML query result file.

  • <paging> structure
  • <sortParam> structure

paging structure

Set into a <dataParam> structure, controls the presentation of the data. Its structure is:

<queries ...>
    <dataParam>
        <paging>
            <firstNode>0</firstNode>
            <pageSize>10000</pageSize>
            <skipNode>0</skipNode>
        </paging>
    </dataParam>
</queries>

See the descriptions for

  • paging <firstNode>
  • paging <pageSize>
  • paging <skipNode>

sortParam structure

Set into a <dataParam> structure, controls how the data is sorted in the output XML file. Its structure is:

<queries ...>
    <dataParam>
        <sortParam>
            <ascending>true</ascending>
            <sortBy>Flags</sortBy>
            <sortBy>FileName</sortBy>
        </sortParam>
    </dataParam>
</queries>

See the descriptions

  • sortParam <ascending>
  • sortParam <sortBy>

paging <firstNode>

Sets the number of the first result row in the output XML file.

Integer value including 0 (zero)

paging <pageSize>

Sets the number of rows to place into the output XML file.

Nonzero Integer value

paging <skipNode>

Sets the number of returned rows to skip before writing to the output file.

Integer value including 0 (zero)

sortParam <ascending>

Controls the order in which the returned data is sorted.

true or false. See the example in sortParam structure, above.

sortParam <sortBy>

Names a field to use as a "by" clause in SQL.

One or more field names, such as fileName or fileSize, to sort by. See the example in sortParam structure, above.

mode mode="n"

Required for Browse operations.

Retain the value supplied in each example template.

Last modified: 12/14/2018 8:49:35 PM