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

# UpsertAutomationsFile

`POST /gitpod.v1.EnvironmentAutomationService/UpsertAutomationsFile`

UpsertAutomationsFile upserts the automations file for the given environment.

## Request body

- GitpodV1UpsertAutomationsFileRequest
  - `automationsFile` GitpodV1AutomationsFile — WARN: Do not remove any field here, as it will break reading automation yaml files. We error if there are any unknown fields in the yaml (to ensure the yaml is correct), but would break if we removed any fields. This includes marking a field as "reserved" in the proto file, this will also break reading the yaml.
    - `services` object
    - `tasks` object
  - `environmentId` string, uuid

## Response `200`

Success

- GitpodV1UpsertAutomationsFileResponse
  - `updatedServiceIds` string[]
  - `updatedTaskIds` string[]

## Other responses

- `default` — Error

---

[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/27f7bd641de1/schema)
