GitHub: List project fields for user
GitHub projects.projectsListFieldsForUser: arguments, response, policy and SDK examples.
← Projects operations · Get started
Operation github.projects_list_fields_for_user
Provider route: GET /users/{username}/projectsV2/{project_number}/fields. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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"]["projectsListFieldsForUser"]>[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.projectsListFieldsForUser(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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_user(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.project_number | integer | Required within parent | |
path.username | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.per_page | integer | Optional | Default: 30 |
query.before | string | Optional | |
query.after | string | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | array | Root | |
$[] | Model | Each item | Expand Get project field for user — response body |
Referenced models: Get project field for user — response body
Schemas
Section titled “Schemas”Get project field for user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A field inside a projects v2 project |
configuration | object | Optional | Configuration for iteration fields. |
configuration.duration | JSON | Optional | |
configuration.duration (anyOf 1) | integer | Alternative | The duration of the iteration in days. |
configuration.duration (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
configuration.iterations | array | Optional | |
configuration.iterations[] | Model | Each item | Expand Get project field for user — response body — configuration iterations item |
configuration.start_day | JSON | Optional | |
configuration.start_day (anyOf 1) | integer | Alternative | The day of the week when the iteration starts. |
configuration.start_day (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
created_at | string | Required within parent | The time when the field was created. Format: date-time |
data_type | string | Required within parent | The 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 |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | The unique identifier of the field. |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
issue_field_id | JSON | Optional | |
issue_field_id (anyOf 1) | integer | Alternative | The ID of the issue field. |
issue_field_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Required within parent | The name of the field. |
node_id | string | Optional | The node ID of the field. |
options | array | Optional | The options available for single select fields. |
options[] | Model | Each item | Expand Get project field for user — response body — options item |
project_url | string | Required within parent | The API URL of the project that contains the field. |
updated_at | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An iteration setting for an iteration field |
completed | boolean | Required within parent | Whether the iteration has been completed. |
duration | JSON | Required within parent | |
duration (anyOf 1) | integer | Alternative | The duration of the iteration in days. |
duration (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id | string | Required within parent | The unique identifier of the iteration setting. |
start_date | string | Required within parent | The start date of the iteration. Format: date |
title | object | Required within parent | The iteration title, in raw text and HTML formats. |
title.html | string | Required within parent | |
title.raw | string | Required within parent |
Get project field for user — response body — options item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An option for a single select field |
color | string | Required within parent | The color associated with the option. |
description | object | Required within parent | The description of the option, in raw text and HTML formats. |
description.html | string | Required within parent | |
description.raw | string | Required within parent | |
id | string | Required within parent | The unique identifier of the option. |
name | object | Required within parent | The display name of the option, in raw text and HTML formats. |
name.html | string | Required within parent | |
name.raw | string | Required within parent |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: github.projects_list_fields_for_user. Catalog operation: projects/list-fields-for-user. 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"}