GetFileField

Description

This service returns a list of files from a specified File field on an item.

Arguments

Argument Type Description
auth (optional) Auth The Auth type supplies credentials and optionally, a host name for licensing. The userId and password can be specified with HTTP BASIC or WS-SECURITY instead.
itemId (required) ItemIdentifier Specifies the item that contains the File field.
fieldId (required) FieldIdentifier Specifies the File field.
includefile (optional) boolean Controls whether or not the file contents are included with the response. Default is false.
fileIdentifier (optional) Identifier Holds generic information about a file. Used to specify which files to return if there are multiple files.

Response

FieldObjectResponse is returned. See FieldObjectHolder.

Usage

Set includefile to false to return metadata about the files and not the file contents.

Note: If one or more files are included in the response, the cumulative total of all files that are returned is limited to 50 MB in size. If the total size of the included files is greater than 50 MB in size, you will only receive the meta data about the file attachments in the response. To change the size limit for all files in the response, see solution S142607.

Use one or more fileIdentifier arguments to return specific files from a File field instead of all files. If you do not include fileIdentifier to limit the response, all files are returned.

Faults

XML

The following XML is a snippet of the payload that is sent with GetFileField.

<urn:GetFileField>
    <urn:auth>
        <urn:userId>bill</urn:userId>
        <urn:password></urn:password>
        <urn:hostname></urn:hostname>
        <urn:loginAsUserId></urn:loginAsUserId>
    </urn:auth>
    <urn:itemId>
        <urn:displayName></urn:displayName>
        <urn:id>1</urn:id>
        <urn:uuid></urn:uuid>
        <urn:tableId>1012</urn:tableId>
        <urn:tableIdItemId></urn:tableIdItemId>
        <urn:issueId></urn:issueId>
    </urn:itemId>
    <urn:fieldId>
        <urn:displayName></urn:displayName>
        <urn:id></urn:id>
        <urn:uuid></urn:uuid>
        <urn:dbName>MULTI_FILE</urn:dbName>
    </urn:fieldId>
    <urn:includefile>true</urn:includefile>
    <urn:fileIdentifier>
        <urn:displayName></urn:displayName>
        <urn:id>15</urn:id>
        <urn:uuid></urn:uuid>
    </urn:fileIdentifier>
    <urn:fileIdentifier>
        <urn:displayName></urn:displayName>
        <urn:id>16</urn:id>
        <urn:uuid></urn:uuid>
    </urn:fileIdentifier> 
</urn:GetFileField>