<!--
{
  "documentType" : "article",
  "framework" : "AppStoreConnectAPI",
  "identifier" : "/documentation/AppStoreConnectAPI/repositories",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Repositories"
}
-->

# Repositories

Read detailed information for each repository Xcode Cloud can access, including Git references and pull requests.

## Discussion

The `scmRepositories` resource represents Git repositories Xcode Cloud can access. Use it to retrieve all repositories for a source code management provider you connected to Xcode Cloud and read:

- The name and owner of the repository
- The date when Xcode Cloud last accessed the repository
- The HTTP and SSH URLs for cloning the repository

> Note:
> This resource supports JSON web tokens with a lifetime of up to six months. For more information, see <doc://com.apple.appstoreconnectapi/documentation/AppStoreConnectAPI/generating-tokens-for-api-requests#Determine-the-Appropriate-Token-Lifetime>.

## Topics

### Getting Repository Information

[`List all git repositories`](/documentation/AppStoreConnectAPI/GET-v1-scmRepositories)

List all Git repositories Xcode Cloud can access.

[`Read git repository information`](/documentation/AppStoreConnectAPI/GET-v1-scmRepositories-_id_)

Get information about a Git repository that Xcode Cloud can access.

[`List all git references for a repository`](/documentation/AppStoreConnectAPI/GET-v1-scmRepositories-_id_-gitReferences)

List all Git references for a specific repository that Xcode Cloud can access.

[`List Git reference IDs for an SCM repository`](/documentation/AppStoreConnectAPI/GET-v1-scmRepositories-_id_-relationships-gitReferences)

[`List all pull requests for a repository`](/documentation/AppStoreConnectAPI/GET-v1-scmRepositories-_id_-pullRequests)

List all pull requests for a specific repository that Xcode Cloud can access.

[`List pull request IDs for an SCM repository`](/documentation/AppStoreConnectAPI/GET-v1-scmRepositories-_id_-relationships-pullRequests)

### Objects

[`object ScmRepository`](/documentation/AppStoreConnectAPI/ScmRepository)

A source code repository connected to Xcode Cloud, used as the source for workflow builds.

[`object ScmRepositoryResponse`](/documentation/AppStoreConnectAPI/ScmRepositoryResponse)

The response body for endpoints that read a single SCM repository connected to Xcode Cloud.

[`object ScmRepositoriesResponse`](/documentation/AppStoreConnectAPI/ScmRepositoriesResponse)

The response body for endpoints that list SCM repositories connected to Xcode Cloud.

[`object ScmRepositoryGitReferencesLinkagesResponse`](/documentation/AppStoreConnectAPI/ScmRepositoryGitReferencesLinkagesResponse)

[`object ScmRepositoryPullRequestsLinkagesResponse`](/documentation/AppStoreConnectAPI/ScmRepositoryPullRequestsLinkagesResponse)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)