---
title: "PATCH /v1/apps/{appsId}/services/{servicesId}"
method: PATCH
path: "/v1/apps/{appsId}/services/{servicesId}"
tags: ["apps"]
---

# PATCH /v1/apps/{appsId}/services/{servicesId}

`PATCH /v1/apps/{appsId}/services/{servicesId}`

Updates the configuration of the specified service.

## Path parameters

- `appsId` string, required
- `servicesId` string, required

## Query parameters

- `migrateTraffic` boolean
- `updateMask` string

## Request body

- Service — A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.
  - `split` TrafficSplit — Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.
    - `shardBy` 'UNSPECIFIED' | 'COOKIE' | 'IP' | 'RANDOM' — Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.
    - `allocations` object — Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.
  - `generatedCustomerMetadata` object — Additional Google Generated Customer Metadata, this field won't be provided by default and can be requested by setting the IncludeExtraData field in GetServiceRequest
  - `labels` object — A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it (e.g., versions). The labels can be used to search and group resources, and are propagated to the usage and billing reports, enabling fine-grain analysis of costs. An example of using labels is to tag resources belonging to different environments (e.g., "env=prod", "env=qa"). Label keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, dashes, and international characters. Label keys must start with a lowercase letter or an international character. Each service can have at most 32 labels.
  - `networkSettings` NetworkSettings — A NetworkSettings resource is a container for ingress settings for a version or service.
    - `ingressTrafficAllowed` 'INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED' | 'INGRESS_TRAFFIC_ALLOWED_ALL' | 'INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY' | 'INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB' — The ingress settings for version or service.
  - `name` string — Output only. Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly
  - `id` string — Output only. Relative name of the service within the application. Example: default.@OutputOnly

## Response `200`

Successful response

---

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