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

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

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

## Request

- Base URL: `https://composer.googleapis.com`
- URL: `https://composer.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:pollAirflowCommand`
- 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`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloudcomposer.readonly`
    - 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.readonly`
- TypeScript: <https://skmtc.dev/google/apis/composer/docs/v1/projects/:projectsId/locations/:locationsId/environments/:environmentsId:pollAirflowCommand/post.ts> (a function with typed inputs; its response is checked against the schema)

Polls Airflow CLI command execution and fetches logs.

## Path parameters

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

## Request body

- PollAirflowCommandRequest: Poll Airflow Command request.
  - `executionId` string: The unique ID of the command execution.
  - `nextLineNumber` integer: Line number from which new logs should be fetched.
  - `pod` string: The name of the pod where the command is executed.
  - `podNamespace` string: The namespace of the pod where the command is executed.

## Response `200`

Successful response

- PollAirflowCommandResponse: Response to PollAirflowCommandRequest.
  - `exitInfo` ExitInfo: Information about how a command ended.
    - `error` string: Error message. Empty if there was no error.
    - `exitCode` integer: The exit code from the command execution.
  - `output` Line[]: Output from the command execution. It may not contain the full output and the caller may need to poll for more lines.
    - `content` string: Text content of the log line.
    - `lineNumber` integer: Number of the line.
  - `outputEnd` boolean: Whether the command execution has finished and there is no more output.

## 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.readonly` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloudcomposer.readonly` 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:pollAirflowCommand/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)
