Api specifications



Download 5.13 Mb.
Page37/48
Date31.07.2017
Size5.13 Mb.
#25031
1   ...   33   34   35   36   37   38   39   40   ...   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/v2/FAWAPI.asmx HTTP/1.1

Host: localhost

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

Content-Length: length

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










string


Small or Medium or Large






HTTP/1.1 200 OK

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

Content-Length: length












string

base64Binary








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

Host: localhost

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

Content-Length: length








string


Small or Medium or Large






HTTP/1.1 200 OK

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

Content-Length: length












string

base64Binary







Sample Visual Basic.Net Code

Private Sub GetProfileImage ()

Dim FAWAPI As New WebReference.FAWAPI

Dim ProfileImageResult As New WebReference.ItemImageResult

ProfileImageResult = FAWAPI.GetProfileImage(Token, ProfileImageSize)

If ProfileImageResult.ErrorMessage IsNot Nothing Then

Msgbox ProfileImageResult.ErrorMessage

End If

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

ProfileImageSize

String

Yes

The size of the image. This can be passed in as small, medium or large.

AccountLogin2

This method logs you in to your FilesAnywhere account and starts an API session. It returns back a Token ID which must be used for subsequent API calls.

Syntax

LoginResult = AccountLogin(APIkey, OrgID, UserName, Password, DeviceID, AllowedIPList, ClientEncryptParam)

Usage

Use the AccountLogin call to login to your FilesAnywhere account and start a client API session. A client application must first login and obtain a Token ID before making other API calls.

The following parameters are needed to make the AccountLogin call:



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

  • OrgID (Client ID). The OrgID can have the following values:

    • 0 for a FilesAnywhere Web account.

    • 50 for a FilesAnywhere WebAdvanced account.

    • The Private Site Client ID for a FilesAnywhere Private Site.

  • UserName (FilesAnywhere UserName). This is the FilesAnywhere username using with the user logs in to his FilesAnywhere account.

  • Password (FilesAnywhere Password). This is the user’s FilesAnywhere account password

  • DeviceID. This is a unique identifier specific to the device. For example, this will be the SecureUUID on the iOS.

  • AllowedIPList (List of allowed IPs). This parameter is optional. It is a comma separated list of IPs which may be allowed to make subsequent API calls with the same Token ID which was passed back in this AccountLogin call.

  • ClientEncryptParam (An optional parameter which can be used to get back an encrypted password which can be used for subsequent logins).

    • If no password encryption is desired, the parameter should be passed as blank.

    • If the string “ENCRYPTEDNO” is passed as the value of this parameter, the LoginResult returns back an encrypted password. This encrypted password can be used in subsequent logins using the AccountLogin API method.

    • When an encrypted password (returned back as explained above) is used to login using the AccountLogin method, the value of this parameter should be passed as “ENCRYPTEDYES”.

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 /v2/fawapi.asmx HTTP/1.1

Host: 64.156.56.142

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

Content-Length: length

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








string

long

string


string


string

string

string





HTTP/1.1 200 OK

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

Content-Length: length












string

string

string

boolean

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 /v2/fawapi.asmx HTTP/1.1

Host: 64.156.56.142

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

Content-Length: length








string

long

string


string


string

string

string





HTTP/1.1 200 OK

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

Content-Length: length












string

string

string

boolean

boolean







Sample Visual Basic.Net Code

Private Sub AccountLogin2()

Dim FAWAPI As New WebReference.FAWAPI

Dim LoginResult As New WebReference.LoginResult2
LoginResult = FAWAPI.AccountLogin(APIKey, OrgID, UserName, Password, DeviceID, AllowedIPList, ClientEncryptParam)

If LoginResult.ErrorMessage <> "" Then

Msgbox LoginResult.ErrorMessage

Else


Dim Token As String = LoginResult.Token

End If


LoginResult = Nothing

FAWAPI = Nothing

End Sub

Request Arguments



Name

Data Type

Required

Description

APIKey

String

Yes

A Developer API Key. The “Getting Started” section describes how to obtain a Developer API Key

OrgID

Long

Yes

The Client ID

UserName

String

Yes

FilesAnywhere Username

Password

String

Yes

FilesAnywhere Password

DeviceID

String

Yes

The Device ID

AllowedIPList

String

No

Comma separated list of IPs to be allowed to make subsequent API calls with the same Token ID passed back by this AccountLogin call

ClientEncryptParam

String

No

A parameter which can be blank or have the following values: “ENCRYPTEDYES”, “ENCRYPTEDNO”.

When it has the value “ENCRYPTEDNO”, it means that the password being passed in the AccountLogin method is not encrypted, but, the LoginResult should pass back an encrypted password which will be used in subsequent AccountLogin calls.

When an encrypted password is passed to the AccountLogin method, this parameter should be assigned the string value “ENCRYPTEDYES”. This tells the system, that the password being passed is an encrypted password and it will decrypt it before using it.

GetGroupShareUserProfileImage

This method returns the profile image of an user’s GroupShare users, when the login token and image size, and username are passed as parameters. The image size returned back can have either of 3 sizes: small (24 x 24), medium (80 x 80), or large (225 x 300).

Syntax

ItemImageResult = GetGroupShareUserProfileImage(Token, ProfileImageSize, Username)

Usage

Use the GetGroupShareUserProfileImage method to get the profile image of an user.

The following parameters are needed to make the GetProfileImage call:



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

  • ProfileImageSize is the size of the image to be specified as a string value which can be either “small”, “medium” or “large”.

  • Username is the username of the user whose profile image is to be returned.




Download 5.13 Mb.

Share with your friends:
1   ...   33   34   35   36   37   38   39   40   ...   48




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

    Main page