Skip to main content
Skip table of contents

Count the number of results per delivery

This topic describes how to count the number of results associated with a delivery ID via an API query.

Counting the number of results associated with a delivery can be useful when tracking the progress of test takers and processing their results as soon as available.

The entity used for this request is datastoreDeliveryResults and is filtered by deliveryId.

Prerequisites

API authentication

Command line

The example below provides a template for how to count the amount of datastoreDeliveryResults records related to a given delivery (by deliveryId) using a command line.

CODE
curl -X POST "[YOUR_DYNAMIC_QUERY_URL]/api/v1/metric/datastoreDeliveryResults" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer [YOUR_ACCESS_TOKEN]" \
     --data '{"filters": [{"type": "terms", "field": "deliveryId", "values": ["[YOUR_DELIVERY_ID]"]}]}'

Example response:

CODE
{
    "total": 16073
}

Postman

  1. Append /api/v1/metric/datastoreDeliveryResults to the [DYNAMIC_BASE_URL] in the Post text box.

  2. In the Body, add the following:

    CODE
    "filters": [
            {
                "field": "deliveryId",
                "type": "terms",
                "values": [
                    "[YOUR_DELIVERY_ID"]
                ]
            }
        ]
  3. Click Send.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.