Reports

When users initially access the MARS API, a default list of available reports are provided. Calls to the MARS API are all done to specific reports. Each report is given a Slug_ID and a Slug_Name, both of which are unique identifiers for the MARS system.  Users must select a report using either unique identifier. 

Example to retrieve table of contents:

cURL: https://marsapi.ams.usda.gov/services/v1/reports -u mars_test_343343:
Excel: https://marsapi.ams.usda.gov/services/v1/reports

In the above example the system will return all the published reports.

Example Response:

{
    "results": [
    {
        "slug_id": "1352",
        "slug_name": "MN_SU103",
        "report_name": "Auction Report"
    },
    {
        "slug_id": "1034",
        "slug_name": "MD_DA105",
        "report_name": "Dairy Individual Commodity Report"
    },
    {
        "slug_id": "1045",
        "slug_name": "MD_DA530",
        "report_name": "Dairy Individual Commodity Report"
    },
    {
        "slug_id": "1084",
        "slug_name": "MD_DA810",
        "report_name": "Dairy Individual Commodity Report"
    },
    {
        "slug_id": "1095",
        "slug_name": "MD_DA953",
        "report_name": "Cold Storage Weekly Report"
    },
    {
        "slug_id": "1605",
        "slug_name": "dybretail",
        "report_name": "National Retail Dairy"
    },
    {
        "slug_id": "1591",
        "slug_name": "MD_DA199",
        "report_name": "Dairy International Dairy Market News Worksheet"
    }
]

To filter on a specific Slug_ID, use the following syntax: 

Syntax :

/reports/<<slug_id>> or /reports/id/<<slug_id>>

Example:  

cURL: https://marsapi.ams.usda.gov/services/v1/reports/1095 -u mars_test_343343:
Excel: https://marsapi.ams.usda.gov/services/v1/reports/1095

 

To filter on a specific Slug_Name, use the following syntax:

/reports/<<slug_id>>

Example :

cURL: https://marsapi.ams.usda.gov/services/v1/reports/MD_DA953 -u mars_test_343343:

Excel: https://marsapi.ams.usda.gov/services/v1/reports/MD_DA953

 

API Endpoint :  https://marsapi.ams.usda.gov/services/v1/reports

Development API Endpoint:   https://marsapidev.ams.usda.gov/services/v1/reports