Google

Cloud Logging API

Writes log entries and manages your Cloud Logging configuration.

Developer tools#openapi#analytics#media

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Writes log entries and manages your Cloud Logging configuration.

Endpoints 47

v2

  • GETGets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud…/v2/:name/cmekSettingsGets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and…
  • PATCHUpdates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be…/v2/:name/cmekSettings?updateMask=stringUpdates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations.…
  • GETGets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders,…/v2/:name/settingsGets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View…
  • PATCHUpdates the settings for the given resource/v2/:name/settings?updateMask=stringUpdates the settings for the given resource. This method applies to all feature configurations for organization and folders.UpdateSettings fails when any of…

projects.exclusions

  • GETLists all the exclusions on the _Default sink in a parent resource./v2/:parent/exclusions?pageSize=0&pageToken=stringLists all the exclusions on the _Default sink in a parent resource.
  • POSTCreates a new exclusion in the _Default sink in a specified parent resource/v2/:parent/exclusionsCreates 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…

projects.locations.savedQueries

  • GETReturns all data associated with the requested query./v2/:nameReturns all data associated with the requested query.
  • DELETEDeletes an existing SavedQuery that was created by the user making the request./v2/:nameDeletes an existing SavedQuery that was created by the user making the request.
  • PATCHUpdates an existing SavedQuery./v2/:name?updateMask=stringUpdates an existing SavedQuery.
  • GETLists the SavedQueries that were created by the user making the request./v2/:parent/savedQueries?filter=string&pageSize=0&pageToken=stringLists the SavedQueries that were created by the user making the request.
  • POSTCreates a new SavedQuery for the user making the request./v2/:parent/savedQueries?savedQueryId=stringCreates a new SavedQuery for the user making the request.

projects.locations

  • GETLists information about the supported locations for this service.This method lists locations based on the resource…/v2/:name/locations?extraLocationTypes=string&filter=string&pageSize=0&pageToken=stringLists information about the supported locations for this service.This method lists locations based on the resource scope provided in the…

projects.locations.buckets

  • GETLists log buckets./v2/:parent/buckets?pageSize=0&pageToken=stringLists log buckets.
  • POSTCreates a log bucket that can be used to store log entries/v2/:parent/buckets?bucketId=stringCreates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
  • POSTCreates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the…/v2/:parent/buckets:createAsync?bucketId=stringCreates 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.
  • POSTUndeletes a log bucket/v2/:name:undeleteUndeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
  • POSTUpdates a log bucket asynchronously.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION…/v2/:name:updateAsync?updateMask=stringUpdates 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…

projects.locations.buckets.links

  • GETLists links./v2/:parent/links?pageSize=0&pageToken=stringLists links.
  • POSTAsynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in…/v2/:parent/links?linkId=stringAsynchronously 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…

projects.locations.buckets.views

  • GETLists views on a log bucket./v2/:parent/views?pageSize=0&pageToken=stringLists views on a log bucket.
  • POSTCreates a view over log entries in a log bucket/v2/:parent/views?viewId=stringCreates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.
  • POSTGets the access control policy for a resource/v2/:resource:getIamPolicyGets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
  • POSTSets the access control policy on the specified resource/v2/:resource:setIamPolicySets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
  • POSTReturns permissions that a caller has on the specified resource/v2/:resource:testIamPermissionsReturns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND…

projects.logs

  • GETLists the logs in projects, organizations, folders, or billing accounts/v2/:parent/logs?pageSize=0&pageToken=string&resourceNames=stringLists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.
  • DELETEDeletes all the log entries in a log for the global _Default Log Bucket/v2/:logNameDeletes all the log entries in a log for the global _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the…

projects.locations.operations

  • POSTStarts asynchronous cancellation on a long-running operation/v2/:name:cancelStarts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the…
  • GETLists operations that match the specified filter in the request/v2/:name/operations?filter=string&pageSize=0&pageToken=string&returnPartialSuccess=trueLists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

projects.locations.recentQueries

  • GETLists the RecentQueries that were created by the user making the request./v2/:parent/recentQueries?filter=string&pageSize=0&pageToken=stringLists the RecentQueries that were created by the user making the request.

sinks

  • GETLists sinks./v2/:parent/sinks?filter=string&pageSize=0&pageToken=stringLists sinks.
  • POSTCreates a sink that exports specified log entries to a destination/v2/:parent/sinks?customWriterIdentity=string&uniqueWriterIdentity=trueCreates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to…
  • GETGets a sink./v2/:sinkNameGets a sink.
  • PUTUpdates a sink/v2/:sinkName?customWriterIdentity=string&uniqueWriterIdentity=true&updateMask=stringUpdates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The…
  • DELETEDeletes a sink/v2/:sinkNameDeletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.

projects.sinks

  • PATCHUpdates a sink/v2/:sinkName?customWriterIdentity=string&uniqueWriterIdentity=true&updateMask=stringUpdates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The…

entries

  • POSTCopies a set of log entries from a log bucket to a Cloud Storage bucket./v2/entries:copyCopies a set of log entries from a log bucket to a Cloud Storage bucket.
  • POSTLists log entries/v2/entries:listLists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries,…
  • POSTStreaming read of log entries as they are received/v2/entries:tailStreaming read of log entries as they are received. Until the stream is terminated, it will continue reading logs.
  • POSTWrites log entries to Logging/v2/entries:writeWrites 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…

projects.locations.logScopes

  • GETLists log scopes./v2/:parent/logScopes?pageSize=0&pageToken=stringLists log scopes.
  • POSTCreates a log scope./v2/:parent/logScopes?logScopeId=stringCreates a log scope.

monitoredResourceDescriptors

  • GETLists the descriptors for monitored resource types used by Logging./v2/monitoredResourceDescriptors?pageSize=0&pageToken=stringLists the descriptors for monitored resource types used by Logging.

projects.metrics

  • GETLists logs-based metrics./v2/:parent/metrics?pageSize=0&pageToken=stringLists logs-based metrics.
  • POSTCreates a logs-based metric./v2/:parent/metricsCreates a logs-based metric.
  • GETGets a logs-based metric./v2/:metricNameGets a logs-based metric.
  • PUTCreates or updates a logs-based metric./v2/:metricNameCreates or updates a logs-based metric.
  • DELETEDeletes a logs-based metric./v2/:metricNameDeletes a logs-based metric.

API details

Base URL
https://logging.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 5 scopes
An API key in the key query parameter
Operations
47 operations on 30 pathsPOST 19GET 18PATCH 4DELETE 4PUT 2
Main resources
projects.locations.buckets 5projects.locations.buckets.views 5projects.locations.savedQueries 5projects.metrics 5sinks 5entries 4v2 4projects.exclusions 2projects.locations.buckets.links 2projects.locations.logScopes 2
Response formats
application/json
Description format
Google API Discovery, API version v2

How to test the Cloud Logging API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Cloud Logging API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 5 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud…” (GET /v2/:name/cmekSettings), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Cloud Logging API?

Writes log entries and manages your Cloud Logging configuration. It is listed under Developer tools and has 47 endpoints.

Who publishes the Cloud Logging API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Cloud Logging API?

Requests go to https://logging.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Cloud Logging API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 5 scopes; an API key in the key query parameter.

How many endpoints does the Cloud Logging API have?

47 operations on 30 paths (19 POST, 18 GET, 4 PATCH, 4 DELETE, 2 PUT). The largest groups are projects.locations.buckets, projects.locations.buckets.views, projects.locations.savedQueries, projects.metrics.

Is forking the Cloud Logging API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.