### Querying Order Revenue by Type (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to query the API endpoint to get the total revenue for a specific order type (general or restaurant). The order type is specified in the URL path. ```bash curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```bash curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Demonstrating API Error Scenarios (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Examples of invalid requests to the API endpoint, demonstrating expected error responses. This includes attempting to query a non-existent order type ('restaurant_orders1') and using the incorrect HTTP method (POST instead of GET). ```bash curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders1 ``` ```bash curl -i -X POST http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Fetching Total Revenue using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Illustrates how to get the aggregated total revenue across all order types by calling the base `/v1/orders/revenue` endpoint without specifying an order type. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Querying Windowed Order Count by Custom Time Range (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to query windowed order counts within a specified custom time range using `from_time` and `to_time` query parameters in ISO 8601 format. The example demonstrates querying a single specific window by using the same start and end time. A comment indicates both times are inclusive in the result. ```bash curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-16T11:27:00&to_time=2023-02-16T11:27:00 ``` -------------------------------- ### Demonstrating Error Scenarios for Revenue API using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows examples of API calls to the revenue endpoint that are expected to result in errors. This includes using an invalid order type ('restaurant_orders1') and attempting to use an incorrect HTTP method (POST instead of GET). ```curl curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders1 ``` ```curl curl -i -X POST http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Demonstrating API Error Scenarios using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt These commands demonstrate common error scenarios when interacting with the API. The first uses an invalid order type (`restaurant_orders1`), and the second attempts to use an incorrect HTTP method (POST instead of GET) on a revenue endpoint. Requires the service on localhost:8080. Used to test API error handling responses. ```bash curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders1 curl -i -X POST http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Retrieving Windowed Order Counts (All Types) using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to fetch time-windowed order counts aggregated across all order types by calling the `/v1/orders/windows/count` endpoint using `curl`. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Fetching Total Orders Count using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Illustrates how to get the aggregated count of all orders across all types by calling the base `/v1/orders/count` endpoint without specifying an order type. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Retrieving Order Revenue by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates fetching the total revenue generated for a specific order type (general or restaurant) via the `/v1/orders/revenue/{order_type}` endpoint using `curl`. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```bash curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Retrieving Total Orders Revenue using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Fetches the total aggregated revenue for all order types without specific filtering. This request targets the base '/v1/orders/revenue' endpoint. ```curl curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Querying Order Revenue by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Provides examples for querying the total revenue generated by orders of a specific type (e.g., general_orders, restaurant_orders) using a path variable. ```curl curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Querying Total Order Revenue (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Retrieves the total revenue from all orders across all types. This endpoint provides the aggregate revenue without any specific type filtering. ```bash curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Querying Total Order Revenue for All Types using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Describes how to retrieve the total revenue across all order types by making a GET request to the base revenue endpoint. ```curl curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Querying Total Order Revenue for All Types using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the base `/v1/orders/revenue` endpoint to retrieve the total revenue across all order types. Requires the service on localhost:8080. Expected output provides revenue summarized for all relevant types, potentially in an OrderRevenueDTO. ```bash curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Demonstrating Error Scenarios for Order Revenue Queries using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows examples of invalid requests to the revenue endpoint, including querying an unknown order type and attempting to use a non-GET HTTP method like POST. ```curl curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders1 ``` ```curl curl -i -X POST http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Querying Windowed Order Revenue by Type (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries for order revenue aggregated within time windows, filtered by order type (restaurant or general). These endpoints return revenue figures for each relevant time window. ```bash curl -i http://localhost:8080/v1/orders/windows/revenue/restaurant_orders ``` ```bash curl -i http://localhost:8080/v1/orders/windows/revenue/general_orders ``` -------------------------------- ### Retrieving Order Revenue by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates fetching the total revenue for a specific order type (general or restaurant) from the API's revenue endpoint. These requests target the '/v1/orders/revenue/{orderType}' path. ```curl curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Querying Order Count by Type and Location using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to retrieve the order count for a specific type, further filtered by a `location_id` query parameter using the `/v1/orders/count/{order_type}` endpoint. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Retrieving All Orders Total Count using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Fetches the aggregated count of all orders across all types without specific filtering. This request targets the base '/v1/orders/count' endpoint. ```curl curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Querying Order Count by Type (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates querying the API endpoint to retrieve the count of orders for a specific type (general or restaurant). No parameters other than the path segment specifying the order type are used. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```bash curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Querying Windowed Order Revenue by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Provides examples for retrieving order revenue aggregated within specific time windows for a given order type, likely from Kafka Streams windowed revenue calculations. ```curl curl -i http://localhost:8080/v1/orders/windows/revenue/restaurant_orders ``` ```curl curl -i http://localhost:8080/v1/orders/windows/revenue/general_orders ``` -------------------------------- ### Retrieving Order Count by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates fetching the count of orders for a specific type (general or restaurant) via the `/v1/orders/count/{order_type}` endpoint using `curl`. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```bash curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Querying Total Order Count for All Types using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the base `/v1/orders/count` endpoint to retrieve the total count of orders across all types. Requires the service to be running on localhost:8080. Expected output provides counts summarized for all relevant order types, potentially in an AllOrdersCountPerStoreDTO. ```bash curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Retrieving All Windowed Orders Total Count using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Fetches the aggregated count of all orders across all types, grouped into predefined time windows. This request targets the base '/v1/orders/windows/count' endpoint. ```curl curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Querying Windowed Order Counts by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates fetching time-windowed order counts filtered by a specific order type (general or restaurant) via the `/v1/orders/windows/count/{order_type}` endpoint using `curl`. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```bash curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Query Count with Non-existent Location - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve the total count of orders for a specific type, filtered by a location ID that may not have data. This example demonstrates querying with a key that might result in no match. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Querying Order Revenue by Type using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt These commands query the `/v1/orders/revenue/{orderType}` endpoint to retrieve the total revenue for a specific order type. Requires the service on localhost:8080. Expected output is a revenue value, potentially in an OrderRevenueDTO. ```bash curl -i http://localhost:8080/v1/orders/revenue/general_orders curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Retrieve Windowed Counts for All Order Types - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve windowed total counts for all orders across all types. This queries a Kafka Streams windowed state store to get counts aggregated over time windows. ```bash curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Querying Total Order Count (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Provides the `curl` command to retrieve the aggregate count of all orders across all types, without filtering by type or location. This fetches the total overall count. ```bash curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Retrieving Order Count with No Matching Key using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Illustrates querying for an order count using a location ID that is expected to not have matching data. This example uses a 'location_id' parameter with a value ('store_9999') that likely does not correspond to any orders. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Querying Windowed Order Revenue by Type using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt These commands query the `/v1/orders/windows/revenue/{orderType}` endpoint to retrieve order revenue aggregated within defined time windows for a specific order type. Requires the service on localhost:8080. Expected output includes revenue per time window, potentially in an OrdersRevenuePerStoreByWindows DTO. ```bash curl -i http://localhost:8080/v1/orders/windows/revenue/restaurant_orders curl -i http://localhost:8080/v1/orders/windows/revenue/general_orders ``` -------------------------------- ### Retrieving Windowed Order Revenue by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates fetching the total revenue for a specific order type aggregated into predefined time windows via the API's windowed revenue endpoint. These requests target the '/v1/orders/windows/revenue/{orderType}' path. ```curl curl -i http://localhost:8080/v1/orders/windows/revenue/restaurant_orders ``` ```curl curl -i http://localhost:8080/v1/orders/windows/revenue/general_orders ``` -------------------------------- ### Retrieving Order Count by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates fetching the count of orders for a specific type (e.g., general or restaurant) via the API's count endpoint. These requests target the '/v1/orders/count/{orderType}' path. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Querying Order Count by Type and Location (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to query the order count endpoint filtering by both order type (path segment) and a specific location ID using a query parameter. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` -------------------------------- ### Querying Windowed Order Count by Type (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries for order counts aggregated within time windows, filtered by order type (restaurant or general). These endpoints return counts for each relevant time window. ```bash curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```bash curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Retrieving Total Revenue - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/revenue endpoint to get the aggregate revenue across all order types. Does not require any parameters. Expected output is likely an OrderRevenueDTO. ```curl curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Retrieving Windowed Total Orders Count - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/windows/count endpoint to get the count of orders grouped by predefined time windows across all types. Does not require any parameters. ```curl curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Retrieving Total Orders Count - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/count endpoint to get the aggregate count of all orders across all types. Does not require any parameters. Expected output is likely an AllOrdersCountPerStoreDTO. ```curl curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Querying Order Count with Non-existent Location (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Illustrates querying the order count endpoint with a location ID ('store_9999') that is expected not to exist, likely demonstrating a zero count or error response scenario from the API. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Querying Total Windowed Order Count (bash) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.1-get-windows-order-count-bytype/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Retrieves the total count of all orders aggregated within time windows across all types. This endpoint returns windowed counts without filtering by order type. ```bash curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Querying Windowed Order Count by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Examples for retrieving order counts aggregated within specific time windows for a given order type, likely reflecting results from Kafka Streams windowed aggregations. ```curl curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```curl curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Querying Total Windowed Order Count for All Types using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the base `/v1/orders/windows/count` endpoint to retrieve order counts aggregated within defined time windows across all order types. Requires the service on localhost:8080. Expected output includes windowed counts for all types, potentially in an OrdersCountPerStoreByWindows DTO. ```bash curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Querying Windowed Order Count by Type using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt These commands query the `/v1/orders/windows/count/{orderType}` endpoint to retrieve order counts aggregated within defined time windows for a specific order type. Requires the service on localhost:8080. Expected output includes counts per time window, potentially in an OrdersCountPerStoreByWindows DTO. ```bash curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Querying Order Count with No Matching Key using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command demonstrates querying for an order count with a `location_id` that is expected not to have any matching data. It uses the `/v1/orders/count/{orderType}` endpoint with a non-existent location ID query parameter. Requires the service on localhost:8080. Used to test error handling or empty results. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Fetching Windowed Order Counts (Custom Time Range) using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.3-get-endpoint-all-ordercount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to retrieve time-windowed order counts for a specified custom time range using the `from_time` and `to_time` query parameters on the `/v1/orders/windows/count` endpoint. The `to_time` is inclusive. The `-i` flag includes response headers. ```bash curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-15T02:18:00&to_time=2023-02-15T02:18:30 ``` -------------------------------- ### Retrieving Windowed Order Count by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates fetching the count of orders for a specific type aggregated into predefined time windows via the API's windowed count endpoint. These requests target the '/v1/orders/windows/count/{orderType}' path. ```curl curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```curl curl -i http://localhost/8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Retrieving Order Count by Type and Location using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to filter order counts by both order type and a specific location ID using a query parameter. The request targets the '/v1/orders/count/{orderType}' path and includes a 'location_id' parameter. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` -------------------------------- ### Retrieve Windowed Counts by Time Range - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve windowed total counts for a specific time range, specified by 'from_time' and 'to_time' query parameters. The 'to_time' is inclusive. ```bash curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-15T02:18:00&to_time=2023-02-15T02:18:30 ``` -------------------------------- ### Querying Order Count by Type using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt These commands query the `/v1/orders/count/{orderType}` endpoint to retrieve the total count for a specific order type (general or restaurant). Requires the service to be running on localhost:8080. Expected output is a count value, possibly wrapped in a DTO like OrderCountPerStoreDTO. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Querying Order Count by Type and Location ID using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to retrieve the order count for a specific order type filtered by a location ID using a query parameter. Includes an example demonstrating a non-matching key scenario. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Retrieving Windowed Orders Count by Type - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/windows/count/{order_type} endpoint to get the count of orders for a specific type, grouped by predefined time windows. Requires the order_type path parameter. ```curl curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```curl curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Querying Windowed Order Count by Custom Time Range using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the `/v1/orders/windows/count` endpoint, filtering windowed results by a custom `from_time` and `to_time` range using query parameters. The times specified are inclusive. Requires the service on localhost:8080. Expected output is windowed counts within the specified range, potentially in an OrdersCountPerStoreByWindows DTO. ```bash curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-16T11:27:00&to_time=2023-02-16T11:27:00 ``` -------------------------------- ### Retrieve Total Revenue for All Order Types - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve the total revenue generated by all orders across all types. This queries a state store that aggregates revenue without filtering by a specific order type key. ```bash curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Retrieve Count by Order Type and Location - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve the total count of orders for a specific type, further filtered by a provided location ID using a query parameter. This queries a keyed state store. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` -------------------------------- ### Retrieve Revenue by Order Type - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve the total revenue generated by a specific order type (general or restaurant). These queries target endpoints filtering revenue by a key representing the order type. ```bash curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```bash curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Retrieving Order Revenue by Type - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/revenue/{order_type} endpoint to get the revenue for the specified order type. Requires the order_type path parameter (e.g., general_orders, restaurant_orders). Expected output is likely an OrderRevenueDTO. ```curl curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Retrieving Windowed Order Count by Custom Time Range using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.3-get-windows-order-count-within-range/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to retrieve aggregated order counts within a specific custom time range using 'from_time' and 'to_time' query parameters. The 'to_time' parameter is inclusive in the result. ```curl curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-17T15:58:00&to_time=2023-02-17T15:58:15 ``` ```curl curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-17T15:58:00&to_time=2023-02-17T15:58:14 ``` -------------------------------- ### Retrieving Orders Count by Type - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/count/{order_type} endpoint to get the count of orders for a specific type. Requires the order_type path parameter (e.g., general_orders, restaurant_orders). Expected output is likely an OrderCountPerStoreDTO. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Retrieve Count by Order Type - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve the total count of orders for a specific type (general or restaurant). These queries target endpoints filtering counts by a key representing the order type. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```bash curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Retrieve Windowed Counts by Order Type - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve windowed total counts for a specific order type (general or restaurant). This queries a Kafka Streams windowed state store filtered by key. ```bash curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```bash curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Retrieve Total Count for All Order Types - API Endpoint - Bash Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.4-get-endpoint-orderRevenue/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Sends a GET request to retrieve the total count of all orders across all types. This queries a state store that aggregates counts without filtering by a specific order type key. ```bash curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Querying Order Count by Type and Location using Curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 26 - Interactive Queries - Querying Window State Stores using RESTFUL APIs/22.2-get-windows-order-count-all-types/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the `/v1/orders/count/{orderType}` endpoint, filtering by `location_id`. It retrieves the count for a specific order type within a given location. Requires the service on localhost:8080 and uses the `location_id` query parameter. Expected output is a count, potentially OrderCountPerStoreDTO. ```bash curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` -------------------------------- ### Retrieving Windowed Orders Count by Time Range - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/windows/count endpoint to get the count of orders within a specified custom time range, grouped by windows. Requires from_time and to_time query parameters in ISO 8601 format. The to_time parameter is inclusive. ```curl curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-15T02:18:00&to_time=2023-02-15T02:18:30 ``` -------------------------------- ### Retrieving Order Count By Order Type and Location (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries the order count for a specific order type, filtered by a location ID. Includes an example demonstrating a query with no matching key, indicating how missing data might be handled. The expected output is an OrderCountPerStoreDTO. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Querying Total Order Revenue using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the total revenue across all order types. ```shell curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Querying Windowed Total Order Count for All Types using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Shows how to retrieve total order counts across all types, aggregated within time windows, by accessing the base windowed count endpoint. ```curl curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Querying Windowed Total Order Count using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the total count of orders across all types, aggregated within predefined time windows. ```shell curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Querying Order Revenue by Type using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the total revenue for a specific order type. Replace `general_orders` or `restaurant_orders` with the desired type. ```shell curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```shell curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Querying Windowed Order Count by Type using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the count of orders for a specific type, aggregated within predefined time windows. ```shell curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```shell curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Querying Order Count by Type and Location (No Match) using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command demonstrates querying the count for a specific type and location ID that is expected to have no matching results. ```shell curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Querying Total Order Count using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the total count of orders across all types. ```shell curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Querying Total Order Count for All Types using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Illustrates how to fetch the total count of all order types combined using the base count endpoint without specifying an order type or location. ```curl curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Querying Order Count by Type using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the total count of orders for a specific type. Replace `general_orders` or `restaurant_orders` with the desired order type. ```shell curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```shell curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Querying Order Count by Type and Location using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the total count of orders for a specific type, filtered by a provided location ID. ```shell curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` -------------------------------- ### Querying Windowed Order Count with Custom Time Range using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates how to filter windowed order count results for a specific time range using `from_time` and `to_time` query parameters. The time range is inclusive. ```curl curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-16T11:27:00&to_time=2023-02-16T11:27:00 ``` -------------------------------- ### Querying Windowed Order Count by Custom Time Range using curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part1/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt This command queries the total count of orders within a specified custom time range (from_time to to_time), aggregated within windows that intersect this range. The `to_time` is inclusive. ```shell curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-15T02:18:00&to_time=2023-02-15T02:18:30 ``` -------------------------------- ### Querying Order Count by Type using cURL Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.5-global-error-handler/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Demonstrates how to use cURL to retrieve the count of orders for a specific order type (e.g., general_orders, restaurant_orders). This endpoint requires the order type as a path variable. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` -------------------------------- ### Retrieving Windowed Order Counts (All Types) (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries order counts aggregated within time windows, returning results for all order types. ```curl curl -i http://localhost:8080/v1/orders/windows/count ``` -------------------------------- ### Retrieving Orders Count by Type and Location - Orders Service - curl Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.2-get-endpoint-orderCount/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Calls the /v1/orders/count/{order_type} endpoint, filtering results by location_id. Requires the order_type path parameter and the location_id query parameter. Expected output is likely an OrderCountPerStoreDTO. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_1234 ``` ```curl curl -i http://localhost:8080/v1/orders/count/general_orders?location_id=store_9999 ``` -------------------------------- ### Retrieving Order Revenue By Order Type (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries the total revenue generated by orders of a specific type (e.g., general or restaurant orders). The expected output is an OrderRevenueDTO. ```curl curl -i http://localhost:8080/v1/orders/revenue/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/revenue/restaurant_orders ``` -------------------------------- ### Retrieving Total Order Revenue (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries the total revenue generated by all orders across all types via a dedicated endpoint. The expected output is an OrderRevenueDTO. ```curl curl -i http://localhost:8080/v1/orders/revenue ``` -------------------------------- ### Retrieving Total Order Count (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries the total count of all orders across all types via a dedicated endpoint. The expected output is an AllOrdersCountPerStoreDTO. ```curl curl -i http://localhost:8080/v1/orders/count ``` -------------------------------- ### Retrieving Windowed Order Counts By Order Type (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries order counts aggregated within time windows, filtered to a specific order type (e.g., general or restaurant orders). ```curl curl -i http://localhost:8080/v1/orders/windows/count/restaurant_orders ``` ```curl curl -i http://localhost:8080/v1/orders/windows/count/general_orders ``` -------------------------------- ### Retrieving Windowed Order Counts By Time Range (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries order counts aggregated within time windows, specifically filtering results by a custom 'from' and 'to' time range. The 'to_times' parameter is inclusive. ```curl curl -i http://localhost:8080/v1/orders/windows/count?from_time=2023-02-15T02:18:00&to_time=2023-02-15T02:18:30 ``` -------------------------------- ### Retrieving Order Count By Order Type (curl) Source: https://github.com/packtpublishing/kafka-streams-api-for-developers-using-java-spring-boot-3.x/blob/main/Section 25 - Interactive Queries - Querying State Stores using RESTFUL APIs/21.1-get-endpoint-orderCount-part2/orders-management-streams/orders-streams-app/src/main/resources/curl-commands.txt Queries the total count of orders for a specific order type (e.g., general or restaurant orders) via a REST endpoint. The output is expected to be an OrderCountPerStoreDTO. ```curl curl -i http://localhost:8080/v1/orders/count/general_orders ``` ```curl curl -i http://localhost:8080/v1/orders/count/restaurant_orders ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.