---
title: "PATCH /v1/{+name}"
method: PATCH
path: "/v1/{+name}"
tags: ["projects"]
---

# PATCH /v1/{+name}

`PATCH /v1/{+name}`

Updates a backend's traffic.

## Path parameters

- `name` string, required

## Query parameters

- `requestId` string
- `updateMask` string
- `validateOnly` boolean
- `validateOnly` boolean

## Request body

- Traffic — Controls traffic configuration for the backend.
  - `uid` string — Output only. System-assigned, unique identifier.
  - `etag` string — Output only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource.
  - `name` string — Identifier. The resource name of the backend's traffic. Format: `projects/{project}/locations/{locationId}/backends/{backendId}/traffic`.
  - `current` TrafficSet — A list of traffic splits that together represent where traffic is being routed.
    - `splits` TrafficSplit[] — Required. The list of traffic splits.
      - `build` string — Required. The build that traffic is being routed to.
      - `percent` integer — Required. The percentage of traffic to send to the build. Currently must be 100% or 0%.
  - `target` TrafficSet — A list of traffic splits that together represent where traffic is being routed.
    - `splits` TrafficSplit[] — Required. The list of traffic splits.
      - `build` string — Required. The build that traffic is being routed to.
      - `percent` integer — Required. The percentage of traffic to send to the build. Currently must be 100% or 0%.
  - `labels` object — Optional. Unstructured key value map that can be used to organize and categorize objects.
  - `updateTime` string, google-datetime — Output only. Time at which the backend was last updated.
  - `annotations` object — Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.
  - `createTime` string, google-datetime — Output only. Time at which the backend was created.
  - `rolloutPolicy` RolloutPolicy — The policy for how automatic builds and rollouts are triggered and rolled out.
    - `requiredPaths` Path[] — Optional. A list of file paths patterns that trigger a build and rollout if at least one of the changed files in the commit are present in this list. This field is optional; the rollout policy will default to triggering on all paths if both ignored_paths and required_paths are not populated. Limited to 100 paths. Example: ``` required_paths: { pattern: "foo/bar/*", type: "GLOB" } ```
      - `pattern` string — Optional. The pattern to match against.
      - `type` 'PATTERN_TYPE_UNSPECIFIED' | 'RE2' | 'GLOB' | 'PREFIX' — Optional. The type of pattern to match against.
    - `codebaseBranch` string — If set, specifies a branch that triggers a new build to be started with this policy. Otherwise, no automatic rollouts will happen.
    - `disabledTime` string, google-datetime — Output only. If `disabled` is set, the time at which the automatic rollouts were disabled.
    - `ignoredPaths` Path[] — Optional. A list of file paths patterns to exclude from triggering a rollout. Patterns in this list take precedence over required_paths. **Note**: All paths must be in the ignored_paths in order for the rollout to be skipped. Limited to 100 paths. Example: ``` ignored_paths: { pattern: "foo/bar/excluded/*", type: "GLOB" } ```
      - `pattern` string — Optional. The pattern to match against.
      - `type` 'PATTERN_TYPE_UNSPECIFIED' | 'RE2' | 'GLOB' | 'PREFIX' — Optional. The type of pattern to match against.
    - `disabled` boolean — Optional. A flag that, if true, prevents automatic rollouts from being created via this RolloutPolicy.
  - `reconciling` boolean — Output only. A field that, if true, indicates that the system is working to make the backend's `current` match the requested `target` list.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/firebaseapphosting.md) · [All operations](https://skmtc.dev/google/apis/firebaseapphosting/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/firebaseapphosting/revisions/487a88f26666/schema)
