Skip to content

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.

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 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.migrations.migrations_list_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.orgstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.per_pageintegerOptionalDefault: 30
query.pageintegerOptionalDefault: 1
query.excludearrayOptional
query.exclude[]stringEach itemAllowed values that can be passed to the exclude param.
One of: repositories

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 Start a user migration — response body

Referenced models: Start a user migration — response body

2 more schemas are linked from the tables above, on the schema pages.

Start a user migration — response body
FieldTypePresenceDescription and constraints
$objectRootA migration.
archive_urlstringOptionalFormat: uri
created_atstringRequired within parentFormat: date-time
excludearrayOptionalExclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`.
exclude[]stringEach itemAllowed values that can be passed to the exclude parameter. The array can include any of: `"repositories"`.
exclude_attachmentsbooleanRequired within parent
exclude_git_databooleanRequired within parent
exclude_metadatabooleanRequired within parent
exclude_owner_projectsbooleanRequired within parent
exclude_releasesbooleanRequired within parent
guidstringRequired within parent
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
lock_repositoriesbooleanRequired within parent
node_idstringRequired within parent
org_metadata_onlybooleanRequired within parent
ownerModelRequired within parentExpand Get an issue — response body — user
repositoriesarrayRequired within parentThe repositories included in the migration. Only returned for export migrations.
repositories[]ModelEach itemExpand List repositories for a user migration — response body — item
statestringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Referenced models: Get an issue — response body — user, List repositories for a user migration — response body — item

Get an issue — response body — user
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Get an issue — response body — user A Git Hub user
$ (anyOf 2)nullAlternative

Referenced models: Get an issue — response body — user A Git Hub user

List repositories for a user migration — response body — item
FieldTypePresenceDescription and constraints
$objectRootA GitHub repository.
archive_urlstringRequired within parentA template for the API URL to download the repository as an archive.
assignees_urlstringRequired within parentA template for the API URL to list the available assignees for issues in the repository.
blobs_urlstringRequired within parentA template for the API URL to create or retrieve a raw Git blob in the repository.
branches_urlstringRequired within parentA template for the API URL to get information about branches in the repository.
collaborators_urlstringRequired within parentA template for the API URL to get information about collaborators of the repository.
comments_urlstringRequired within parentA template for the API URL to get information about comments on the repository.
commits_urlstringRequired within parentA template for the API URL to get information about commits on the repository.
compare_urlstringRequired within parentA template for the API URL to compare two commits or refs.
contents_urlstringRequired within parentA template for the API URL to get the contents of the repository.
contributors_urlstringRequired within parentA template for the API URL to list the contributors to the repository.
Format: uri
deployments_urlstringRequired within parentThe API URL to list the deployments of the repository.
Format: uri
descriptionJSONRequired within parent
description (anyOf 1)stringAlternativeThe repository description.
description (anyOf 2)nullAlternative
downloads_urlstringRequired within parentThe API URL to list the downloads on the repository.
Format: uri
events_urlstringRequired within parentThe API URL to list the events of the repository.
Format: uri
forkbooleanRequired within parentWhether the repository is a fork.
forks_urlstringRequired within parentThe API URL to list the forks of the repository.
Format: uri
full_namestringRequired within parentThe full, globally unique, name of the repository.
git_commits_urlstringRequired within parentA template for the API URL to get information about Git commits of the repository.
git_refs_urlstringRequired within parentA template for the API URL to get information about Git refs of the repository.
git_tags_urlstringRequired within parentA template for the API URL to get information about Git tags of the repository.
hooks_urlstringRequired within parentThe API URL to list the hooks on the repository.
Format: uri
html_urlstringRequired within parentThe URL to view the repository on GitHub.com.
Format: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeA unique identifier of the repository.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
issue_comment_urlstringRequired within parentA template for the API URL to get information about issue comments on the repository.
issue_events_urlstringRequired within parentA template for the API URL to get information about issue events on the repository.
issues_urlstringRequired within parentA template for the API URL to get information about issues on the repository.
keys_urlstringRequired within parentA template for the API URL to get information about deploy keys on the repository.
labels_urlstringRequired within parentA template for the API URL to get information about labels of the repository.
languages_urlstringRequired within parentThe API URL to get information about the languages of the repository.
Format: uri
merges_urlstringRequired within parentThe API URL to merge branches in the repository.
Format: uri
milestones_urlstringRequired within parentA template for the API URL to get information about milestones of the repository.
namestringRequired within parentThe name of the repository.
node_idstringRequired within parentThe GraphQL identifier of the repository.
notifications_urlstringRequired within parentA template for the API URL to get information about notifications on the repository.
ownerModelRequired within parentExpand List users — response body — item
privatebooleanRequired within parentWhether the repository is private.
pulls_urlstringRequired within parentA template for the API URL to get information about pull requests on the repository.
releases_urlstringRequired within parentA template for the API URL to get information about releases on the repository.
stargazers_urlstringRequired within parentThe API URL to list the stargazers on the repository.
Format: uri
statuses_urlstringRequired within parentA template for the API URL to get information about statuses of a commit.
subscribers_urlstringRequired within parentThe API URL to list the subscribers on the repository.
Format: uri
subscription_urlstringRequired within parentThe API URL to subscribe to notifications for this repository.
Format: uri
tags_urlstringRequired within parentThe API URL to get information about tags on the repository.
Format: uri
teams_urlstringRequired within parentThe API URL to list the teams on the repository.
Format: uri
trees_urlstringRequired within parentA template for the API URL to create or retrieve a raw Git tree of the repository.
urlstringRequired within parentThe URL to get more information about the repository from the GitHub API.
Format: uri

Referenced models: List users — response body — item

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"}

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.