Open documentation ↗Overview
<p>You can use Amazon CloudWatch Logs to monitor, store, and access your log files from EC2 instances, CloudTrail, and other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console. Alternatively, you can use CloudWatch Logs commands in the Amazon Web Services CLI, CloudWatch Logs API, or CloudWatch Logs SDK.</p> <p>You can use CloudWatch Logs to:</p> <ul> <li> <p> <b>Monitor logs from EC2 instances in real time</b>: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs. Then, it can send you a notification whenever the rate of errors exceeds a threshold that you specify. CloudWatch Logs uses your log data for monitoring so no code changes are required. For example, you can monitor application logs for specific literal terms (such as "NullReferenceException"). You can also count the number of occurrences of a literal term at a particular position in log data (such as "404" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch metric that you specify.</p> </li> <li> <p> <b>Monitor CloudTrail logged events</b>: You can create alarms in CloudWatch and receive notifications of particular API activity as captured by CloudTrail. You can use the notification to perform troubleshooting.</p> </li> <li> <p> <b>Archive log data</b>: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events earlier than this setting are automatically deleted. The CloudWatch Logs agent helps to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.</p> </li> </ul>
Amazon CloudWatch Logs is a cloud platforms API from amazonaws.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 48 endpoints.
At a glance
- Authentication
- API key
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Cloud Platforms
- Version
- 2014-03-28
- Endpoints
- 48
- OpenAPI
- Specification ↗
- Spec updated
- 2020-05-07
Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /#X-Amz-Target=Logs_20140328.AssociateKmsKey | <p>Associates the specified KMS key with the specified log group.</p> <p>Associating a KMS key with a log group overrides any existing associations between the |
| POST | /#X-Amz-Target=Logs_20140328.CancelExportTask | <p>Cancels the specified export task.</p> <p>The task must be in the <code>PENDING</code> or <code>RUNNING</code> state.</p> |
| POST | /#X-Amz-Target=Logs_20140328.CreateExportTask | <p>Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket. When you perform a <code>CreateExportTask</code> oper |
| POST | /#X-Amz-Target=Logs_20140328.CreateLogGroup | <p>Creates a log group with the specified name. You can create up to 20,000 log groups per account.</p> <p>You must use the following guidelines when naming a l |
| POST | /#X-Amz-Target=Logs_20140328.CreateLogStream | <p>Creates a log stream for the specified log group. A log stream is a sequence of log events that originate from a single source, such as an application instan |
| POST | /#X-Amz-Target=Logs_20140328.DeleteDataProtectionPolicy | <p>Deletes the data protection policy from the specified log group. </p> <p>For more information about data protection policies, see <a href="https://docs.aws.a |
| POST | /#X-Amz-Target=Logs_20140328.DeleteDestination | Deletes the specified destination, and eventually disables all the subscription filters that publish to it. This operation does not delete the physical resource |
| POST | /#X-Amz-Target=Logs_20140328.DeleteLogGroup | Deletes the specified log group and permanently deletes all the archived log events associated with the log group. |
| POST | /#X-Amz-Target=Logs_20140328.DeleteLogStream | Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream. |
| POST | /#X-Amz-Target=Logs_20140328.DeleteMetricFilter | Deletes the specified metric filter. |
| POST | /#X-Amz-Target=Logs_20140328.DeleteQueryDefinition | <p>Deletes a saved CloudWatch Logs Insights query definition. A query definition contains details about a saved CloudWatch Logs Insights query.</p> <p>Each <cod |
| POST | /#X-Amz-Target=Logs_20140328.DeleteResourcePolicy | Deletes a resource policy from this account. This revokes the access of the identities in that policy to put log events to this account. |
| POST | /#X-Amz-Target=Logs_20140328.DeleteRetentionPolicy | <p>Deletes the specified retention policy.</p> <p>Log events do not expire if they belong to log groups without a retention policy.</p> |
| POST | /#X-Amz-Target=Logs_20140328.DeleteSubscriptionFilter | Deletes the specified subscription filter. |
| POST | /#X-Amz-Target=Logs_20140328.DescribeDestinations | Lists all your destinations. The results are ASCII-sorted by destination name. |
| POST | /#X-Amz-Target=Logs_20140328.DescribeExportTasks | Lists the specified export tasks. You can list all your export tasks or filter the results based on task ID or task status. |
| POST | /#X-Amz-Target=Logs_20140328.DescribeLogGroups | <p>Lists the specified log groups. You can list all your log groups or filter the results by prefix. The results are ASCII-sorted by log group name.</p> <p>Clou |
| POST | /#X-Amz-Target=Logs_20140328.DescribeLogStreams | <p>Lists the log streams for the specified log group. You can list all the log streams or filter the results by prefix. You can also control how the results are |
| POST | /#X-Amz-Target=Logs_20140328.DescribeMetricFilters | Lists the specified metric filters. You can list all of the metric filters or filter the results by log name, prefix, metric name, or metric namespace. The resu |
| POST | /#X-Amz-Target=Logs_20140328.DescribeQueries | Returns a list of CloudWatch Logs Insights queries that are scheduled, running, or have been run recently in this account. You can request all queries or limit |
| POST | /#X-Amz-Target=Logs_20140328.DescribeQueryDefinitions | <p>This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.</p> <p>You can use the <code>queryDefinitionNamePrefix</cod |
| POST | /#X-Amz-Target=Logs_20140328.DescribeResourcePolicies | Lists the resource policies in this account. |
| POST | /#X-Amz-Target=Logs_20140328.DescribeSubscriptionFilters | Lists the subscription filters for the specified log group. You can list all the subscription filters or filter the results by prefix. The results are ASCII-sor |
| POST | /#X-Amz-Target=Logs_20140328.DisassociateKmsKey | <p>Disassociates the associated KMS key from the specified log group.</p> <p>After the KMS key is disassociated from the log group, CloudWatch Logs stops encryp |
| POST | /#X-Amz-Target=Logs_20140328.FilterLogEvents | <p>Lists log events from the specified log group. You can list all the log events or filter the results using a filter pattern, a time range, and the name of th |
| POST | /#X-Amz-Target=Logs_20140328.GetDataProtectionPolicy | Returns information about a log group data protection policy. |
| POST | /#X-Amz-Target=Logs_20140328.GetLogEvents | <p>Lists log events from the specified log stream. You can list all of the log events or filter using a time range.</p> <p>By default, this operation returns as |
| POST | /#X-Amz-Target=Logs_20140328.GetLogGroupFields | <p>Returns a list of the fields that are included in log events in the specified log group. Includes the percentage of log events that contain each field. The s |
| POST | /#X-Amz-Target=Logs_20140328.GetLogRecord | <p>Retrieves all of the fields and values of a single log event. All fields are retrieved, even if the original query that produced the <code>logRecordPointer</ |
| POST | /#X-Amz-Target=Logs_20140328.GetQueryResults | <p>Returns the results from the specified query.</p> <p>Only the fields requested in the query are returned, along with a <code>@ptr</code> field, which is the |
| POST | /#X-Amz-Target=Logs_20140328.ListTagsForResource | Displays the tags associated with a CloudWatch Logs resource. Currently, log groups and destinations support tagging. |
| POST | /#X-Amz-Target=Logs_20140328.ListTagsLogGroupdeprecated | <important> <p>The ListTagsLogGroup operation is on the path to deprecation. We recommend that you use <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs |
| POST | /#X-Amz-Target=Logs_20140328.PutDataProtectionPolicy | <p>Creates a data protection policy for the specified log group. A data protection policy can help safeguard sensitive data that's ingested by the log group by |
| POST | /#X-Amz-Target=Logs_20140328.PutDestination | <p>Creates or updates a destination. This operation is used only to create destinations for cross-account subscriptions.</p> <p>A destination encapsulates a phy |
| POST | /#X-Amz-Target=Logs_20140328.PutDestinationPolicy | Creates or updates an access policy associated with an existing destination. An access policy is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/po |
| POST | /#X-Amz-Target=Logs_20140328.PutLogEvents | <p>Uploads a batch of log events to the specified log stream.</p> <important> <p>The sequence token is now ignored in <code>PutLogEvents</code> actions. <code>P |
| POST | /#X-Amz-Target=Logs_20140328.PutMetricFilter | <p>Creates or updates a metric filter and associates it with the specified log group. With metric filters, you can configure rules to extract metric data from l |
| POST | /#X-Amz-Target=Logs_20140328.PutQueryDefinition | <p>Creates or updates a query definition for CloudWatch Logs Insights. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/lo |
| POST | /#X-Amz-Target=Logs_20140328.PutResourcePolicy | Creates or updates a resource policy allowing other Amazon Web Services services to put log events to this account, such as Amazon Route 53. An account can have |
| POST | /#X-Amz-Target=Logs_20140328.PutRetentionPolicy | <p>Sets the retention of the specified log group. With a retention policy, you can configure the number of days for which to retain log events in the specified |
| POST | /#X-Amz-Target=Logs_20140328.PutSubscriptionFilter | <p>Creates or updates a subscription filter and associates it with the specified log group. With subscription filters, you can subscribe to a real-time stream o |
| POST | /#X-Amz-Target=Logs_20140328.StartQuery | <p>Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group and time range to query and the query string to use.</p> <p>For mo |
| POST | /#X-Amz-Target=Logs_20140328.StopQuery | Stops a CloudWatch Logs Insights query that is in progress. If the query has already ended, the operation returns an error indicating that the specified query i |
| POST | /#X-Amz-Target=Logs_20140328.TagLogGroupdeprecated | <important> <p>The TagLogGroup operation is on the path to deprecation. We recommend that you use <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/late |
| POST | /#X-Amz-Target=Logs_20140328.TagResource | <p>Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs resource. Currently, the only CloudWatch Logs resources that can be tagged are lo |
| POST | /#X-Amz-Target=Logs_20140328.TestMetricFilter | Tests the filter pattern of a metric filter against a sample of log event messages. You can use this operation to validate the correctness of a metric filter pa |
| POST | /#X-Amz-Target=Logs_20140328.UntagLogGroupdeprecated | <important> <p>The UntagLogGroup operation is on the path to deprecation. We recommend that you use <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/la |
| POST | /#X-Amz-Target=Logs_20140328.UntagResource | Removes one or more tags from the specified resource. |
Questions
Does the Amazon CloudWatch Logs API need an API key?
Yes. The Amazon CloudWatch Logs API uses API key authentication; the documentation explains how to get credentials.
Does the Amazon CloudWatch Logs API support HTTPS?
Yes, the Amazon CloudWatch Logs API is served over HTTPS.
How many endpoints does the Amazon CloudWatch Logs API have?
Its OpenAPI description lists 48 endpoints in version 2014-03-28. All of them are shown on this page.
What are alternatives to the Amazon CloudWatch Logs API?
Other Cloud Platforms APIs include Remote Settings PROD, Linode API, DigitalOcean API, Vercel API, Platform API.
Similar cloud platforms APIs
Compare alternatives →Remote Settings PROD
Cloud PlatformsFirefox is a free web browser backed by Mozilla, a non-profit dedicated to internet health and privacy.
Linode API
Cloud Platforms## Introduction The Linode API provides the ability to programmatically manage the full range of Linode products and services. This reference is designed to assist application developers and system administrators. Each endpoint includes descriptions, request syntax, and examples using standard HTTP requests. Response data is returned in JSON format. This document was generated from our OpenAPI Specification. See the <a target="_top" href="https://www.openapis.org">OpenAPI website</a> for more information. <a target="_top" href="/docs/api/openapi.yaml">Download the Linode OpenAPI Specification</a>. ## Changelog <a target="_top" href="/docs/products/tools/api/release-notes/">View our Changelog</a> to see release notes on all changes made to our API. ## Access and Authentication Some endpoints are publicly accessible without requiring authentication. All endpoints affecting your Account, however, require either a Personal Access Token or OAuth authentication (when using third-party applications). ### Personal Access Token The easiest way to access the API is with a Personal Access Token (PAT) generated from the <a target="_top" href="https://cloud.linode.com/profile/tokens">Linode Cloud Manager</a> or the [Create Personal Access Token](/docs/api/profile/#personal-access-token-create) endpoint. All scopes for the OAuth security model ([defined below](/docs/api/profile/#oauth)) apply to this security model as well. #### Authentication | Security Scheme Type: | HTTP | |-----------------------|------| | **HTTP Authorization Scheme** | bearer | ### OAuth If you only need to access the Linode API for personal use, we recommend that you create a [personal access token](/docs/api/#personal-access-token). If you're designing an application that can authenticate with an arbitrary Linode user, then you should use the OAuth 2.0 workflows presented in this section. For a more detailed example of an OAuth 2.0 implementation, see our guide on [How to Create an OAuth App with the Linode Python API Library](/docs/products/tools/api/guides/create-an-oauth-app-with-the-python-api-library/#oauth-2-authentication-exchange). Before you implement OAuth in your application, you first need to create an OAuth client. You can do this [with the Linode API](/docs/api/account/#oauth-client-create) or [via the Cloud Manager](https://cloud.linode.com/profile/clients): - When creating the client, you'll supply a `label` and a `redirect_uri` (referred to as the Callback URL in the Cloud Manager). - The response from this endpoint will give you a `client_id` and a `secret`. - Clients can be public or private, and are private by default. You can choose to make the client public when it is created. - A private client is used with applications which can securely store the client secret (that is, the secret returned to you when you first created the client). For example, an application running on a secured server that only the developer has access to would use a private OAuth client. This is also called a confidential client in some OAuth documentation. - A public client is used with applications where the client secret is not guaranteed to be secure. For example, a native app running on a user's computer may not be able to keep the client secret safe, as a user could potentially inspect the source of the application. So, native apps or apps that run in a user's browser should use a public client. - Public and private clients follow different workflows, as described below. #### OAuth Workflow The OAuth workflow is a series of exchanges between your third-party app and Linode. The workflow is used to authenticate a user before an application can start making API calls on the user's behalf. Notes: - With respect to the diagram in [section 1.2 of RFC 6749](https://tools.ietf.org/html/rfc6749#section-1.2), login.linode.com (referred to in this section as the *login server*) is the Resource Owner and the Authorization Server; api.linode.com (referred to here as the *api se
DigitalOcean API
Cloud Platforms# Introduction The DigitalOcean API allows you to manage Droplets and resources within the DigitalOcean cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the DigitalOcean control panel is also available through the API, allowing you to script the complex actions that your situation requires. The API documentation will start with a general overview about the design and technology that has been implemented, followed by reference information about specific endpoints. ## Requests Any tool that is fluent in HTTP can communicate with the API simply by requesting the correct URI. Requests should be made using the HTTPS protocol so that traffic is encrypted. The interface responds to different methods depending on the action required. |Method|Usage| |--- |--- | |GET|For simple retrieval of information about your account, Droplets, or environment, you should use the GET method. The information you request will be returned to you as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.| |DELETE|To destroy a resource and remove it from your account and environment, the DELETE method should be used. This will remove the specified object if it is found. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource's availability prior to issuing a delete command, the final state will be the same regardless of its existence.| |PUT|To update the information about a resource in your account, the PUT method is available. Like the DELETE Method, the PUT method is idempotent. It sets the state of the target using the provided values, regardless of their current values. Requests using the PUT method do not need to check the current attributes of the object.| |PATCH|Some resources support partial modification. In these cases, the PATCH method is available. Unlike PUT which generally requires a complete representation of a resource, a PATCH request is is a set of instructions on how to modify a resource updating only specific attributes.| |POST|To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object. When you wish to create a new object, send a POST request to the target endpoint.| |HEAD|Finally, to retrieve metadata information, you should use the HEAD method to get the headers. This returns only the header of what would be returned with an associated GET request. Response headers contain some useful information about your API access and the results that are available for your request. For instance, the headers contain your current rate-limit value and the amount of time available until the limit resets. It also contains metrics about the total number of objects found, pagination information, and the total content length.| ## HTTP Statuses Along with the HTTP methods that the API responds to, it will also return standard HTTP statuses, including error codes. In the event of a problem, the status will contain the error code, while the body of the response will usually contain additional information about the problem that was encountered. In general, if the status returned is in the 200 range, it indicates that the request was fulfilled successfully and that no error was encountered. Return codes in the 400 range typically indicate that there was an issue with the request that was sent. Among other things, this could mean that you did not authenticate correctly, that you are requesting an action that you do not have authorization for, that the object you are requesting does not exist, or that your request is malformed. If you receive a status in the 500 range, this generally indicates a server-side problem. This means that we are having
Vercel API
Cloud PlatformsVercel combines the best developer experience with an obsessive focus on end-user performance. Our platform enables frontend teams to do their best work.
Platform API
Cloud PlatformsThe [REST API specification](https://www.ably.io/documentation/rest-api) for Ably.
Azure Data Lake Storage
Cloud PlatformsAzure Data Lake Storage provides storage for Hadoop and other big data workloads.
Listed from APIs.guru (CC0).