Example API Request: Applying Request Parameters to Limit Results

Before Getting Started

Additional documentation for the Agency Incidents API can be found here.

Example Code


    curl -v -X GET
    -H "Ocp-Apim-Subscription-Key: {subscription key}"
    -H "Authorization: {access token}"

    --data-ascii "{body}"

Limit Number of Records Returned from an Incident GET Request in Postman

In order to tell an API how you would like your results returned, Request Parameters can be applied to some API calls. Many times returning all values for a field like Incidents can add unnecessary bulk to your requests resulting in longer wait times. You can limit the number of records returned in your request by using the limit Request Parameter. Let's send a GET request with the Limit Request Parameter applied.

  1. Open Postman and request an Access token
            "access_token": "YOUR_ACCESS_TOKEN",
            "expires_in": 3600,
            "token_type": "Bearer",
            "scope": null,
            "refresh_token": "YOUR_REFRESH_TOKEN"
  2. Create a new Request in Postman
  3. Make sure the "GET" request type is selected
  4. New Postman Get Request
  5. In the request URL field, update to the following
    • https://data.emergencyreporting.com/agencyincidents/incidents
  6. At the end of the URL, add a ? followed by limit, then = (equals) and finally 10 to limit the total number of incidents returned to 10
    Limit Incidents
  7. Tap/click the Headers tab and populate with the following information
    Content-Type application/json
    Authorization YOUR_ACCESS_TOKEN
    Authentication Header with Access Token
  8. Tap/click Send
  9. Review results in Body section of Postman
    • Verify that results have been limited to 10 results
  10. Limit Incidents Results

Back to Top