Making API Requests - Amazon CloudWatch Logs

Making API Requests

Query requests used with CloudWatch Logs are HTTP or HTTPS requests that use the HTTP verb GET or POST and a Query parameter named Action or Operation. This documentation uses Action, although Operation is supported for backward compatibility.

Note

CloudWatch Logs might log request contents for fields that aren’t considered sensitive, such as API request parameters for CloudWatch Logs actions. This provides debugging information for failed API requests.

CloudWatch Logs Endpoints

An endpoint is a URL that serves as an entry point for a web service. You can select a regional endpoint when you make your requests to reduce latency. For information about the endpoints used with CloudWatch Logs, see Regions and Endpoints in the Amazon Web Services General Reference.

Query Parameters

Each query request must include some common parameters to handle authentication and selection of an action. For more information, see Common Parameters.

Some API operations take lists of parameters. These lists are specified using the following notation: param.member.n. Values of n are integers starting from 1. All lists of parameters must follow this notation, including lists that contain only one parameter. For example, a Query parameter list looks like this:

&attribute.member.1=this &attribute.member.2=that

Request Identifiers

In every response from an AWS Query API, there is a ResponseMetadata element, which contains a RequestId element. This string is a unique identifier that AWS assigns to provide tracking information. Although RequestId is included as part of every response, it is not listed on the individual API documentation pages to improve readability and to reduce redundancy.

Query API Authentication

You can send query requests over either HTTP or HTTPS. Regardless of which protocol you use, you must include a signature in every query request. For more information about creating and including a signature, see Signing AWS API Requests in the Amazon Web Services General Reference.

Available Libraries

AWS provides libraries, sample code, tutorials, and other resources for software developers who prefer to build applications using language-specific APIs instead of the command-line tools and Query API. These libraries provide basic functions (not included in the APIs), such as request authentication, request retries, and error handling so that it is easier to get started. Libraries and resources are available for the following languages and platforms:

For libraries and sample code in all languages, see Sample Code & Libraries.