GSA / GSA/data.gov

API harvest_jobs endpoint returns RFC 2822 dates instead of ISO 8601

Open
#5,850 0 comments 0 reactions 0 assignees View on GitHub
API bug
Dominant language
Python
Stars
1.1k
Forks
200
Avg merge
4h 56m
Merged PRs (30d)
5

Description

## 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`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.