Open documentation ↗Overview
Writes log entries and manages your Cloud Logging configuration.
Cloud Logging API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 39 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Analytics
- Base URL
https://logging.googleapis.com/- Version
- v2
- Endpoints
- 39
- OpenAPI
- Specification ↗
- Spec updated
- 2023-04-21
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://logging.googleapis.com/v2/monitoredResourceDescriptors" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://logging.googleapis.com/v2/monitoredResourceDescriptors", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://logging.googleapis.com/v2/monitoredResourceDescriptors",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /v2/entries:copy | Copies a set of log entries from a log bucket to a Cloud Storage bucket. |
| POST | /v2/entries:list | Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, s |
| POST | /v2/entries:tail | Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs. |
| POST | /v2/entries:write | Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent |
| GET | /v2/monitoredResourceDescriptors | Lists the descriptors for monitored resource types used by Logging. |
| DELETE | /v2/{logName} | Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete op |
| GET | /v2/{metricName} | Gets a logs-based metric. |
| PUT | /v2/{metricName} | Creates or updates a logs-based metric. |
| DELETE | /v2/{metricName} | Deletes a logs-based metric. |
| GET | /v2/{name} | Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. |
| PATCH | /v2/{name} | Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is |
| DELETE | /v2/{name} | Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, |
| GET | /v2/{name}/cmekSettings | Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and bill |
| PATCH | /v2/{name}/cmekSettings | Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once |
| GET | /v2/{name}/locations | Lists information about the supported locations for this service. |
| GET | /v2/{name}/operations | Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. |
| GET | /v2/{name}/settings | Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing a |
| PATCH | /v2/{name}/settings | Updates the Log Router settings for the given resource.Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once c |
| POST | /v2/{name}:cancel | Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the serv |
| POST | /v2/{name}:undelete | Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. |
| POST | /v2/{name}:updateAsync | Updates a log bucket asynchronously.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been c |
| GET | /v2/{parent}/buckets | Lists log buckets. |
| POST | /v2/{parent}/buckets | Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. |
| POST | /v2/{parent}/buckets:createAsync | Creates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the bucket's location cannot be changed. |
| GET | /v2/{parent}/exclusions | Lists all the exclusions on the _Default sink in a parent resource. |
| POST | /v2/{parent}/exclusions | Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 |
| GET | /v2/{parent}/links | Lists links. |
| POST | /v2/{parent}/links | Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currentl |
| GET | /v2/{parent}/logs | Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. |
| GET | /v2/{parent}/metrics | Lists logs-based metrics. |
| POST | /v2/{parent}/metrics | Creates a logs-based metric. |
| GET | /v2/{parent}/sinks | Lists sinks. |
| POST | /v2/{parent}/sinks | Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identi |
| GET | /v2/{parent}/views | Lists views on a log bucket. |
| POST | /v2/{parent}/views | Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. |
| GET | /v2/{sinkName} | Gets a sink. |
| PUT | /v2/{sinkName} | Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might als |
| PATCH | /v2/{sinkName} | Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might als |
| DELETE | /v2/{sinkName} | Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. |
Questions
Does the Cloud Logging API API need an API key?
Yes. The Cloud Logging API API uses OAuth authentication; the documentation explains how to get credentials.
Does the Cloud Logging API API support HTTPS?
Yes, the Cloud Logging API API is served over HTTPS.
How many endpoints does the Cloud Logging API API have?
Its OpenAPI description lists 39 endpoints in version v2. All of them are shown on this page.
What are alternatives to the Cloud Logging API API?
Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.
Similar analytics APIs
Compare alternatives →Google Play Integrity API
AnalyticsThe Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.
versionhistory.googleapis.com API
AnalyticsVersion History API - Prod
Doc Converter
AnalyticsThis api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)
Perspective Comment Analyzer API
AnalyticsThe Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.
Safe Browsing API
AnalyticsEnables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
Web Fonts Developer API
AnalyticsThe Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.
Listed from APIs.guru (CC0).