Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Add query parameter option to Traffic Ops GET /jobs API to return only jobs created during maxRevalDurationDays window #5674

@rawlinp

Description

@rawlinp

I'm submitting a ...

  • improvement request (usability, performance, tech debt, etc.)

Traffic Control components affected ...

  • Traffic Ops
  • Traffic Ops ORT

Current behavior:

The Traffic Ops GET /api/x/jobs API currently returns all invalidation jobs ever created. For applications like ORT that really only need to get unexpired invalidation jobs, this is very inefficient.

New behavior:

Provide a query parameter option to return only invalidation jobs created within the maxRevalDurationDays window. Update ORT to use the new query parameter option. For performance reasons, we might want to add a DB index on the start_time column w/ DESC NULLS LAST, similar to the last_updated index.

Minimal reproduction of the problem with instructions:

Request the TO GET /api/x/jobs route, observe that every job ever created is returned.

Metadata

Metadata

Assignees

Labels

Traffic Opsrelated to Traffic Opscache-configCache config generationimprovementThe functionality exists but it could be improved in some way.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions