Skip to content

GitHub: List project fields for organization

GitHub projects.projectsListFieldsForOrg: arguments, response, policy and SDK examples.

← Projects operations · Get started

Operation github.projects_list_fields_for_org

Provider route: GET /orgs/{org}/projectsV2/{project_number}/fields. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["projects"]["projectsListFieldsForOrg"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.projects.projectsListFieldsForOrg(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_github import GitHubIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.projects.projects_list_fields_for_org(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.project_numberintegerRequired within parent
path.orgstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.per_pageintegerOptionalDefault: 30
query.beforestringOptional
query.afterstringOptional

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$arrayRoot
$[]ModelEach itemExpand Get project field for user — response body

Referenced models: Get project field for user — response body

Get project field for user — response body
FieldTypePresenceDescription and constraints
$objectRootA field inside a projects v2 project
configurationobjectOptionalConfiguration for iteration fields.
configuration.durationJSONOptional
configuration.duration (anyOf 1)integerAlternativeThe duration of the iteration in days.
configuration.duration (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
configuration.iterationsarrayOptional
configuration.iterations[]ModelEach itemExpand Get project field for user — response body — configuration iterations item
configuration.start_dayJSONOptional
configuration.start_day (anyOf 1)integerAlternativeThe day of the week when the iteration starts.
configuration.start_day (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
created_atstringRequired within parentThe time when the field was created.
Format: date-time
data_typestringRequired within parentThe field's data type.
Known values: assignees, linked_pull_requests, reviewers, labels, milestone, repository, title, text, single_select, number, date, iteration, issue_type, parent_issue, sub_issues_progress
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe unique identifier of the field.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
issue_field_idJSONOptional
issue_field_id (anyOf 1)integerAlternativeThe ID of the issue field.
issue_field_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the field.
node_idstringOptionalThe node ID of the field.
optionsarrayOptionalThe options available for single select fields.
options[]ModelEach itemExpand Get project field for user — response body — options item
project_urlstringRequired within parentThe API URL of the project that contains the field.
updated_atstringRequired within parentThe time when the field was last updated.
Format: date-time

Referenced models: Get project field for user — response body — configuration iterations item, Get project field for user — response body — options item

Get project field for user — response body — configuration iterations item
FieldTypePresenceDescription and constraints
$objectRootAn iteration setting for an iteration field
completedbooleanRequired within parentWhether the iteration has been completed.
durationJSONRequired within parent
duration (anyOf 1)integerAlternativeThe duration of the iteration in days.
duration (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
idstringRequired within parentThe unique identifier of the iteration setting.
start_datestringRequired within parentThe start date of the iteration.
Format: date
titleobjectRequired within parentThe iteration title, in raw text and HTML formats.
title.htmlstringRequired within parent
title.rawstringRequired within parent
Get project field for user — response body — options item
FieldTypePresenceDescription and constraints
$objectRootAn option for a single select field
colorstringRequired within parentThe color associated with the option.
descriptionobjectRequired within parentThe description of the option, in raw text and HTML formats.
description.htmlstringRequired within parent
description.rawstringRequired within parent
idstringRequired within parentThe unique identifier of the option.
nameobjectRequired within parentThe display name of the option, in raw text and HTML formats.
name.htmlstringRequired within parent
name.rawstringRequired within parent

SDK function policy ID: github.projects_list_fields_for_org. Catalog operation: projects/list-fields-for-org. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.