Skip to content

Commit

Permalink
Small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinsh committed Sep 29, 2018
1 parent f0ba75e commit 3b2719a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion articles/iot-hub/iot-hub-devguide-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<jobId>?api-version=2016-11-14

Authorization: <config.sharedAccessSignature>
Expand All @@ -53,6 +54,7 @@ The following snippet shows the HTTPS 1.1 request details for executing a [direc
startTime: <jobStartTime>, // as an ISO-8601 date string
maxExecutionTimeInSeconds: <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:

Expand All @@ -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/<jobId>?api-version=2016-11-14

Authorization: <config.sharedAccessSignature>
Content-Type: application/json; charset=utf-8
Request-Id: <guid>
Expand All @@ -81,18 +85,21 @@ The following snippet shows the HTTPS 1.1 request details for updating device tw
startTime: <jobStartTime>, // as an ISO-8601 date string
maxExecutionTimeInSeconds: <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=<jobType>][&jobStatus=<jobStatus>][&pageSize=<pageSize>][&continuationToken=<continuationToken>]

Authorization: <config.sharedAccessSignature>
Content-Type: application/json; charset=utf-8
Request-Id: <guid>
User-Agent: <sdk-name>/<sdk-version>

```

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).
Expand Down
4 changes: 2 additions & 2 deletions articles/iot-hub/iot-hub-devguide-messages-construct.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3b2719a

Please sign in to comment.