Examples

Syntax :

sort=commodity;market_type;holdings_current_lbs

Example :


cURL: curl https://marsapi.ams.usda.gov/services/v1/reports/1095?q=commodity=Cheese;market_type=Cold+Storage;holdings_current_lbs=94464576  -u mars_test_343343: 
Excel: https://marsapi.ams.usda.gov/services/v1/reports/1095?q=commodity=Cheese;market_type=Cold+Storage;holdings_current_lbs=94464576

In the above example,the response data for the 1095 report will be filter by Commodity=cheese, market_type=Cold+Storage, and by holdings_current_lbs, since there is no sort order available, the response will be sorted automatically by default sort order. 

Syntax :

sort=commodity;market_type;holdings_current_lbs;report_end_date

Example :


cURL: curl https://marsapi.ams.usda.gov/services/v1/reports/1095?q=commodity=Cheese;market_type=Cold+Storage;holdings_current_lbs=94464576;report_end_date=2018-01-15 -u mars_test_343343: 
Excel: https://marsapi.ams.usda.gov/services/v1/reports/1095?q=commodity=Cheese;market_type=Cold+Storage;holdings_current_lbs=94464576;report_end_date=2018-01-15

In the above example,the response data for the 1095 report will be filter by Commodity=cheese, market_type=Cold+Storageholdings_current_lbs, and by report_end_date, since there is no sort order available, the response will be sorted automatically by default sort order. 

Syntax :

sort=commodity;market_type;holdings_current_lbs;report_end_date

Example :


cURL: curl https://marsapi.ams.usda.gov/services/v1/reports/1095?q=commodity=Cheese;market_type=Cold+Storage;holdings_current_lbs=94464576;report_end_date=2018-01-15:2018-02-14&sort=-office_code  -u mars_test_343343:
Excel: https://marsapi.ams.usda.gov/services/v1/reports/1095?q=commodity=Cheese;market_type=Cold+Storage;holdings_current_lbs=94464576;report_end_date=2018-01-15:2018-02-14&sort=-office_code

In the above example,the response data for the 1095 report will be filter by Commodity=cheese, market_type=Cold+Storageholdings_current_lbs, and by report_end_date (between 2 dates). The sort order is by office code