PROJECT_NUMBER pelo número do projeto Google Cloud
da instância. Para informações sobre como identificar projetos, consulte
Identificar projetos.
LOCATION com a região da instância.
A guia Meus repositórios mostra todos os repositórios a que você tem acesso.
API
Para listar detalhes de todos os repositórios em uma determinada região da sua instância, use
o seguinte método HTTP e URL.
Antes de usar os dados da solicitação abaixo, faça as substituições a seguir:
PROJECT_ID: o ID do projeto do Google Cloud em que o Secure Source Manager está sendo executado.
INSTANCE_ID: o ID da instância
LOCATION: a região em que a instância está localizada. Para informações sobre os locais compatíveis, consulte Locais.
Método HTTP e URL:
GET https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories?instance=projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID
Para enviar a solicitação, expanda uma destas opções:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-02 UTC."],[],[],null,["# List and view repositories\n\nThis document outlines how to search for and view Secure Source Manager\nrepositories by full or partial repository ID.\n\nRequired roles\n--------------\n\n\nTo get the permissions that\nyou need to search repositories,\n\nask your administrator to grant you the\nfollowing IAM roles:\n\n- [Secure Source Manager Instance Accessor](/iam/docs/roles-permissions/securesourcemanager#securesourcemanager.instanceAccessor) (`roles/securesourcemanager.instanceAccessor`) on the Secure Source Manager instance\n- [Secure Source Manager Repo Reader](/iam/docs/roles-permissions/securesourcemanager#securesourcemanager.repoReader) (`roles/securesourcemanager.repoReader`) on repositories that you want to search for\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n| **Note:** [IAM basic\n| roles](/iam/docs/roles-overview#basic) might also contain permissions to search repositories. You shouldn't grant basic roles in a production environment, but you can grant them in a development or test environment.\n\nFor information on granting Secure Source Manager roles,\nsee [Access control with IAM](/secure-source-manager/docs/access-control) and\n[Grant users instance access](/secure-source-manager/docs/grant-users-instance-access).\n\nList repositories\n-----------------\n\n### web interface\n\nTo access the Secure Source Manager instance through its web interface, copy the following URL\ninto your browser address bar.\n\n\n \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e-\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e.\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e.sourcemanager.dev\n\n\u003cbr /\u003e\n\n\nReplace the following:\n\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e with the instance name.\n- \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e with the instance's Google Cloud project number. For information on identifying projects, see [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects).\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e with the instance's region.\n\n\u003cbr /\u003e\n\nThe **My repositories** tab displays all repositories you have access to\nview.\n\n### API\n\nTo list details for all repositories in a given region for your instance, use\nthe following HTTP method and URL.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the [project ID](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) of the Google Cloud project where Secure Source Manager is running.\n- \u003cvar class=\"edit\" scope=\"INSTANCE_ID\" translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e: the instance ID.\n- \u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e: the region where your instance is located. For information on supported locations, see [Locations](https://cloud.google.com/secure-source-manager/docs/locations).\n\n\nHTTP method and URL:\n\n```\nGET https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories?instance=projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n \"https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories?instance=projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method GET `\n -Headers $headers `\n -Uri \"https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories?instance=projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"repositories\" : [\n {\n \"createTime\" : \"2023-08-09T19:32:15Z\",\n \"instance\" : \"projects/012345678901/locations/us-central1/instances/my-instance\",\n \"name\" : \"projects/my-project/locations/us-central1/repositories/my-repo\",\n \"uris\" : {\n \"api\" : \"https://my-instance-012345678901-api.us-central1.sourcemanager.dev/v1/projects/my-project/locations/us-central1/repositories/my-repo\",\n \"gitHttps\" : \"https://my-instance-012345678901-git.us-central1.sourcemanager.dev/my-project/my-repo.git\",\n \"html\" : \"https://my-instance-012345678901.us-central1.sourcemanager.dev/my-project/my-repo\"\n }\n }\n ]\n}\n```\n\n\u003cbr /\u003e\n\nView details for a specific repository\n--------------------------------------\n\nTo list details for a single repository, use the following HTTP method and URL.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the [project ID](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) of the Google Cloud project where Secure Source Manager is running.\n- \u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e: the region where your instance is located. For information on supported locations, see [Locations](https://cloud.google.com/secure-source-manager/docs/locations).\n- \u003cvar class=\"edit\" scope=\"REPOSITORY_ID\" translate=\"no\"\u003eREPOSITORY_ID\u003c/var\u003e: the repository ID.\n\n\nHTTP method and URL:\n\n```\nGET https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories/REPOSITORY_ID\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n \"https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories/REPOSITORY_ID\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method GET `\n -Headers $headers `\n -Uri \"https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories/REPOSITORY_ID\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n {\n \"createTime\" : \"2023-08-09T19:32:15Z\",\n \"instance\" : \"projects/012345678901/locations/us-central1/instances/my-instance\",\n \"name\" : \"projects/my-project/locations/us-central1/repositories/my-repo\",\n \"uris\" : {\n \"api\" : \"https://my-instance-012345678901-api.us-central1.sourcemanager.dev/v1/projects/my-project/locations/us-central1/repositories/my-repo\",\n \"gitHttps\" : \"https://my-instance-012345678901-git.us-central1.sourcemanager.dev/my-project/my-repo.git\",\n \"html\" : \"https://my-instance-012345678901.us-central1.sourcemanager.dev/my-project/my-repo\"\n }\n }\n```\n\nView repositories in the web interface\n--------------------------------------\n\nYou can search for repositories within the **My repositories** tab by keyword.\n\n1. In the Secure Source Manager web interface, enter your search keyword in\n the **Search repository names** search bar.\n\n The search results include all repositories that include your keyword in\n their repository ID.\n2. Select the repository you want to view.\n\n The repository page opens.\n\nWhat's next\n-----------\n\n- [Create a repository](/secure-source-manager/docs/create-repository).\n- [Grant repository-level roles](/secure-source-manager/docs/grant-repository-roles).\n- [Delete a repository](/secure-source-manager/docs/delete-repository)."]]