Filedata

Use the FileData web service to query or locate one or more files based on file metadata, such as the name, type, storage path, size, or modification date.

URI

http://<hostname>/ws/FileData

Formats

HTTP method Format Description
GET /ws/FileData Get a paged list of file metadata for all of your files.
PUT /ws/FileData// Upload or change a file or folder in your account.
DELETE /ws/FileData// Delete a file or folder from your account.

Elements

fdPath

Specifies the hierarchical path to the file. Use the tilde character (~) to indicate your home directory.

fdName

Specifies the name of the file.

cstId

Remote Manager identifier for the customer.

fdCreatedDate

Specifies the date the file was first uploaded to Remote Manager (ISO 8601 standard format).

fdLastModifiedDate

Specifies the date the file was last modified (ISO 8601 standard format).

fdContentType

Specifies the type of data stored in the file.

fdSize

Specifies the size of the file in bytes.

fdType

Specifies the file type: file or directory.

The default is file.

[fdData]

Includes the Base64-encoded content of the file. A tool to encode and decode Base64 data is available here: http://ostermiller.org/calc/encode.html.

© 2023 Digi International Inc. All rights reserved.

List All Files

The following example shows how to get a paged list of file metadata for all of your files.

Request

GET /ws/FileData

Response (abbreviated)

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <resultTotalRows>455747</resultTotalRows>
    <requestedStartRow>0</requestedStartRow>
    <resultSize>1000</resultSize>
    <requestedSize>1000</requestedSize>
    <remainingSize>454747</remainingSize>
    <FileData>
        <id>
            <fdPath>/db/SB723050334974_Digi_International/00000000-00000000-00409DFF-FF640005/</fdPath>
            <fdName>RPC_response-1297463631.0-0001-received_attribute_report.xml</fdName>
        </id>
        <cstId>3439</cstId>
        <fdCreatedDate>2011-02-11T22:34:25Z</fdCreatedDate>
        <fdLastModifiedDate>2011-02-11T22:34:25Z</fdLastModifiedDate>
        <fdContentType>application/xml</fdContentType>
        <fdSize>506</fdSize>
        <fdType>file</fdType>
    </FileData>...<FileData>
        <id>
            <fdPath>/db/SB723050334974_Digi_International/00000000-00000000-00409DFF-FF640005/</fdPath>
            <fdName>RPC_response-1297463631.0-0003-received_attribute_report.xml</fdName>
        </id>
        <cstId>3439</cstId>
        <fdCreatedDate>2011-02-11T22:34:25Z</fdCreatedDate>
        <fdLastModifiedDate>2011-02-11T22:34:25Z</fdLastModifiedDate>
        <fdContentType>application/xml</fdContentType>
        <fdSize>506</fdSize>
        <fdType>file</fdType>
    </FileData>
</result>

© 2023 Digi International Inc. All rights reserved.

Get Files With Condition

The following examples show how to get files based on conditions.

Example 1: Get files written after a specified date:

GET /ws/FileData?condition=fdType='file' and fdLastModifiedDate>'2013-12-06T14:50:00.000Z'

Example 2: Get files that match name patterns using wildcards

The following example returns all files whose name starts with ‘sample’ and ends with ‘gas’ that were written to Remote Manager after the specified date.

GET /ws/FileData?condition=fdName like 'sample%25gas' and fdType='file' and fdLastModifiedDate>'2013-12-06T14:50:00.000Z'

© 2023 Digi International Inc. All rights reserved.

Get Files With Content

The following example shows how to use the embed=“true” option to embed the content of the file in the results in Base64 format.

Request

GET /ws/FileData?condition=fdPath='~/00000000-00000000-00409DFF-FF640005/' and fdType='file' 
and fdLastModifiedDate>'2010-11-24T22:25:04Z'&embed=true

Response

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <resultTotalRows>1264</resultTotalRows>
    <requestedStartRow>0</requestedStartRow>
    <resultSize>1000</resultSize>
    <requestedSize>1000</requestedSize>
    <remainingSize>264</remainingSize>
    <FileData>
        <id>
            <fdPath>/db/SB723050334974_Digi_International/00000000-00000000-00409DFF-FF640005/</fdPath>
            <fdName>RPC_response-1297463631.0-0001-received_attribute_report.xml</fdName>
        </id>
        <cstId>3439</cstId>
        <fdCreatedDate>2011-02-11T22:34:25Z</fdCreatedDate>
        <fdLastModifiedDate>2011-02-11T22:34:25Z</fdLastModifiedDate>
        <fdContentType>application/xml</fdContentType>
        <fdSize>506</fdSize>
        <fdType>file</fdType>
        <fdData>....</fdData>
    </FileData>...<FileData>
        <id>
            <fdPath>/db/SB723050334974_Digi_International/00000000-00000000-00409DFF-FF640005/</fdPath>
            <fdName>attribute_report.xml</fdName>
        </id>
        <cstId>3439</cstId>
        <fdCreatedDate>2011-02-11T22:34:25Z</fdCreatedDate>
        <fdLastModifiedDate>2011-02-11T22:34:25Z</fdLastModifiedDate>
        <fdContentType>application/xml</fdContentType>
        <fdSize>506</fdSize>
        <fdType>file</fdType>
        <fdData>....</fdData>
    </FileData>
</result>