Device Twins and Jobs queries RRS feed

  • Question

  • Hi all,

    - Based on the MSDN documents such as Schedule jobs on multiple devices and  Reference-IoT Hub query language for device twins and jobs we can call a service-facing endpoint for queries on the twins or jobs.

    for example, the following screen snippet shows the https request for query the devices stored in the cloud storage for specific slq query. Note, that there is a request header x-ms-max-item-count:100 to control a max number of the returned items (paging):

    the above response (query on devices) is correct implemented for continuously query (paging) over my entire devices cloud storage (probably Azure Storage Blob/Table) related with my tenant namespace.

    But, the situation is completely different for device jobs queries. Implementation of the "paging" is not acceptable, where the page size (request header x-ms-max-item-count:100) doesn't work properly and it indicates a wrong design for query my private (tenant) cloud storage. The following screen snippets is shoving that:

    the above response from the cloud storage devices.jobs returned back the respond header x-ms-continuation and only 3 items for paging size = 100. So, the consumer of this service-facing endpoint will need to call multiple times (maybe hundred times) over all items possible not related with my namespace until the respond header x-ms-continuation is gone. 

    I got the worst case for query of my few jobs using the following request:


    for my ~12 jobs was necessary to make a 5 times paging (calling 5 times a cloud service).

    Is anyone has this similarly problem?

    Thanks in advance.


    • Edited by Roman Kiss Thursday, December 15, 2016 3:48 PM
    Thursday, December 15, 2016 3:47 PM