---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:executeAirflowCommand"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:executeAirflowCommand"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:executeAirflowCommand

`POST /v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:executeAirflowCommand`

## Request

- Base URL: `https://composer.googleapis.com`
- URL: `https://composer.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:executeAirflowCommand`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloudcomposer`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloudcomposer`
- TypeScript: <https://skmtc.dev/google/apis/composer/docs/v1/projects/:projectsId/locations/:locationsId/environments/:environmentsId:executeAirflowCommand/post.ts> (a function with typed inputs; its response is checked against the schema)

Executes Airflow CLI command.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `environmentsId` string, required

## Request body

- ExecuteAirflowCommandRequest: Execute Airflow Command request.
  - `command` string: Airflow command.
  - `parameters` string[]: Parameters for the Airflow command/subcommand as an array of arguments. It may contain positional arguments like `["my-dag-id"]`, key-value parameters like `["--foo=bar"]` or `["--foo","bar"]`, or other flags like `["-f"]`.
  - `subcommand` string: Airflow subcommand.

## Response `200`

Successful response

- ExecuteAirflowCommandResponse: Response to ExecuteAirflowCommandRequest.
  - `error` string: Error message. Empty if there was no error.
  - `executionId` string: The unique ID of the command execution for polling.
  - `pod` string: The name of the pod where the command is executed.
  - `podNamespace` string: The namespace of the pod where the command is executed.

## Changes

- **2026-11-07** `9c23b974ddbb`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloudcomposer` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloudcomposer` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/composer/changes/v1/projects/:projectsId/locations/:locationsId/environments/:environmentsId:executeAirflowCommand/post.md)

---

[API](https://skmtc.dev/google/apis/composer.md) - [All operations](https://skmtc.dev/google/apis/composer/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/composer/revisions/9c23b974ddbb?raw)
