Closed mikehgrantsgov closed 3 days ago
We'll want to be careful about doing GET
with a request body. It's fuzzy whether that's technically "right" in HTTP requests. Some libraries apparently won't let you do that. Either need everything to be request params or just make it a POST
endpoint (I generally just prefer the latter).
I'm trying to think if we'll have more extracts in the future to warrant a naming schema like:
/v1/extracts/opportunities
/v1/extracts/something-else-down-the-road
Makes sense, adapted this for /v1/extracts/opportunities
now and can add more.
Related to 2454
Summary
2792 creates the input/output schemas needed to support the API. This ticket creates the API to read params from the request and send back extract metadata information.
Something like:
POST /v1/extracts/opportunities
Input: ExtractMetadataRequestSchema
If
extract_type
is not provided, default toopportunity_data_extract
(we may support more later) Ifstart_date
andend_date
not provided, default to wherecreated_at
is within the last 7 days.Something like (rough pseudocode):
Acceptance criteria