Api specifications



Download 5.13 Mb.
Page8/48
Date31.07.2017
Size5.13 Mb.
#25031
1   ...   4   5   6   7   8   9   10   11   ...   48

CutItems

This method cuts items and puts them into your FilesAnywhere API clipboard. The items are not removed from the original location until a Paste call is made. When a paste call is made, the items are moved from the original location to the new location, after which, they are removed from the clipboard. If another CopyItems method or CutItems method is called before a Paste call, the items in the clipboard get replaced by the newly selected items of the CopyItems or CutItems call.

Syntax

CutItemsResult = CutItems(Token, ItemsToCut)

Usage

Use the CutItems method to keep one or more items in your FilesAnywhere API clipboard for the purpose of moving them from one location to another by issuing a subsequent Paste call.

The following parameters are needed to make the CutItems call:


  • Token (The Token ID returned by the last AccountLogin call).

  • ItemsToCut is an array of type Item. An item is defined by the following two parameters:

    • Type. This is the Item type and can either be a ‘file’ or a ‘folder’.

    • Path (Name of the item with the FilesAnywhere Path). The Path should be formatted like \UserVolume\FolderName\ItemName, where UserVolume is the FilesAnywhere UserName in whose account the item exists.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /fawapi.asmx HTTP/1.1

Host: api.filesanywhere.com

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "http://api.filesanywhere.com/CutItems"








string





string

string







string

string











HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length












string

boolean







SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /fawapi.asmx HTTP/1.1

Host: api.filesanywhere.com

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length








string





string

string







string

string











HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length








Response xmlns="http://api.filesanywhere.com/">



string

boolean







Sample Visual Basic.Net Code

Private Sub CutItems()

Dim FAWAPI As New WebReference.FAWAPI

Dim CutItemsResult As New WebReference.CutItemsResult

CutItemsResult = FAWAPI.CutItems(Token, ItemsToCut)

If Not CutItemsResult.Cut Or CutItemsResult.ErrorMessage <> ""

Then


Msgbox CutItemsResult.ErrorMessage

End If


CutItemsResult = Nothing

FAWAPI = Nothing

End Sub

Request Arguments



Name

Data Type

Required

Description

Token

String

Yes

The Token ID returned back in the last AccountLogin call

ItemsToCut

Array of type Item

Yes

An array of items.

An Item has the following properties:

Property Name

Data Type

Required

Description

Type

String

Yes

Type can either be a ‘file’ or a ‘folder’

Path

String

Yes

Full FilesAnywhere path of the Item in the form \UserVolume\FolderName\ItemName

Response

CutItemsResult

CutItemsResult Properties

Name

Data Type

Description

ErrorMessage

String

A description of the error, if any error was encountered while the CutItems method was executed. If the CutItems call was successful, the ErrorMessage is blank

Cut

Boolean

True or False indicating whether the CutItems call was a success or a failure

DeleteItems

This method deletes one or more items.

Syntax

DeleteItemsResult = DeleteItems(Token, ItemsToDelete)

Usage

Use the DeleteItems method to delete one or more items.

The following parameters are needed to make the DeleteItems call:



  • Token (The Token ID returned by the last AccountLogin call).

  • ItemsToDelete is an array of type Item. An item is defined by the following two parameters:

    • Type. This is the Item type and can either be a ‘file’ or a ‘folder’.

    • Path (Name of the item with the FilesAnywhere Path). The Path should be formatted like \UserVolume\FolderName\ItemName, where UserVolume is the FilesAnywhere UserName in whose account the item exists.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /fawapi.asmx HTTP/1.1

Host: api.filesanywhere.com

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "http://api.filesanywhere.com/DeleteItems"








string





string

string







string

string











HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length












string

boolean








SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /fawapi.asmx HTTP/1.1

Host: api.filesanywhere.com

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length








string





string

string







string

string











HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length












string

boolean







Sample Visual Basic.Net Code

Private Sub DeleteItems()

Dim FAWAPI As New WebReference.FAWAPI

Dim DeleteItemsResult As New WebReference.DeleteItemsResult

DeleteItemsResult = FAWAPI.DeleteItems(Token, ItemsToDelete)

If Not DeleteItemsResult.Deleted Or DeleteItemsResult.ErrorMessage

<> "" Then

Msgbox DeleteItemsResult.ErrorMessage

End If

DeleteItemsResult = Nothing



FAWAPI = Nothing

End Sub


Request Arguments

Name

Data Type

Required

Description

Token

String

Yes

The Token ID returned back in the last AccountLogin call

ItemsToDelete

Array of type Item

Yes

An array of items.

An Item has the following properties:

Property Name

Data Type

Required

Description

Type

String

Yes

Type can either be a ‘file’ or a ‘folder’

Path

String

Yes

Full FilesAnywhere path of the Item in the form \UserVolume\FolderName\ItemName

Response

DeleteItemsResult

DeleteItemsResult Properties

Name

Data Type

Description

ErrorMessage

String

A description of the error, if any error was encountered while the DeleteItems method was executed. If the DeleteItems call was successful, the ErrorMessage is blank.

Deleted

Boolean

True or False indicating whether the DeleteItems call was a success or a failure

DownloadFile

This method returns back a link using which you can download a file.

Syntax

DownloadFileResult = DownloadFile(Token, Path)

Usage

Use the DownloadFile method to get a link using which you can download a file.

The following parameters are needed to make the DownloadFile call:


  • Token (The Token ID returned by the last AccountLogin call).

  • Path (Name of the file to be downloaded along with the FilesAnywhere Path). The Path should be formatted like \UserVolume\FolderName\FileName, where Foldername is the name of the folder in which the file exists and UserVolume is the FilesAnywhere UserName in whose account the file exists.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /fawapi.asmx HTTP/1.1

Host: api.filesanywhere.com

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "http://api.filesanywhere.com/DownloadFile"








string

string







HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length












string

string








SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /fawapi.asmx HTTP/1.1

Host: api.filesanywhere.com

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length








string

string







HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length












string

string







Sample Visual Basic.Net Code

Private Sub DownloadFile()

Dim FAWAPI As New WebReference.FAWAPI

Dim DownloadFileResult As New WebReference.DownloadFileResult

DownloadFileResult = FAWAPI.DownloadFile(Token, Path)

If DownloadFileResult.ErrorMessage <> "" Then

Msgbox DownloadFileResult.ErrorMessage

End If

DownloadFileResult = Nothing



FAWAPI = Nothing

End Sub


Request Arguments

Name

Data Type

Required

Description

Token

String

Yes

The Token ID returned back in the last AccountLogin call

Path

String

Yes

Full FilesAnywhere path of the file in the form \UserVolume\FolderName\FileName

Response

DownloadFileResult

DownloadFileResult Properties

Name

Data Type

Description

ErrorMessage

String

A description of the error, if any error was encountered while the DownloadFile method was executed. If the DownloadFile call was successful, the ErrorMessage is blank

URL

String

The URL pointing to the file which is to be downloaded.



Download 5.13 Mb.

Share with your friends:
1   ...   4   5   6   7   8   9   10   11   ...   48




The database is protected by copyright ©ininet.org 2024
send message

    Main page