SOAP API file retrieval service

The SOAP API file retrieval service asset manages the file asset functions of the SOAP server, including uploading and downloading files.

To add a SOAP API file retrieval service, go to Web services  SOAP API file retrieval service. For the API to work, it must be created under a SOAP server asset. The API will then be available to enable on the Details screen of the SOAP server.

You can configure the settings of the SOAP API file retrieval service on its associated asset screens. The majority of these screens are similar to those for a standard page. They are described in the Asset screens documentation. This documentation will describe the Details screen, which is different for a SOAP API file retrieval service.

Details screen

The Details screen allows you to configure the interface functions for the SOAP API file retrieval service. Read the Asset screens documentation for more information about the Status, Future status, Thumbnail, and Details sections.

Interface settings

This section allows you to control which functions the SOAP API asset service will provide when enabled on a SOAP server.

To enable the functions for the SOAP asset service:

  1. Click Edit on the Details screen.

  2. Select the Enabled checkbox beside the function list you want to make available on the API.

  3. Click Save to make the selected functions available to use.

The Operations section below contains a full explanation of each function.

Operations

The operations that are managed by the SOAP API file retrieval service are as follows:

Download

DownloadSoapInput (Download)

Elements - Parameter [Param Type] Description Min Occurs Max Occurs Type

AssetID [string]

The asset ID of the file asset to download. This parameter is mandatory.

1

1

simple

Example 1. Download request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:Download>
      <AssetID>100</AssetID>
    </ns1:Download>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

DownloadSoapOutput (DownloadResponse)

Elements - Parameter [Param Type] Min Occurs Max Occurs Type

FileName [string]

0

1

simple

FileType [string]

0

1

simple

FileSize [string]

0

1

simple

LastModified [string]

0

1

simple

FileContentBase64 [string]

0

1

simple

Example 2. Download response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:DownloadResponse>
      <FileName>File.txt</FileName>
      <FileType>txt</FileType>
      <FileSize>6</FileSize>
      <LastModified>21-03-2011 13:09:52</LastModified>
      <FileContentBase64>VGhpcyBpcyBhIHRlc3QgZmlsZQ==</FileContentBase64>
    </ns1:DownloadResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Upload

UploadSoapInput (Upload)

Elements - Parameter [Param Type] Description Min Occurs Max Occurs Type

AssetID [string]

The asset ID of the file asset to upload to. This parameter is mandatory.

1

1

simple

FileName [string]

The name of the file to upload. The file name should include the file extension, for example myhouse.jpg. This parameter is mandatory.

1

1

simple

FileContentBase64 [string]

The file data of the file to upload in binary form. This parameter is mandatory.

1

1

simple

Example 3. Upload request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:Upload>
      <AssetID>150</AssetID>
      <FileName>file.txt</FileName>
      <FileContentBase64>VGhpcyBpcyBhIHRlc3QgZmlsZQ==</FileContentBase64>
    </ns1:Upload>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

UploadSoapOutput (UploadResponse)

Elements - Parameter [Param Type] Min Occurs Max Occurs Type

UploadResult [string]

0

1

simple

Example 4. Upload response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:UploadResponse>
      <UploadResult>1</UploadResult>
    </ns1:UploadResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetFileInformation

GetFileInformationSoapInput (GetFileInformation)

Elements - Parameter [Param Type] Description Min Occurs Max Occurs Type

AssetID [string]

The asset ID of the file asset to return information from. This parameter is mandatory.

1

1

simple

Example 5. GetFileInformation request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:GetFileInformation>
      <AssetID>100</AssetID>
     </ns1:GetFileInformation>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetFileInformationSoapOutput (GetFileInformationResponse)

Elements - Parameter [Param Type] Min Occurs Max Occurs Type

FileName [string]

0

1

simple

FileType [string]

0

1

simple

FileSize [string]

0

1

simple

LastModified [string]

0

1

simple

FileSha1Hash [string]

1

1

simple

Example 6. GetFileInformation response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:GetFileInformationResponse>
      <FileName>File.txt</FileName>
      <FileType>txt</FileType>
      <FileSize>6</FileSize>
      <LastModified>21-03-2011 13:09:52</LastModified>
      <FileSha1Hash>bdbb0cca75ec3a652bf3f20b01f5f12cfe020122</FileSha1Hash>
    </ns1:GetFileInformationResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetImageInformation

GetImageInformationSoapInput (GetImageInformation)

Elements - Parameter [Param Type] Description Min Occurs Max Occurs Type

AssetID [string]

The asset ID of the file asset to return information from. This parameter is mandatory.

1

1

simple

Example 7. GetImageInformation request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:GetImageInformation>
      <AssetID>160</AssetID>
    </ns1:GetImageInformation>
  </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

GetImageInformationSoapOutput (GetImageInformationResponse)

Elements - Parameter [Param Type] Min Occurs Max Occurs Type

FileName [string]

0

1

simple

FileTitle [string]

0

1

simple

FileType [string]

0

1

simple

FileSize [string]

0

1

simple

MimeType [string]

0

1

simple

ImageWidth [string]

0

1

simple

ImageHeight [string]

0

1

simple

LastModified [string]

0

1

simple

Example 8. GetImageInformation response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://SYSTEM_ROOT_URL/_web_services/soap-server">
  <SOAP-ENV:Body>
    <ns1:GetImageInformationResponse>
      <FileName>Image.jpg</FileName>
      <FileTitle>Pic</FileTitle>
      <FileType>image</FileType>
      <FileSize>43037</FileSize>
      <MimeType>image/jpeg</MimeType>
      <ImageWidth>553</ImageWidth>
      <ImageHeight>208</ImageHeight>
      <LastModified>01-05-2011 10:23:56</LastModified>
    </ns1:GetImageInformationResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

© 2015- Squiz Pty Ltd