---
title: "UpdateService"
method: POST
path: "/gitpod.v1.EnvironmentAutomationService/UpdateService"
tags: ["gitpod.v1.EnvironmentAutomationService"]
---

# UpdateService

`POST /gitpod.v1.EnvironmentAutomationService/UpdateService`

Updates an automation service configuration.

 Use this method to:
 - Modify service commands
 - Update triggers
 - Change runtime settings
 - Adjust dependencies

 ### Examples

 - Update commands:

   Changes service start and ready commands.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   spec:
     commands:
       start: "npm run start:dev"
       ready: "curl -s http://localhost:8080"
   ```

 - Update triggers:

   Modifies when the service starts.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   metadata:
     triggeredBy:
       trigger:
         - postDevcontainerStart: true
         - manual: true
   ```

## Request body

- GitpodV1UpdateServiceRequest
  - `id` string, uuid
  - `metadata` GitpodV1UpdateServiceRequestServiceMetadata
    - `description` string, nullable
    - `name` string, nullable
    - `triggeredBy` GitpodV1UpdateServiceRequestAutomationTriggerUpdate — unresolved $ref
  - `spec` GitpodV1UpdateServiceRequestServiceSpec
    - `commands` GitpodV1UpdateServiceRequestServiceSpecCommands
      - `ready` string, nullable
      - `start` string, nullable
      - `stop` string, nullable
    - `runsOn` GitpodV1RunsOn
      - `docker` GitpodV1RunsOnDocker, required
        - `environment` string[]
        - `image` string
  - `status` GitpodV1UpdateServiceRequestServiceStatus
    - `failureMessage` string, nullable
    - `logUrl` string, nullable
    - `phase` 'SERVICE_PHASE_UNSPECIFIED' | 'SERVICE_PHASE_STARTING' | 'SERVICE_PHASE_RUNNING' | 'SERVICE_PHASE_STOPPING' | 'SERVICE_PHASE_STOPPED' | 'SERVICE_PHASE_FAILED' | 'SERVICE_PHASE_DELETED'
    - `session` string, nullable

## Response `200`

Success

- GitpodV1UpdateServiceResponse

## Other responses

- `default` — Error

## Changes

- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.EnvironmentAutomationService/UpdateService/post.md)

---

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