GET /api/repos/:repoId/settings
Summary
Retrieves the settings for a specific repository by its ID.
Intent
Allows clients to fetch the current configuration settings for a given repository, falling back to default settings if none have been explicitly configured. Optionally scopes access by customer ID to prevent cross-customer data access.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| repoId | string | Yes | The unique identifier of the repository whose settings are being retrieved. |
| customerId | string | No | Optional query parameter. When provided, the endpoint verifies that the repository belongs to this customer. If the repository’s customerId does not match, a 403 Forbidden response is returned. |
Request example
curl -X GET "https://maps.google.com/api/repos/repo-123/settings?customerId=cust-456" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"Response example
{ "settings": { "repoId": "repo-123", "branch": "main" }}Error cases
404— No repository exists with the given repoId.403— A customerId query parameter was provided but does not match the customerId associated with the repository.
Gotchas
- If no settings have been explicitly saved for the repository, the endpoint returns DEFAULT_SETTINGS computed from the repoId and the repository’s default branch — not an empty object.
- The customerId parameter is optional, but when supplied it acts as an access control check. Omitting it bypasses that check entirely, so callers should always supply it when operating in a multi-tenant context.
- Authentication is not enforced at the middleware level for this endpoint (auth required: false), meaning the Authorization header is accepted but not strictly validated by the server — access control relies solely on the optional customerId check.