Api specifications



Download 5.13 Mb.
Page43/48
Date31.07.2017
Size5.13 Mb.
#25031
1   ...   40   41   42   43   44   45   46   47   48

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 /FACORPAPI/FAWAPI.asmx HTTP/1.1

Host: localhost

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

Content-Length: length

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










string

string

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 /FACORPAPI/FAWAPI.asmx HTTP/1.1

Host: localhost

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

Content-Length: length








string

string

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 GetFolderAccessKey()

Dim FAWAPI As New WebReference.FAWAPI

Dim FolderAccessKeyResult

As New WebReference. GetFolderAccessKeyResult
FolderAccessKeyResult = FAWAPI. GetFolderAccessKeyResult (Token, UserName, Password, FolderPath)

If FolderAccessKeyResult.ErrorMessage IsNot Nothing Then

Msgbox FolderAccessKeyResult.ErrorMessage

Else


Msgbox FolderAccessKeyResult. FolderAccessKey

End If


FolderAccessKeyResult = 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

UserName

String

Yes

FilesAnywhere username using which the user logs in to the FilesAnywhere account.

Password

String

Yes

User’s FilesAnywhere account password.

FolderPath

String

Yes

The full FilesAnywhere path of the folder in the form \UserVolume\FolderNameA\FolderNameB\

OR

Only Folder Name (withour \). In this case, the API will create the folder in the first writable folder it finds.



Response

GetFolderAccessKeyResult

GetFolderAccessKeyResult Properties

Name

Data Type

Description

ErrorMessage

String

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

FolderAccessKey

String

Unique ID of Folder which can be used to upload files into associated folder for user.

UploadFileWithFolderAccessKey

Upload a file using a folder access key.

Syntax

UploadFileResult = UploadFileWithFolderAccessKey(APIKey, FolderAccessKey, FileName, FileData)


Usage

Use the UploadFileWithFolderAccessKey function to upload file to a user’s FilesAnywhere account using the FolderAccessKey that the user has shared with you.

The following parameters are needed to make the UploadFileWithFolderAccessKey call:


  • APIKey (A Developer API Key. See the “Getting Started” section above, to find out how to obtain a Developer API Key).

  • FolderAccessKey. Unique Access Key of a folder belonging to a specified user which can be generated using GetFolderAccessKey API.

  • FileName (Name of the file to be uploaded).

  • FileData (The content of the file in binary format). The data read from the file must be converted to the XML base64Binary format.




Download 5.13 Mb.

Share with your friends:
1   ...   40   41   42   43   44   45   46   47   48




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

    Main page