Previous Topic: URI https://localhost:8443/apwebsvc/sessions/<sessionName>/messagesNext Topic: OPTIONS sessions/<sessionName>/messages


GET sessions/<sessionName>/messages

Get a list of current messages processed by CA Automation Point. Message IDs are returned in order from the oldest message to the latest message, unless the request is altered by one or more query options.

Query Options

These HTTP query strings can be added to the URI to control the volume of returned URIs. Most query options represent properties of the object that are returned in the reply document. To see the definitions of those properties, you can read the schema documentation for the reply document.

Text=

The text of the message. A pattern-matching expression can be used to match message texts.

JobId=

Job ID associated with a message. A pattern-matching expression can be used to match Job ID.

AppName=

The application name that is associated with a message. A pattern-matching expression can be used to match application names.

Hostname=

The name of the host where the message originated from. A pattern-matching expression can be used to match host names.

Category=

The category that is associated with a message. A pattern-matching expression can be used to match categories.

Severity=

The severity that is associated with a message. A pattern-matching expression can be used to match severities.

ActionMessage=

Specifies whether normal or action messages are retrieved.Value is yes or no.

FromProcessTime=

A timestamp specifying the time in seconds elapsed since midnight Coordinated Universal Time (UTC), January 1, 1970. Only messages processed by Automation Point at the specified time or later are returned.An error occurs when specifying a value that is larger than the value of the ToProcessTime query option, when FromProcessTime and ToProcessTime are specified.

ToProcessTime=

A timestamp specifying the time in seconds elapsed since midnight Coordinated Universal Time (UTC), January 1, 1970. Only messages processed by Automation Point at the specified time or sooner are returned. An error occurs when specifying a value that is smaller than the value of the FromProcessTime query option, when FromProcessTime and ToProcessTime are specified.

AfterId=

Specifies a message ID after which you want to retrieve messages. Only messages that occurred after AfterId are returned. The last message ID returned in a previous GET request can be used as the AfterId in your next GET request.

When the special value 0 is specified for AfterId, the GET method returns the last (most recent) message ID. Since only one message ID can be returned in this case, a Count option specified in the same request is ignored. Similarly a FromCount option specified in the same request is also ignored. When using a non-zero value for AfterId, both Count and FromCount are applied to the request.

AfterId can specify a message ID from a different session than the session which you attempt to query. Thus, you could retrieve messages that arrive in one session after a message which arrived in another session.

Count=

Maximum number of message IDs to be returned in this request. The highest value that can be set for this option is 100000. If this option is not specified a default value of 10000 is used. When fewer messages than Count are available, the count value returned in the reply document specifies the actual number of message IDs returned.

FromCount=

The numeric count within your selected query from which sessions are included in your reply. The first position is numbered 1. Each successive position is incremented by one. The FromCount option can be used to retrieve a few sessions at a time, repeatedly.

Example:

This example retrieves messages in groups of 10, using a sequence.

get .../messages?Count=10
get .../messages?Count=10&FromCount=11
get .../messages?Count=10&FromCount=21
and so on.
Request Document

None

HTTP Request Headers
Authorization

Supply a user ID and password in the HTTP Basic Authentication format. The user ID must be a user account with the AP Remote Viewer VIEW privilege on the session that is the target of this HTTP method.

HTTP Response Headers
Status

Successful result = 200 = Ok

Successful Reply Document

MessageList in schema MessageList.xsd

The reply contains a list of identifiers for existing messages. This reply includes the URIs used to access those messages, for example:

https://localhost:8443/apwebsvc/sessions/<sessionName>/
messages/messageId1,
https://localhost:8443/apwebsvc/sessions/<sessionName>/
messages/messageId2,
and so on.