GitHub: List organization migrations
GitHub migrations.migrationsListForOrg: arguments, response, policy and SDK examples.
← Migrations operations · Get started
Operation github.migrations_list_for_org
Provider route: GET /orgs/{org}/migrations. 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["migrations"]["migrationsListForOrg"]>[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.migrations.migrationsListForOrg(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.migrations.migrations_list_for_org(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.org | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.per_page | integer | Optional | Default: 30 |
query.page | integer | Optional | Default: 1 |
query.exclude | array | Optional | |
query.exclude[] | string | Each item | Allowed values that can be passed to the exclude param. One of: repositories |
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 Start a user migration — response body |
Referenced models: Start a user migration — response body
Schemas
Section titled “Schemas”2 more schemas are linked from the tables above, on the schema pages.
Start a user migration — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A migration. |
archive_url | string | Optional | Format: uri |
created_at | string | Required within parent | Format: date-time |
exclude | array | Optional | Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. |
exclude[] | string | Each item | Allowed values that can be passed to the exclude parameter. The array can include any of: `"repositories"`. |
exclude_attachments | boolean | Required within parent | |
exclude_git_data | boolean | Required within parent | |
exclude_metadata | boolean | Required within parent | |
exclude_owner_projects | boolean | Required within parent | |
exclude_releases | boolean | Required within parent | |
guid | string | Required within parent | |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | Format: int64 |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
lock_repositories | boolean | Required within parent | |
node_id | string | Required within parent | |
org_metadata_only | boolean | Required within parent | |
owner | Model | Required within parent | Expand Get an issue — response body — user |
repositories | array | Required within parent | The repositories included in the migration. Only returned for export migrations. |
repositories[] | Model | Each item | Expand List repositories for a user migration — response body — item |
state | string | Required within parent | |
updated_at | string | Required within parent | Format: date-time |
url | string | Required within parent | Format: uri |
Referenced models: Get an issue — response body — user, List repositories for a user migration — response body — item
Get an issue — response body — user
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Get an issue — response body — user A Git Hub user |
$ (anyOf 2) | null | Alternative |
Referenced models: Get an issue — response body — user A Git Hub user
List repositories for a user migration — response body — item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A GitHub repository. |
archive_url | string | Required within parent | A template for the API URL to download the repository as an archive. |
assignees_url | string | Required within parent | A template for the API URL to list the available assignees for issues in the repository. |
blobs_url | string | Required within parent | A template for the API URL to create or retrieve a raw Git blob in the repository. |
branches_url | string | Required within parent | A template for the API URL to get information about branches in the repository. |
collaborators_url | string | Required within parent | A template for the API URL to get information about collaborators of the repository. |
comments_url | string | Required within parent | A template for the API URL to get information about comments on the repository. |
commits_url | string | Required within parent | A template for the API URL to get information about commits on the repository. |
compare_url | string | Required within parent | A template for the API URL to compare two commits or refs. |
contents_url | string | Required within parent | A template for the API URL to get the contents of the repository. |
contributors_url | string | Required within parent | A template for the API URL to list the contributors to the repository. Format: uri |
deployments_url | string | Required within parent | The API URL to list the deployments of the repository. Format: uri |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | The repository description. |
description (anyOf 2) | null | Alternative | |
downloads_url | string | Required within parent | The API URL to list the downloads on the repository. Format: uri |
events_url | string | Required within parent | The API URL to list the events of the repository. Format: uri |
fork | boolean | Required within parent | Whether the repository is a fork. |
forks_url | string | Required within parent | The API URL to list the forks of the repository. Format: uri |
full_name | string | Required within parent | The full, globally unique, name of the repository. |
git_commits_url | string | Required within parent | A template for the API URL to get information about Git commits of the repository. |
git_refs_url | string | Required within parent | A template for the API URL to get information about Git refs of the repository. |
git_tags_url | string | Required within parent | A template for the API URL to get information about Git tags of the repository. |
hooks_url | string | Required within parent | The API URL to list the hooks on the repository. Format: uri |
html_url | string | Required within parent | The URL to view the repository on GitHub.com. Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | A unique identifier of the repository. Format: int64 |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
issue_comment_url | string | Required within parent | A template for the API URL to get information about issue comments on the repository. |
issue_events_url | string | Required within parent | A template for the API URL to get information about issue events on the repository. |
issues_url | string | Required within parent | A template for the API URL to get information about issues on the repository. |
keys_url | string | Required within parent | A template for the API URL to get information about deploy keys on the repository. |
labels_url | string | Required within parent | A template for the API URL to get information about labels of the repository. |
languages_url | string | Required within parent | The API URL to get information about the languages of the repository. Format: uri |
merges_url | string | Required within parent | The API URL to merge branches in the repository. Format: uri |
milestones_url | string | Required within parent | A template for the API URL to get information about milestones of the repository. |
name | string | Required within parent | The name of the repository. |
node_id | string | Required within parent | The GraphQL identifier of the repository. |
notifications_url | string | Required within parent | A template for the API URL to get information about notifications on the repository. |
owner | Model | Required within parent | Expand List users — response body — item |
private | boolean | Required within parent | Whether the repository is private. |
pulls_url | string | Required within parent | A template for the API URL to get information about pull requests on the repository. |
releases_url | string | Required within parent | A template for the API URL to get information about releases on the repository. |
stargazers_url | string | Required within parent | The API URL to list the stargazers on the repository. Format: uri |
statuses_url | string | Required within parent | A template for the API URL to get information about statuses of a commit. |
subscribers_url | string | Required within parent | The API URL to list the subscribers on the repository. Format: uri |
subscription_url | string | Required within parent | The API URL to subscribe to notifications for this repository. Format: uri |
tags_url | string | Required within parent | The API URL to get information about tags on the repository. Format: uri |
teams_url | string | Required within parent | The API URL to list the teams on the repository. Format: uri |
trees_url | string | Required within parent | A template for the API URL to create or retrieve a raw Git tree of the repository. |
url | string | Required within parent | The URL to get more information about the repository from the GitHub API. Format: uri |
Referenced models: List users — response body — item
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: github.migrations_list_for_org. Catalog operation: migrations/list-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"}