diff --git a/articles/iot-hub/iot-hub-devguide-jobs.md b/articles/iot-hub/iot-hub-devguide-jobs.md index 368a232ca6335..8e5ae4374bbca 100644 --- a/articles/iot-hub/iot-hub-devguide-jobs.md +++ b/articles/iot-hub/iot-hub-devguide-jobs.md @@ -34,6 +34,7 @@ Jobs are initiated by the solution back end and maintained by IoT Hub. You can i The following snippet shows the HTTPS 1.1 request details for executing a [direct method](iot-hub-devguide-direct-methods.md) on a set of devices using a job: + ``` PUT /jobs/v2/?api-version=2016-11-14 Authorization: @@ -53,6 +54,7 @@ The following snippet shows the HTTPS 1.1 request details for executing a [direc startTime: , // as an ISO-8601 date string maxExecutionTimeInSeconds: } + ``` The query condition can also be on a single device ID or on a list of device IDs as shown in the following examples: @@ -67,7 +69,9 @@ queryCondition = "deviceId IN ['MyDevice1'] The following snippet shows the HTTPS 1.1 request details for updating device twin properties using a job: + ``` PUT /jobs/v2/?api-version=2016-11-14 + Authorization: Content-Type: application/json; charset=utf-8 Request-Id: @@ -81,18 +85,21 @@ The following snippet shows the HTTPS 1.1 request details for updating device tw startTime: , // as an ISO-8601 date string maxExecutionTimeInSeconds: // format TBD } + ``` ## Querying for progress on jobs The following snippet shows the HTTPS 1.1 request details for querying for jobs: + ``` GET /jobs/v2/query?api-version=2016-11-14[&jobType=][&jobStatus=][&pageSize=][&continuationToken=] Authorization: Content-Type: application/json; charset=utf-8 Request-Id: User-Agent: / - + ``` + The continuationToken is provided from the response. You can query for the job execution status on each device using the [IoT Hub query language for device twins, jobs, and message routing](iot-hub-devguide-query-language.md). diff --git a/articles/iot-hub/iot-hub-devguide-messages-construct.md b/articles/iot-hub/iot-hub-devguide-messages-construct.md index 4a23a4839e4d1..7b23c76a0a675 100644 --- a/articles/iot-hub/iot-hub-devguide-messages-construct.md +++ b/articles/iot-hub/iot-hub-devguide-messages-construct.md @@ -46,9 +46,9 @@ The following table lists the set of system properties in IoT Hub messages. | --- | --- | --- | | MessageId |A user-settable identifier for the message used for request-reply patterns. Format: A case-sensitive string (up to 128 characters long) of ASCII 7-bit alphanumeric characters + `{'-', ':',’.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}`. | Yes | | Sequence number |A number (unique per device-queue) assigned by IoT Hub to each cloud-to-device message. | No for C2D messages; yes otherwise. | -| To |A destination specified in [Cloud-to-Device](iot-devguide-c2d-guidance.md) messages. | No for C2D messages; yes otherwise. | +| To |A destination specified in [Cloud-to-Device](iot-hub-devguide-c2d-guidance.md) messages. | No for C2D messages; yes otherwise. | | ExpiryTimeUtc |Date and time of message expiration. | Yes | -| EnqueuedTime |Date and time the [Cloud-to-Device](iot-devguide-c2d-guidance.md) message was received by IoT Hub. | No for C2D messages; yes otherwise. | +| EnqueuedTime |Date and time the [Cloud-to-Device](iot-hub-devguide-c2d-guidance.md) message was received by IoT Hub. | No for C2D messages; yes otherwise. | | CorrelationId |A string property in a response message that typically contains the MessageId of the request, in request-reply patterns. | Yes | | UserId |An ID used to specify the origin of messages. When messages are generated by IoT Hub, it is set to `{iot hub name}`. | No | | Ack |A feedback message generator. This property is used in cloud-to-device messages to request IoT Hub to generate feedback messages as a result of the consumption of the message by the device. Possible values: **none** (default): no feedback message is generated, **positive**: receive a feedback message if the message was completed, **negative**: receive a feedback message if the message expired (or maximum delivery count was reached) without being completed by the device, or **full**: both positive and negative.