Your API calls must be authenticated to access the CA User Activity Reporting Module event log store. Here are several ways to set up authentication:
User Name and Password Example
https://ELMSERVER:5250/spin/calmapi/getObject.csp?type=getQueryList&username=xx&password=xx
This example uses the getQueryList command, and authenticates using a CA User Activity Reporting Module user name and password.
Certificate Name and Password Example
https://ELMSERVER:5250/spin/calmapi/getObject.csp?type=getELMServers&certname=xx&password=xx
This example uses the getELMservers command, and authenticates using a certificate name and password.
Session ID Example
https://ELMSERVER:5250/spin/calmapi/getObject.csp?type=getQueryViewer&objectId=Subscription/panels/System_Event_Count_By_Event_Action&sessionID=xxxxx
This example uses the getQueryViewer command, and authenticates using a session ID.
This call authenticates a user using a set of CA EEM credentials, a certificate, or a session ID.
Because you can include authentication information in any API call URL, you do not need a separate login call in most cases. The login call is most useful for returning a Session ID, which can then be used to authenticate another call, such as getReportViewer.
The arguments used for this call are as follows:
Defines the valid CA User Activity Reporting Module user name for authentication.
Defines the certificate name for authentication, if you have registered the product you want to access CA User Activity Reporting Module.
Defines either the CA User Activity Reporting Module user password, or the certificate password for authentication, depending on which method you have used for authentication.
Defines the session ID from an existing authenticated session, which you can use to authenticate a new session.
API Login Examples
Command:
https://ELMSERVER:5250/spin/calmapi/calmapi_login.csp&username=xx&password=xx
Success Response:
<?xml version="1.0" encoding="UTF-8" ?> <Result> <Value>true</Value> <Description>Authentication Successful.</Description> <SessionId>spin=62e39751-computername.domain.com49b8a97e-9bfd318-1</SessionId> </Result>
The session ID opened by the login appears in the <SessionId> tag.
Failure Response:
<?xml version="1.0" encoding="UTF-8" ?> <Result> <Value>false</Value> <Description> EE_AUTHFAILED Authentication Failed</Description> </Result>
This call ends an API session by logging out a user, ends a certificate session, or ends a session created through session ID. The call accepts no arguments.
API Logout Examples
https://ELMSERVER:5250/spin/calmapi/calmapi_logout.csp
Success Response:
<?xml version="1.0" encoding="UTF-8" ?> <Result> <Value>true</Value> <Description>Logout Successful</Description> </Result>
Failure Response:
<?xml version="1.0" encoding="UTF-8" ?> <Result> <Value>false</Value> <Description> User is not logged in</Description> </Result> UTHFAILED Authentication Failed</Description> </Result>
CA User Activity Reporting Module creates a session each time you use an API call. The persistence of these sessions differs depending on the authentication method you use:
CA User Activity Reporting Module closes certificate-authenticated sessions under the following circumstances:
The CA User Activity Reporting Module session timer begins to count down, and ends the session after the timeout value you have configured expires.
If many getQueryViewer or getReportViewer calls are in use, there can be a number of open but idle sessions. To reduce the system resources used by such sessions, use the logout command to end a session when an outside product user logs out, or an outside product session ends.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|