Skip to content

API harvest_jobs endpoint returns RFC 2822 dates instead of ISO 8601 #5850

Description

@SueValente

What

The /harvest_jobs/ endpoint returns date fields in RFC 2822 format instead of ISO 8601 as documented in the Swagger spec.

Background / Context

This bug was discovered on April 9, 2026 while responding to a stakeholder inquiry from Max Felsher at CGI Federal, who is building an integration against the Data.gov harvest API. Max noticed that the Swagger documentation at harvest.data.gov/openapi/docs shows dates in ISO 8601 format, but the actual API response returns RFC 2822 format.

We confirmed this by calling the live endpoint directly:
GET https://harvest.data.gov/harvest_jobs/?harvest_source_id=caeb929a-cbf1-4597-ae51-fc7f4820b033
The Swagger UI is auto-generated from the application code and cannot be edited manually -- fixing this requires a code change to either standardize the API response to ISO 8601, or update the data model annotation to accurately reflect what the API actually returns. ISO 8601 is the preferred fix as it is the standard used elsewhere in the catalog API.
This came up in the context of stakeholders migrating from the legacy CKAN API to the new catalog API ahead of the Sprint 90 cutover.

Actual response:
"date_created": "Thu, 09 Apr 2026 22:29:40 GMT"
"date_finished": "Wed, 08 Apr 2026 22:36:27 GMT"

Expected per Swagger spec:
"date_created": "2026-04-09T22:29:40.000Z"
"date_finished": "2026-04-08T22:36:27.000Z"

Why it matters

External developers are coding against the Swagger spec and encountering unexpected date formats. This creates integration friction for anyone parsing dates from the harvest jobs endpoint.

Steps to reproduce

GET https://harvest.data.gov/harvest_jobs/?harvest_source_id=caeb929a-cbf1-4597-ae51-fc7f4820b033

Expected fix

Update the API to return dates in ISO 8601 format to match the Swagger documentation. Alternatively update the Swagger spec to reflect RFC 2822 if changing the response format would be a breaking change.

Labels

bug API O&M

Activity

  1. moved this from Next Up to 📟 Sprint Backlog in data.gov team boardon Apr 23, 2026
  2. moved this from 📟 Sprint Backlog to No status in data.gov team boardon Apr 30, 2026
  3. moved this from O&M Backlog to 📥 Queue in data.gov team boardon Jun 24, 2026
  4. self-assigned this
    on Sep 30, 2026
  5. palakGSA commented on Oct 5, 2026

    @palakGSA

    Updated harvest job datetime serialization so date_created, date_started, and date_finished are returned in ISO 8601 UTC format. Changes deployed to DEV and verified against the /api/v1/harvest_jobs/ endpoint. All three fields are now returning values such as 2026-05-19T03:02:05.678Z.

  6. added
    changelogIssues that resulted in an API changelog change
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

APIbugSoftware defect or bugchangelogIssues that resulted in an API changelog change

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions