beautypg.com

User sync api checkauth operation, User sync api checkauth operation 46 – Google Apps Security and Compliance Services Web Services Application Programming Interface Guide, Early Access Version 1.5 User Manual

Page 48

background image

46

Message Security and Compliance Application Programming Interface Guide RELEASE EA version 1.5

User Sync API checkauth Operation

Description

The test operation determines if connections to the web service and the web
service client are blocked. In addition, it tests exception handling. It is a simple
round trip test and does not require an API license key.

true -- ‘should_work’. The connection is successful. If it fails, the
development tool will throw either an error, or warning depending upon the
type of failure.

false -- To test the exception handling between the web service and the
application, use test(false) which will complete the roundtrip between the
servers and return a StatusException in the confirmation_message.

The AutomatedBatch web service has a test operation as well.

Authentication

Read: Organization Management

Write: Organization Management

Exceptions

StatusException -- Intentionally thrown exception, used to test connection
level operation and the ability to send exceptions.

User Sync API API Infrastructure Exceptions -- See “Exceptions” on
page 44,
and for exception handling recommendations, see “Exception
Management” on page 20.

Response

If the test (true) operation is successful, it returns this string in the
confirmation_message:

You have successfully tested connection level operation

If the test (false) operation is successful, it returns StatusException in the
confirmation_message.

C# Example

The snippet example was created using Microsoft Visual Studio 2005.

UserSyncAPI.UserSyncService wsTest = new

UserSyncAPI.UserSyncService();

//Call the test method

wsTest.test(true);

Operation

checkauth

Request: checkauth (AuthElem)

Response: If successful, there is no response.

Description

The checkauth operation verifies the specified authentication credentials
without the need to call another operation.

AuthElem -- The AuthElem struct sets the authorization credentials for each
request. For more information, see “Authorization” on page 43.