marquez
marquez copied to clipboard
Proposal: Create API endpoint to derive runs for a `job_version`
In the current specification of the API, there is no way to derive the runs for a particular job version.
The API to list a particular version of a job defined as `/api/v1/namespaces/{namespace}/jobs/{job}/versions/{version} returns only the latest run for the job version. It is very likely users will want to be able to see all the runs instead of just the most recent one.
New Endpoint:
/api/v1/namespaces/{namespace}/jobs/{job}/versions/{version}/runs
Query Params
limit: The number of results to return from the offset offset: The initial position from which to return results
Response
{
runs: RunSchema[]
}
Note:
Namespace
andJob
aren't really required since we have thejob_version
UUID, but we wish to follow the conventions of our existing specification.
To retrieve a run, we expose the endpoint /jobs/runs/{id}
since we don't need the namespace or job and run IDs are globally unique. We can also do the same to return the N
runs for a given job version as they are also globally unique:
GET /jobs/versions/{id}/runs
That said, we currently do expose the following API to retrieve a job version:
GET /api/v1/namespaces/{namespace}/jobs/{job}/versions/{version}
So, we may want to be consistent, as you mentioned, or support both cases.