Open KellyHarrisT opened 2 years ago
Hi Kelly,
Thanks for reaching out. In both query parameters you can send both a single string/integer and an array of strings/integers. As a reminder both of these query parameters are optional.
For the lastModifiedTimePeriod
filter, you can send across a single time period string value to filter on, or multiple time period string values within an array. Example:
Single - "TimePeriod20223"
Multiple - ["TimePeriod20223", "TimePreiod20222"]
The same applies for the lastModifiedBudgetYear
filter, except the field expects integers rather than strings. Example:
Single - 2022
Multiple - [2021, 2022]
These query parameters are based on the lastModifiedTimePeriod
and lastModifiedBudgetYear
system generated fields, which are visible on a GET services collection or resource call. The lastModifiedBudgetYear
corresponds with the Budget Year when the service was last updated (and has no bearing on whether or not the service is active - which is determined solely by the isRetired
field). The lastModifiedTimePeriod
field provides a more granular look which Budget Cycle the service was last updated in using the the format ["TimePeriod" & Budget Year & Stage]. With Stage corresponding with 1 = Pre-Decisional, 2 = President's Budget, 3 = Congressional Justification etc.
Please let us know if you have more questions.
Thanks, Ryan
Thanks for your response. I created a tool to import the schema (0.0.5). Having "duplicate" parameters is awkward.
For clarification, . The API Call: (just chose one to understand this endpoint as a basis for the rest of the functionality) /v1/servces may look like /v1/services?Page=1&LastModifiedTimePeriod=TimePeriod1, TimePeriod2, TimePeriod3&LastModifiedBudgetYear=2021,2022&isRetired=false&order=desc
the parameter "order" only has the value of "asc/desc" or can I choose which value to sort on?
Hi Kelly,
That is correct. However, again, each query parameter is optional and not required for use.
In regards to the order query parameter, it is a sort on the lastModified field. And, you you are correct that you would pass along "asc/desc" as values to trigger the sort.
There are some properties that are defined as: string order[lastModified]. A value of "asc" or "desc" is expected?
Example of a confusion: getServicesCollection has multiple parameters that expect similar values?
Can you add descriptions and examples to be used for the properties of called methods?
Thank You Kelly