Google Cloud Logging Exclusions API

The Exclusions API from Google Cloud Logging — 1 operation(s) for exclusions.

GitHub OpenAPI

Operations 5

GET /v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId} Get exclusions #
PATCH /v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId} Patch exclusions #
DELETE /v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId} Delete exclusions #
GET /v2/{v2Id}/{v2Id1}/exclusions List exclusions #
POST /v2/{v2Id}/{v2Id1}/exclusions Create exclusions #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-cloud-logging:google-cloud-logging-exclusions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-cloud-logging-exclusions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloud Logging Exclusions API
  version: v2
  description: Generated from Google's published Discovery document for Cloud Logging API (logging v2, revision 20261106). 5 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://logging.googleapis.com
tags:
- name: Exclusions
paths:
  /v2/{v2Id}/{v2Id1}/exclusions/{exclusionsId}:
    get:
      operationId: logging.exclusions.get
      summary: Get exclusions
      description: Gets the description of an exclusion in the _Default sink.
      parameters:
      - name: v2Id
        in: path
        required: true
        description: Resource name segment (v2Id).
        schema:
          type: string
      - name: v2Id1
        in: path
        required: true
        description: Resource name segment (v2Id1).
        schema:
          type: string
      - name: exclusionsId
        in: path
        required: true
        description: Resource name segment (exclusionsId).
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogExclusion'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/cloud-platform.read-only
        - https://www.googleapis.com/auth/logging.admin
        - https://www.googleapis.com/auth/logging.read
      - apiKey: []
      tags:
      - Exclusions
    patch:
      operationId: logging.exclusions.patch
      summary: Patch exclusions
      description: Changes one or more properties of an existing exclusion in the _Default sink.
      parameters:
      - name: v2Id
        in: path
        required: true
        description: Resource name segment (v2Id).
        schema:
          type: string
      - name: v2Id1
        in: path
        required: true
        description: Resource name segment (v2Id1).
        schema:
          type: string
      - name: exclusionsId
        in: path
        required: true
        description: Resource name segment (exclusionsId).
        schema:
          type: string
      - name: updateMask
        in: query
        required: false
        description: Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of "filter,description".
        schema:
          format: google-fieldmask
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogExclusion'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogExclusion'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/logging.admin
      - apiKey: []
      tags:
      - Exclusions
    delete:
      operationId: logging.exclusions.delete
      summary: Delete exclusions
      description: Deletes an exclusion in the _Default sink.
      parameters:
      - name: v2Id
        in: path
        required: true
        description: Resource name segment (v2Id).
        schema:
          type: string
      - name: v2Id1
        in: path
        required: true
        description: Resource name segment (v2Id1).
        schema:
          type: string
      - name: exclusionsId
        in: path
        required: true
        description: Resource name segment (exclusionsId).
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/logging.admin
      - apiKey: []
      tags:
      - Exclusions
  /v2/{v2Id}/{v2Id1}/exclusions:
    get:
      operationId: logging.exclusions.list
      summary: List exclusions
      description: Lists all the exclusions on the _Default sink in a parent resource.
      parameters:
      - name: v2Id
        in: path
        required: true
        description: Resource name segment (v2Id).
        schema:
          type: string
      - name: v2Id1
        in: path
        required: true
        description: Resource name segment (v2Id1).
        schema:
          type: string
      - name: pageSize
        in: query
        required: false
        description: Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.
        schema:
          format: int32
          type: integer
      - name: pageToken
        in: query
        required: false
        description: Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListExclusionsResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/cloud-platform.read-only
        - https://www.googleapis.com/auth/logging.admin
        - https://www.googleapis.com/auth/logging.read
      - apiKey: []
      tags:
      - Exclusions
    post:
      operationId: logging.exclusions.create
      summary: Create exclusions
      description: 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 exclusions in a resource.
      parameters:
      - name: v2Id
        in: path
        required: true
        description: Resource name segment (v2Id).
        schema:
          type: string
      - name: v2Id1
        in: path
        required: true
        description: Resource name segment (v2Id1).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogExclusion'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogExclusion'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/logging.admin
      - apiKey: []
      tags:
      - Exclusions
components:
  schemas:
    Empty:
      properties: {}
      type: object
      description: 'A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } '
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    ListExclusionsResponse:
      type: object
      properties:
        exclusions:
          type: array
          description: A list of exclusions.
          items:
            $ref: '#/components/schemas/LogExclusion'
        nextPageToken:
          type: string
          description: If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.
      description: Result returned from ListExclusions.
    LogExclusion:
      type: object
      properties:
        filter:
          description: Required. An advanced logs filter (https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression) that matches the log entries to be excluded. By using the sample function (https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)
          type: string
        updateTime:
          type: string
          description: Output only. The last update timestamp of the exclusion.This field may not be present for older exclusions.
          format: google-datetime
          readOnly: true
        disabled:
          type: boolean
          description: Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.
        name:
          type: string
          description: Optional. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.
        createTime:
          format: google-datetime
          type: string
          readOnly: true
          description: Output only. The creation timestamp of the exclusion.This field may not be present for older exclusions.
        description:
          description: Optional. A description of this exclusion.
          type: string
      description: Specifies a set of log entries that are filtered out by a sink. If your Google Cloud resource receives a large volume of log entries, you can use exclusions to reduce your chargeable logs. Note that exclusions on organization-level and folder-level sinks don't apply to child resources. Note also that you cannot modify the _Required sink or exclude logs from it.
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/cloud-platform: See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
            https://www.googleapis.com/auth/logging.admin: Administrate log data for your projects
            https://www.googleapis.com/auth/logging.read: View log data for your projects
            https://www.googleapis.com/auth/cloud-platform.read-only: View your data across Google Cloud services and see the email address of your Google Account
            https://www.googleapis.com/auth/logging.write: Submit log data for your projects
externalDocs:
  url: https://cloud.google.com/logging/docs/
x-provenance:
  method: harvested
  publisher: Google
  source: https://logging.googleapis.com/$discovery/rest?version=v2
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261106)