Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Wade-API-QA Results. #102

Open
rwjam opened this issue Dec 23, 2020 · 2 comments
Open

Testing Wade-API-QA Results. #102

rwjam opened this issue Dec 23, 2020 · 2 comments
Assignees

Comments

@rwjam
Copy link
Member

rwjam commented Dec 23, 2020

Here are the results of a series of test on the QA API from 12/22/2020, conducted by Ryan J of WSWC. API queries that failed are as follow (see below): 7, 8, 9, 14, 15

============================================================================

  1. SiteUUID, string, Search based on a univeral Site identifer across all the states in WaDE
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?SiteUUID=UTss_S1
    Response: Success, returns dictionary. Returns all related site info, water source, organization, variable, method and any time series variable amounts.

  2. SiteTypeCV, string, Search based on a controlled Site type identifier across all the states in WaDE
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?SiteTypeCV=Public
    Response: Success, returns dictionary. Returns related water source, organization, variable, method and any site and associated variable amounts associated with the site type.

  3. VariableCV, string($string), pass an optional search string for looking up inventory
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?VariableCV=Unspecified
    Response: Success. Returns dictionary of related water source, organization, variable, method and any site and associated variable amounts associated with the variable.

  4. VariableSpecificCV, string($string), number of records to skip for pagination
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?VariableSpecificCV=Unspecified
    Response: Success. Returns dictionary of related water source, organization, variable, method and any site and associated variable amounts associated with the variablespecific.

  5. BeneficialUseCV, string, Search for site specific data based on a beneficial Use category (primary?) (i.e. Irrigation) as defined by each state
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?BeneficialUseCV=Domestic
    Response:: Success. Returns dictionary of related water source, organization, variable, method and any site and associated variable amounts associated with the beneficial use.

  6. USGSCategoryNameCV, string ,a USGS water use category from the USGS controlled vocabulary (e.g. irrigation, groundwater, fresh)
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?USGSCategoryNameCV=’’
    Response: Returns empty dictionary, which is the expected outcome as USGSCategoryNameCV was blank for testing site specific data.

  7. StartDate, string, Search for site specific data with StartDate later than this end date DD/MM/YYYY (e.g., Leaving it empty would return all data to the earliest date in the database
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?StartDate=01/01/2019
    Response: Failed. Returns error ‘JSONDecodeError: Expecting value: line 1 column 1 (char 0)’

  8. EndDate, string, Search for site specific with EndDate date earlier than this end date DD/MM/YYYY (e.g. Leaving it empty would return all data to the last TimeframeEndDate date in the database
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?EndDate=12/31/2019
    Response: Failed. Returns error ‘JSONDecodeError: Expecting value: line 1 column 1 (char 0)’

  9. SearchBoundary, string, Search for water allocations within a geo-spatial boundary within or across state boarders (e.g., Bear River watershed)
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?SearchBoundary=x
    Response:
    ….. how does that even tie into WaDE at the moment?

  10. HUC8**,** string
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?HUC8=’’
    Response: Returns empty dictionary, which is the expected outcome as HUC8 was blank for testing site specific data.

  11. HUC12, string
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?HUC12=’’
    Response: Returns empty dictionary, which is the expected outcome as HUC8 was blank for testing site specific data.

  12. County, string
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?County=Washington
    Response: Success. Returns dictionary of related water source, organization, variable, method and any site and associated variable amounts associated with the county.

  13. State, string, Two letter state abbreviation.
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?State=UT
    Response: Success. Returns dictionary of related water source, organization, variable, method and any site and associated variable amounts associated with the state.

  14. StartIndex, integer minimum: 0, 0-based index for where to start querying for records. Defaults to 0 if not specified.
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?StartIndex=10
    Response:
    ….. how does that even tie into WaDE at the moment?

  15. RecordCount, integer, Number of records to retrieve. Defaults to 1000 if not specified.
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?RecordCount=5
    Response:
    ….. how does that even tie into WaDE at the moment?

@rwjam
Copy link
Member Author

rwjam commented Dec 23, 2020

  1. Is this expecting a site code?
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?StartDate=01/01/2019

  2. Might need Ryan (DPL) to test this one for us.
    https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?SearchBoundary=x

14-15. These two have to do with getting the JSON data in pages to mange the size of data coming out. Might have to wait and test these later when DPL has a built portal for it.
https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?StartIndex=10
https://wade-api-qa.azure-api.net/v1/SiteVariableAmounts?RecordCount=5

@amabdallah
Copy link
Collaborator

Quick comment: the API calls like 7,14,15 need a better error message that says a meaningful message (e..g, you need to provide the site code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants