Skip to content

GET /api/repos/:repoId/runs

Summary

Retrieves all runs (jobs) associated with a specific repository.

Intent

Allows clients to list all pipeline runs for a given repository, optionally scoped to a specific customer, enabling monitoring and auditing of job execution history.

Parameters

NameTypeRequiredDescription
repoIdstringYesThe unique identifier of the repository whose runs should be listed.
customerIdstringNoOptional query parameter to filter and validate that the repository belongs to the specified customer. Returns 403 if the repo’s customerId does not match.

Request example

Terminal window
curl -X GET "https://maps.google.com/api/repos/repo-123/runs?customerId=cust-456" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"

Response example

{
"runs": [
{
"id": "job-001",
"repoId": "repo-123",
"customerId": "cust-456",
"status": "completed",
"commitSha": "abc123",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:35:00Z"
},
{
"id": "job-002",
"repoId": "repo-123",
"customerId": "cust-456",
"status": "running",
"commitSha": "def456",
"createdAt": "2024-01-15T11:00:00Z",
"updatedAt": "2024-01-15T11:02:00Z"
}
]
}

Error cases

  • 404 — No repository exists with the provided repoId
  • 403 — A customerId query parameter was provided but does not match the customerId associated with the repository

Gotchas

  • The customerId query parameter is optional, but if provided it acts as an ownership guard — if the repo’s customerId does not match the supplied value, the request is rejected with a 403 even if the repoId is valid.
  • Omitting customerId entirely bypasses the ownership check, so any caller with a valid repoId can retrieve runs without customer scoping.
  • The response field is named ‘runs’ but the underlying store method is listJobsByRepo — the terms ‘runs’ and ‘jobs’ refer to the same concept in this API.
  • The response shape of individual run objects is determined by the store implementation and cannot be fully verified from source code alone — verify the exact job object shape against the live API or store implementation.