{ "info": { "_postman_id": "68cc38f7-b565-4bd6-8d82-66f549ab88a2", "name": "IoT Central", "description": "This collection helps you try out the IoT Central REST API calls described in [How to use the Azure IoT Central REST API](https://docs.microsoft.com/azure/iot-central/core/howto-authorize-rest-api).\n\nMany of the variables used in this collection are set for you. Some, such as as your app ID and admin token, you need to set using your own values.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "2530234" }, "item": [ { "name": "Authenticate and authorize", "item": [ { "name": "Get role list", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/roles?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "roles" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Create an operator token", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"roles\": [\r\n {\r\n \"role\": \"ae2c9854-393b-4f97-8c42-479d70ce626e\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/apiTokens/operator-token?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "apiTokens", "operator-token" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get role list (Bearer token)", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" }, { "key": "password", "value": "{{BEARER_TOKEN}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/roles?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "roles" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to authenticate and authorize IoT Central REST API calls](https://docs.microsoft.com/azure/iot-central/core/howto-authorize-rest-api)" }, { "name": "Query devices", "item": [ { "name": "Run a query", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"query\": \"SELECT $id, $ts, temperature, humidity FROM {{deviceTemplateId}} WHERE WITHIN_WINDOW(P1D)\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/query?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "query" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Aliases", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"query\": \"SELECT $id as ID, $ts as timestamp, temperature as t, pressure as p FROM {{deviceTemplateId}} WHERE WITHIN_WINDOW(P1D) AND t > 0 AND p > 50\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/query?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "query" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Top", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"query\": \"SELECT TOP 10 $id as ID, $ts as timestamp, temperature, humidity FROM {{deviceTemplateId}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/query?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "query" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "From", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"query\": \"SELECT $id, $ts, temperature, humidity FROM {{deviceTemplateId}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/query?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "query" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Where", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"query\": \"SELECT $id, $ts, temperature, humidity FROM {{deviceTemplateId}} WHERE WITHIN_WINDOW(P1D)\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/query?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "query" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Aggregations and Group By", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"query\": \"SELECT AVG(temperature), AVG(pressure) FROM {{deviceTemplateId}} WHERE WITHIN_WINDOW(P1D) AND $id='{{deviceId}}' GROUP BY WINDOW(PT10M)\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/query?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "query" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Order By", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"query\": \"SELECT $id as ID, $ts as timestamp, temperature, humidity FROM {{deviceTemplateId}} ORDER BY timestamp DESC\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/query?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "query" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to query devices](https://docs.microsoft.com/azure/iot-central/core/howto-query-with-rest-api)" }, { "name": "Manage users and roles", "item": [ { "name": "Get role ids", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/roles?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "roles" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List users", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/users?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "users" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Create a user", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"{{newUserId}}\",\r\n \"type\": \"email\",\r\n \"roles\": [\r\n {\r\n \"role\": \"{{builderId}}\"\r\n }\r\n ],\r\n \"email\": \"user1@contoso.com\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/users/{{newUserId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "users", "{{newUserId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a user", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/users/{{newUserId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "users", "{{newUserId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Change the role of a user", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"roles\": [\r\n {\r\n \"role\": \"{{operatorId}}\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/users/{{newUserId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "users", "{{newUserId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete a user", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/users/{{newUserId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "users", "{{newUserId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to manage users and roles](https://docs.microsoft.com/azure/iot-central/core/howto-manage-users-roles-with-rest-api)" }, { "name": "Manage organizations", "item": [ { "name": "Create an organization", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Seattle\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/organizations/{{organizationId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "organizations", "{{organizationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get an organization", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/organizations/{{organizationId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "organizations", "{{organizationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Update an organization", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Seattle Sales\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/organizations/{{organizationId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "organizations", "{{organizationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List organizations", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/organizations?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "organizations" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete an organization", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/organizations/{{organizationId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "organizations", "{{organizationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Add an API token to a node in an organization hierarchy", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"roles\": [\r\n {\r\n \"role\": \"84cc62c1-dabe-49d3-b16e-8b291232b285\",\r\n \"organization\": \"{{organizationId}}\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/apiTokens/{{tokenId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "apiTokens", "{{tokenId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Associate a user with a node in an organization hierarchy", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"{{newUserId}}\",\r\n \"type\": \"email\",\r\n \"roles\": [\r\n {\r\n \"role\": \"84cc62c1-dabe-49d3-b16e-8b291232b285\",\r\n \"organization\": \"{{organizationId}}\"\r\n }\r\n ],\r\n \"email\": \"user1@contoso.com\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/users/{{newUserId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "users", "{{newUserId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Add and associate a device to an organization ", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Thermostat device 001\",\r\n \"template\": \"{{deviceTemplateId}}\",\r\n \"simulated\": true,\r\n \"enabled\": true,\r\n \"organizations\": [\r\n \"{{organizationId}}\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Add and associate a device group to an organization ", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Device group 1\",\r\n \"description\": \"Custom device group.\",\r\n \"filter\": \"SELECT * FROM devices WHERE $template = \\\"{{deviceTemplateId}}}\\\" AND $provisioned = true\",\r\n \"organizations\": [\r\n \"{{organizationId}}\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceGroups/{{deviceGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceGroups", "{{deviceGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to manage organizations](https://docs.microsoft.com/azure/iot-central/core/howto-manage-organizations-with-rest-api)" }, { "name": "Data export", "item": [ { "name": "Create or update a destination", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"DataExport\",\r\n \"type\": \"blobstorage@v1\",\r\n \"authorization\": {\r\n \"type\": \"connectionString\",\r\n \"connectionString\": \"{{destBlobConnectionString}}\",\r\n \"containerName\": \"{{containerName}}\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/destinations/{{destinationId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "destinations", "{{destinationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Get a destination by ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/destinations/{{destinationId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "destinations", "{{destinationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "List destinations", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/destinations?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "destinations" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Patch a destination", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"connectionString\": \"{{destBlobConnectionString}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/destinations/{{destinationId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "destinations", "{{destinationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Delete a destination by ID", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/destinations/{{destinationId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "destinations", "{{destinationId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Create or update an export definition", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Enriched Export\",\r\n \"enabled\": true,\r\n \"source\": \"telemetry\",\r\n \"enrichments\": {\r\n \"Custom data\": {\r\n \"value\": \"My value\"\r\n }\r\n },\r\n \"destinations\": [\r\n {\r\n \"id\": \"{{destinationId}}\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/exports/{{exportId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "exports", "{{exportId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Get an export by ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/exports/{{exportId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "exports", "{{exportId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "List export definitions", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/exports?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "exports" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Patch an export definition", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"enrichments\": {\r\n \"Custom data\": {\r\n \"value\": \"My value 2\"\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/exports/{{exportId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "exports", "{{exportId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Delete an export definition", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dataExport/exports/{{exportId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dataExport", "exports", "{{exportId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to manage data exports](https://docs.microsoft.com/azure/iot-central/core/howto-manage-data-export-with-rest-api)" }, { "name": "Manage device templates", "item": [ { "name": "Add a device template", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Thermostat\",\r\n\r\n \"@id\": \"{{deviceTemplateId}}\",\r\n \"@type\": [\r\n \"ModelDefinition\",\r\n \"DeviceModel\"\r\n ],\r\n \"@context\": [\r\n \"dtmi:iotcentral:context;2\",\r\n \"dtmi:dtdl:context;2\"\r\n ],\r\n \"capabilityModel\": {\r\n \"@id\": \"dtmi:contoso:Thermostat;1\",\r\n \"@type\": \"Interface\",\r\n \"contents\": [\r\n {\r\n \"@type\": [\r\n \"Telemetry\",\r\n \"Temperature\"\r\n ],\r\n \"description\": \"Temperature in degrees Celsius.\",\r\n \"displayName\": \"Temperature\",\r\n \"name\": \"temperature\",\r\n \"schema\": \"double\",\r\n \"unit\": \"degreeCelsius\"\r\n },\r\n {\r\n \"@type\": [\r\n \"Property\",\r\n \"Temperature\"\r\n ],\r\n \"description\": \"Allows to remotely specify the desired target temperature.\",\r\n \"displayName\": \"Target Temperature\",\r\n \"name\": \"targetTemperature\",\r\n \"schema\": \"double\",\r\n \"unit\": \"degreeCelsius\",\r\n \"writable\": true,\r\n \"decimalPlaces\": 1,\r\n \"displayUnit\": \"C\",\r\n \"maxValue\": 80,\r\n \"minValue\": 50\r\n },\r\n {\r\n \"@type\": [\r\n \"Property\",\r\n \"Temperature\"\r\n ],\r\n \"description\": \"Returns the max temperature since last device reboot.\",\r\n \"displayName\": \"Max temperature since last reboot.\",\r\n \"name\": \"maxTempSinceLastReboot\",\r\n \"schema\": \"double\",\r\n \"unit\": \"degreeCelsius\"\r\n },\r\n {\r\n \"@type\": \"Command\",\r\n \"description\": \"This command returns the max, min and average temperature from the specified time to the current time.\",\r\n \"displayName\": \"Get report\",\r\n \"name\": \"getMaxMinReport\",\r\n \"request\": {\r\n \"@type\": \"CommandPayload\",\r\n \"description\": \"Period to return the max-min report.\",\r\n \"displayName\": \"Since\",\r\n \"name\": \"since\",\r\n \"schema\": \"dateTime\"\r\n },\r\n \"response\": {\r\n \"@type\": \"CommandPayload\",\r\n \"displayName\": \"Temperature Report\",\r\n \"name\": \"tempReport\",\r\n \"schema\": {\r\n \"@type\": \"Object\",\r\n \"fields\": [\r\n {\r\n \"displayName\": \"Max temperature\",\r\n \"name\": \"maxTemp\",\r\n \"schema\": \"double\"\r\n },\r\n {\r\n \"displayName\": \"Min temperature\",\r\n \"name\": \"minTemp\",\r\n \"schema\": \"double\"\r\n },\r\n {\r\n \"displayName\": \"Average Temperature\",\r\n \"name\": \"avgTemp\",\r\n \"schema\": \"double\"\r\n },\r\n {\r\n \"displayName\": \"Start Time\",\r\n \"name\": \"startTime\",\r\n \"schema\": \"dateTime\"\r\n },\r\n {\r\n \"displayName\": \"End Time\",\r\n \"name\": \"endTime\",\r\n \"schema\": \"dateTime\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"@type\": [\r\n \"Property\",\r\n \"Cloud\",\r\n \"StringValue\"\r\n ],\r\n \"displayName\": \"Customer Name\",\r\n \"name\": \"customerName\",\r\n \"schema\": \"string\"\r\n }\r\n ],\r\n \"description\": \"Reports current temperature and provides desired temperature control.\",\r\n \"displayName\": \"Thermostat\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates/{{deviceTemplateId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates", "{{deviceTemplateId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a device template", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates/{{deviceTemplateId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates", "{{deviceTemplateId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Update a device template", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"capabilityModel\": {\r\n \"contents\": [\r\n {\r\n \"@type\": [\r\n \"Telemetry\",\r\n \"Temperature\"\r\n ],\r\n \"description\": \"Temperature in degrees Celsius.\",\r\n \"displayName\": \"Temperature\",\r\n \"name\": \"temperature\",\r\n \"schema\": \"double\",\r\n \"unit\": \"degreeCelsius\"\r\n },\r\n {\r\n \"@type\": [\r\n \"Property\",\r\n \"Temperature\"\r\n ],\r\n \"description\": \"Allows to remotely specify the desired target temperature.\",\r\n \"displayName\": \"Target Temperature\",\r\n \"name\": \"targetTemperature\",\r\n \"schema\": \"double\",\r\n \"unit\": \"degreeCelsius\",\r\n \"writable\": true,\r\n \"decimalPlaces\": 1,\r\n \"displayUnit\": \"C\",\r\n \"maxValue\": 80.0,\r\n \"minValue\": 50.0\r\n },\r\n {\r\n \"@type\": [\r\n \"Property\",\r\n \"Temperature\"\r\n ],\r\n \"description\": \"Returns the max temperature since last device reboot.\",\r\n \"displayName\": \"Max temperature since last reboot.\",\r\n \"name\": \"maxTempSinceLastReboot\",\r\n \"schema\": \"double\",\r\n \"unit\": \"degreeCelsius\"\r\n },\r\n {\r\n \"@type\": \"Command\",\r\n \"description\": \"This command returns the max, min and average temperature from the specified time to the current time.\",\r\n \"displayName\": \"Get report\",\r\n \"name\": \"getMaxMinReport\",\r\n \"request\": {\r\n \"@type\": \"CommandPayload\",\r\n \"description\": \"Period to return the max-min report.\",\r\n \"displayName\": \"Since\",\r\n \"name\": \"since\",\r\n \"schema\": \"dateTime\"\r\n },\r\n \"response\": {\r\n \"@type\": \"CommandPayload\",\r\n \"displayName\": \"Temperature Report\",\r\n \"name\": \"tempReport\",\r\n \"schema\": {\r\n \"@type\": \"Object\",\r\n \"fields\": [\r\n {\r\n \"displayName\": \"Max temperature\",\r\n \"name\": \"maxTemp\",\r\n \"schema\": \"double\"\r\n },\r\n {\r\n \"displayName\": \"Min temperature\",\r\n \"name\": \"minTemp\",\r\n \"schema\": \"double\"\r\n },\r\n {\r\n \"displayName\": \"Average Temperature\",\r\n \"name\": \"avgTemp\",\r\n \"schema\": \"double\"\r\n },\r\n {\r\n \"displayName\": \"Start Time\",\r\n \"name\": \"startTime\",\r\n \"schema\": \"dateTime\"\r\n },\r\n {\r\n \"displayName\": \"End Time\",\r\n \"name\": \"endTime\",\r\n \"schema\": \"dateTime\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"@type\": [\r\n \"Property\",\r\n \"Cloud\",\r\n \"StringValue\"\r\n ],\r\n \"displayName\": \"Customer Name\",\r\n \"name\": \"customerName\",\r\n \"schema\": \"string\"\r\n },\r\n {\r\n \"@type\": [\r\n \"Property\",\r\n \"Cloud\",\r\n \"StringValue\"\r\n ],\r\n \"displayName\": \"Last Maintenance Date\",\r\n \"name\": \"LastMaintenanceDate\",\r\n \"schema\": \"dateTime\"\r\n }\r\n ],\r\n \"description\": \"Reports current temperature and provides desired temperature control.\",\r\n \"displayName\": \"Thermostat\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates/{{deviceTemplateId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates", "{{deviceTemplateId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete a device template", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates/{{deviceTemplateId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates", "{{deviceTemplateId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List device templates", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List device templates maxpagesize", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates?api-version={{dataPlanePreview}}&maxpagesize=10", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "maxpagesize", "value": "10" } ] } }, "response": [] }, { "name": "List device templates filter", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates?api-version={{dataPlanePreview}}&filter=contains(displayName, 'thermostat') eq false", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "filter", "value": "contains(displayName, 'thermostat') eq false" } ] } }, "response": [] }, { "name": "List device templates orderby", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates?api-version={{dataPlanePreview}}&orderby=displayName", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "orderby", "value": "displayName" } ] } }, "response": [] }, { "name": "List device templates filter & maxpagesize", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceTemplates?api-version={{dataPlanePreview}}&filter=contains(displayName, 'thermostat')&maxpagesize=2", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceTemplates" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "filter", "value": "contains(displayName, 'thermostat')" }, { "key": "maxpagesize", "value": "2" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to manage device templates](https://docs.microsoft.com/azure/iot-central/core/howto-manage-device-templates-with-rest-api)" }, { "name": "Deployment manifests", "item": [ { "name": "Add a deployment manifest", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"{{deploymentManifestId}}\",\r\n \"displayName\": \"Environmental sensor deployment manifest\",\r\n \"data\": {\r\n \"modulesContent\": {\r\n \"$edgeAgent\": {\r\n \"properties.desired\": {\r\n \"schemaVersion\": \"1.0\",\r\n \"runtime\": {\r\n \"type\": \"docker\",\r\n \"settings\": {\r\n \"minDockerVersion\": \"v1.25\",\r\n \"loggingOptions\": \"\",\r\n \"registryCredentials\": {}\r\n }\r\n },\r\n \"systemModules\": {\r\n \"edgeAgent\": {\r\n \"type\": \"docker\",\r\n \"settings\": {\r\n \"image\": \"mcr.microsoft.com/azureiotedge-agent:1.4\",\r\n \"createOptions\": \"{}\"\r\n }\r\n },\r\n \"edgeHub\": {\r\n \"type\": \"docker\",\r\n \"status\": \"running\",\r\n \"restartPolicy\": \"always\",\r\n \"settings\": {\r\n \"image\": \"mcr.microsoft.com/azureiotedge-hub:1.4\",\r\n \"createOptions\": \"{}\"\r\n }\r\n }\r\n },\r\n \"modules\": {\r\n \"SimulatedTemperatureSensor\": {\r\n \"version\": \"1.0\",\r\n \"type\": \"docker\",\r\n \"status\": \"running\",\r\n \"restartPolicy\": \"always\",\r\n \"settings\": {\r\n \"image\": \"mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0\",\r\n \"createOptions\": \"{}\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"$edgeHub\": {\r\n \"properties.desired\": {\r\n \"schemaVersion\": \"1.0\",\r\n \"routes\": {\r\n \"route\": \"FROM /* INTO $upstream\"\r\n },\r\n \"storeAndForwardConfiguration\": {\r\n \"timeToLiveSecs\": 7200\r\n }\r\n }\r\n },\r\n \"SimulatedTemperatureSensor\": {\r\n \"properties.desired\": {\r\n \"SendData\": true,\r\n \"SendInterval\": 10\r\n }\r\n }\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deploymentManifests/{{deploymentManifestId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deploymentManifests", "{{deploymentManifestId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Get a deployment manifest", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deploymentManifests/{{deploymentManifestId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deploymentManifests", "{{deploymentManifestId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Update a deployment manifest", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"data\": {\r\n \"modulesContent\": {\r\n \"SimulatedTemperatureSensor\": {\r\n \"properties.desired\": {\r\n \"SendInterval\": 30\r\n }\r\n }\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deploymentManifests/{{deploymentManifestId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deploymentManifests", "{{deploymentManifestId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "List deployment manifests", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deploymentManifests?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deploymentManifests" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Delete a deployment manifest", "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deploymentManifests/{{deploymentManifestId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deploymentManifests", "{{deploymentManifestId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Add an IoT Edge device without a deployment manifest Copy", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Edge device without an initial deployment manifest\",\r\n \"simulated\": false,\r\n \"enabled\": true,\r\n \"type\": [\"iotEdge\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{edgeDevice1}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{edgeDevice1}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Assign a deployment manifest to a device", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"data\": {\r\n \"modulesContent\": {\r\n \"$edgeAgent\": {\r\n \"properties.desired\": {\r\n \"schemaVersion\": \"1.0\",\r\n \"runtime\": {\r\n \"type\": \"docker\",\r\n \"settings\": {\r\n \"minDockerVersion\": \"v1.25\",\r\n \"loggingOptions\": \"\",\r\n \"registryCredentials\": {}\r\n }\r\n },\r\n \"systemModules\": {\r\n \"edgeAgent\": {\r\n \"type\": \"docker\",\r\n \"settings\": {\r\n \"image\": \"mcr.microsoft.com/azureiotedge-agent:1.4\",\r\n \"createOptions\": \"{}\"\r\n }\r\n },\r\n \"edgeHub\": {\r\n \"type\": \"docker\",\r\n \"status\": \"running\",\r\n \"restartPolicy\": \"always\",\r\n \"settings\": {\r\n \"image\": \"mcr.microsoft.com/azureiotedge-hub:1.4\",\r\n \"createOptions\": \"{}\"\r\n }\r\n }\r\n },\r\n \"modules\": {\r\n \"SimulatedTemperatureSensor\": {\r\n \"version\": \"1.0\",\r\n \"type\": \"docker\",\r\n \"status\": \"running\",\r\n \"restartPolicy\": \"always\",\r\n \"settings\": {\r\n \"image\": \"mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0\",\r\n \"createOptions\": \"{}\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"$edgeHub\": {\r\n \"properties.desired\": {\r\n \"schemaVersion\": \"1.0\",\r\n \"routes\": {\r\n \"route\": \"FROM /* INTO $upstream\"\r\n },\r\n \"storeAndForwardConfiguration\": {\r\n \"timeToLiveSecs\": 7200\r\n }\r\n }\r\n },\r\n \"SimulatedTemperatureSensor\": {\r\n \"properties.desired\": {\r\n \"SendData\": true,\r\n \"SendInterval\": 10\r\n }\r\n }\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{edgeDevice1}}/applyDeploymentManifest?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{edgeDevice1}}", "applyDeploymentManifest" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] } ] }, { "name": "Manage devices", "item": [ { "name": "Add a device", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Thermostat device 001\",\r\n \"template\": \"{{deviceTemplateId}}\",\r\n \"simulated\": true,\r\n \"enabled\": true\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a device", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get device credentials", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/credentials?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "credentials" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Update a device", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"enabled\": false \r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete a device", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List devices", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List devices maxpagesize", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices?api-version={{dataPlanePreview}}&maxpagesize=10", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "maxpagesize", "value": "10" } ] } }, "response": [] }, { "name": "List devices filter", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices?api-version={{dataPlanePreview}}&filter=provisioned eq true", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "filter", "value": "provisioned eq true" } ] } }, "response": [] }, { "name": "List devices orderby", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices?api-version={{dataPlanePreview}}&orderby=displayName", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "orderby", "value": "displayName" } ] } }, "response": [] }, { "name": "List devices filter & maxpagesize", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices?api-version={{dataPlanePreview}}&filter=contains(displayName, 'Thermostat')&maxpagesize=3", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" }, { "key": "filter", "value": "contains(displayName, 'Thermostat')" }, { "key": "maxpagesize", "value": "3" } ] } }, "response": [] }, { "name": "Add a device group", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Device group 1\",\r\n \"description\": \"Custom device group.\",\r\n \"filter\": \"SELECT * FROM devices WHERE $template = \\\"{{deviceTemplateId}}\\\" AND $provisioned = true\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceGroups/{{deviceGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceGroups", "{{deviceGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a device group", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceGroups/{{deviceGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceGroups", "{{deviceGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete a device group", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceGroups/{{deviceGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceGroups", "{{deviceGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List device groups", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceGroups?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceGroups" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Update a device group", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "{{Authorization}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"New group name\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceGroups/{{deviceGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceGroups", "{{deviceGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Add an X.509 enrollment group", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"My X.509 group\",\r\n \"enabled\": true,\r\n \"type\": \"iot\",\r\n \"attestation\": {\r\n \"type\": \"x509\"\r\n }\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Add an symmetric key enrollment group", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"My symmetricKey group\",\r\n \"enabled\": true,\r\n \"type\": \"iot\",\r\n \"attestation\": {\r\n \"type\": \"symmetricKey\"\r\n }\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Add an X509 certificate to a enrollment group", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"verified\": false,\r\n \"certificate\": \"{{base64-certificate}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}/certificates/{{entry}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}", "certificates", "{{entry}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Generate Verification Code for X509 certificate of an enrollment group", "request": { "method": "POST", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}/certificates/{{entry}}/generateVerificationCode?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}", "certificates", "{{entry}}", "generateVerificationCode" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Verify X509 certificate of an enrollment group", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"certificate\": \"{{base64-verification-certificate}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}/certificates/{{entry}}/verify?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}", "certificates", "{{entry}}", "verify" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get an enrollment group", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"My group\",\r\n \"enabled\": true,\r\n \"type\": \"iot\",\r\n \"attestation\": {\r\n \"type\": \"x509\"\r\n }\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a X509 certificate of an enrollment group", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}/certificates/{{entry}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}", "certificates", "{{entry}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Update an enrollment group", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"My updated group\"\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List enrollment groups", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"My group\",\r\n \"enabled\": true,\r\n \"type\": \"iot\",\r\n \"attestation\": {\r\n \"type\": \"x509\"\r\n }\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete an enrollment group", "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"My group\",\r\n \"enabled\": true,\r\n \"type\": \"iot\",\r\n \"attestation\": {\r\n \"type\": \"x509\"\r\n }\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete a X509 certificate from an enrollment group", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/enrollmentGroups/{{enrollmentGroupId}}/certificates/{{entry}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "enrollmentGroups", "{{enrollmentGroupId}}", "certificates", "{{entry}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to manage devices](https://docs.microsoft.com/azure/iot-central/core/howto-manage-devices-with-rest-api)" }, { "name": "Control devices", "item": [ { "name": "Get a device component", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/components?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "components" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a device module", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/modules?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "modules" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get telemetry - no components", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/telemetry/{{telemetryName}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "telemetry", "{{telemetryName}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get telemetry - with components", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/components/{{componentName}}/telemetry/{{telemetryName}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "components", "{{componentName}}", "telemetry", "{{telemetryName}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get property - no components", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/properties?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "properties" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Write properties - no component ", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"{{propertyName}}\": 65.5\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/properties?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "properties" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Write properties - Module ", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"{{propertyName}}\": 65.5\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/modules/{{moduleName}}/properties?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "modules", "{{moduleName}}", "properties" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Write properties - Component ", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"{{propertyName}}\": 65.5\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/components/{{componentId}}/properties?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "components", "{{componentId}}", "properties" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get properties from a module ", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/modules/{{moduleName}}/properties?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "modules", "{{moduleName}}", "properties" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get properties from a component in a module ", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/modules/{{moduleName}}/components/{{componentName}}/properties?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "modules", "{{moduleName}}", "components", "{{componentName}}", "properties" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Call command - no component ", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"request\": \"2021-06-24T12:55:20.789Z\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/commands/{{commandName}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "commands", "{{commandName}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get Call command - no component ", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/commands/{{commandName}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "commands", "{{commandName}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Call command - with component ", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"request\": \"2021-06-24T12:55:20.789Z\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/components/{{componentName}}/commands/{{commandName}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "components", "{{componentName}}", "commands", "{{commandName}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get Call command - with component ", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/devices/{{deviceId}}/components/{{componentName}}/commands/{{commandName}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "devices", "{{deviceId}}", "components", "{{componentName}}", "commands", "{{commandName}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more see [How to use the IoT Central REST API to control devices](https://docs.microsoft.com/azure/iot-central/core/howto-control-devices-with-rest-api)" }, { "name": "Manage jobs", "item": [ { "name": "List jobs", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a job by Id", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{jobId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{jobId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get devices in a job", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{jobId}}/devices?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{jobId}}", "devices" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Add a device group", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Device group 1\",\r\n \"description\": \"Custom device group.\",\r\n \"filter\": \"SELECT * FROM devices WHERE $template = \\\"{{deviceTemplateId}}\\\" AND $provisioned = true\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/deviceGroups/{{deviceGroupId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "deviceGroups", "{{deviceGroupId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Create a job", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"New Job\",\r\n \"group\": \"{{deviceGroupId}}\",\r\n \"data\": [\r\n {\r\n \"type\": \"cloudProperty\",\r\n \"target\": \"{{deviceTemplateId}}\",\r\n \"path\": \"customerName\",\r\n \"value\": \"Contoso\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{jobId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{jobId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Stop a job", "request": { "method": "POST", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{jobId}}/stop?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{jobId}}", "stop" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Resume a job", "request": { "method": "POST", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{jobId}}/resume?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{jobId}}", "resume" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Rerun a job", "request": { "method": "PUT", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{jobId}}/rerun/rerun-01?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{jobId}}", "rerun", "rerun-01" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Schedule a Job", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"New Scheduled Job\",\r\n \"group\": {{deviceGroupId}},\r\n \"data\": [\r\n {\r\n \"type\": \"cloudProperty\",\r\n \"target\": {{deviceTemplateId}},\r\n \"path\": \"Company\",\r\n \"value\": \"Contoso\"\r\n }\r\n ],\r\n \"schedule\": {\r\n \"start\": \"2022-10-24T22:29:01Z\",\r\n \"recurrence\": \"daily\",\r\n \"end\": {\r\n \"type\": \"date\",\r\n \"date\": \"2022-12-30\"\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{scheduledJobId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{scheduledJobId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Get a scheduled job by Id", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/scheduledJobs/{{scheduledJobId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "scheduledJobs", "{{scheduledJobId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "List Scheduled jobs", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/scheduledJobs?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "scheduledJobs" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Update a schedule Job", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"schedule\": {\r\n \"start\": \"2022-10-24T22:29:01Z\",\r\n \"recurrence\": \"weekly\"\r\n }\r\n}\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/jobs/{{scheduledJobId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "jobs", "{{scheduledJobId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Delete a scheduled job by Id", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/scheduledJobs/{{scheduledJobId}}?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "scheduledJobs", "{{scheduledJobId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to create and manage jobs](https://docs.microsoft.com/azure/iot-central/core/howto-manage-jobs-with-rest-api)" }, { "name": "Manage applications", "item": [ { "name": "List applications", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/providers/Microsoft.IoTCentral/iotApps?api-version={{controlPlaneGA}}", "protocol": "https", "host": [ "management", "azure", "com" ], "path": [ "subscriptions", "{{subscriptionId}}", "providers", "Microsoft.IoTCentral", "iotApps" ], "query": [ { "key": "api-version", "value": "{{controlPlaneGA}}" } ] } }, "response": [] }, { "name": "List applications in a resource group", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.IoTCentral/iotApps?api-version={{controlPlaneGA}}", "protocol": "https", "host": [ "management", "azure", "com" ], "path": [ "subscriptions", "{{subscriptionId}}", "resourceGroups", "{{resourceGroupName}}", "providers", "Microsoft.IoTCentral", "iotApps" ], "query": [ { "key": "api-version", "value": "{{controlPlaneGA}}" } ] } }, "response": [] }, { "name": "Get an indiviudal application", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.IoTCentral/iotApps/{{applicationName}}?api-version={{controlPlaneGA}}", "protocol": "https", "host": [ "management", "azure", "com" ], "path": [ "subscriptions", "{{subscriptionId}}", "resourceGroups", "{{resourceGroupName}}", "providers", "Microsoft.IoTCentral", "iotApps", "{{applicationName}}" ], "query": [ { "key": "api-version", "value": "{{controlPlaneGA}}" } ] } }, "response": [] }, { "name": "Create an IoT Central application", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" }, { "key": "password", "value": "{{BEARER_TOKEN}}", "type": "string" } ] }, "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"location\": \"eastus\",\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"properties\": {\r\n \"displayName\": \"Contoso IoT Central App\",\r\n \"subdomain\": \"{{applicationName}}\",\r\n \"template\": \"iotc-pnp-preview@1.0.0\"\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.IoTCentral/iotApps/{{applicationName}}?api-version={{controlPlaneGA}}", "protocol": "https", "host": [ "management", "azure", "com" ], "path": [ "subscriptions", "{{subscriptionId}}", "resourceGroups", "{{resourceGroupName}}", "providers", "Microsoft.IoTCentral", "iotApps", "{{applicationName}}" ], "query": [ { "key": "api-version", "value": "{{controlPlaneGA}}" } ] } }, "response": [] }, { "name": "Modify an IoT Central application", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" }, { "key": "password", "value": "{{BEARER_TOKEN}}", "type": "string" } ] }, "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"properties\": {\r\n \"displayName\": \"Contoso IoT Central App\"\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.IoTCentral/iotApps/{{applicationName}}?api-version={{controlPlaneGA}}", "protocol": "https", "host": [ "management", "azure", "com" ], "path": [ "subscriptions", "{{subscriptionId}}", "resourceGroups", "{{resourceGroupName}}", "providers", "Microsoft.IoTCentral", "iotApps", "{{applicationName}}" ], "query": [ { "key": "api-version", "value": "{{controlPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete an IoT Central application", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{BearerToken}}", "type": "string" }, { "key": "password", "value": "{{BEARER_TOKEN}}", "type": "string" } ] }, "method": "DELETE", "header": [], "url": { "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.IoTCentral/iotApps/{{applicationName}}?api-version={{controlPlaneGA}}", "protocol": "https", "host": [ "management", "azure", "com" ], "path": [ "subscriptions", "{{subscriptionId}}", "resourceGroups", "{{resourceGroupName}}", "providers", "Microsoft.IoTCentral", "iotApps", "{{applicationName}}" ], "query": [ { "key": "api-version", "value": "{{controlPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more, see [Use the REST API to create and manage IoT Central applications](https://docs.microsoft.com/azure/iot-central/core/howto-manage-iot-central-with-rest-api)" }, { "name": "File upload storage configuration", "item": [ { "name": "Add a storage configuration", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "let subscriptionId = pm.collectionVariables.get(\"subscriptionId\");\r", "let resourceGroupName = pm.collectionVariables.get(\"resourceGroupNameFileUploads\");\r", "let accountName = pm.collectionVariables.get(\"accountName\");\r", "let storageControlPlaneGA = pm.collectionVariables.get(\"storageControlPlaneGA\");\r", "let storageAccountcontainerName = pm.collectionVariables.get(\"storageAccountcontainerName\");\r", "let bearerToken = \"Bearer \" + pm.collectionVariables.get(\"BearerToken\");\r", "\r", "// Create a resource group\r", "const resourceGroupURL = pm.collectionVariables.replaceIn(\"https://management.azure.com/subscriptions/{{subscriptionId}}/resourcegroups/{{resourceGroupName}}?api-version=2021-04-01\");\r", "const putResourceGroup = {\r", " url: resourceGroupURL,\r", " method: 'PUT',\r", " header: {\r", " 'Content-Type': 'application/json',\r", " 'Authorization': bearerToken\r", " },\r", " body: {\r", " mode: 'raw',\r", " raw: JSON.stringify({\r", " \"location\": \"eastus\"\r", " })\r", " }\r", "};\r", "const getResourceGroup = {\r", " url: resourceGroupURL,\r", " method: 'GET',\r", " header: {\r", " 'Content-Type': 'application/json',\r", " 'Authorization': bearerToken\r", " }\r", "};\r", "\r", "// Create a storage account\r", "const createStorageRequestURL = pm.collectionVariables.replaceIn(\"https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.Storage/storageAccounts/{{accountName}}?api-version={{storageControlPlaneGA}}\");\r", "const putCreateStorageRequest = {\r", " url: createStorageRequestURL,\r", " method: 'PUT',\r", " header: {\r", " 'Content-Type': 'application/json',\r", " 'Authorization': bearerToken\r", " },\r", " body: {\r", " mode: 'raw',\r", " raw: JSON.stringify({\r", " \"kind\": \"BlockBlobStorage\",\r", " \"location\": \"eastus\",\r", " \"sku\": {\r", " \"name\": \"Premium_LRS\"\r", " }\r", " })\r", " }\r", "};\r", "\r", "// Get storage account key and set variable\r", "const getStorageKeyURL = pm.collectionVariables.replaceIn(\"https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.Storage/storageAccounts/{{accountName}}/listKeys?api-version={{storageControlPlaneGA}}\");\r", "const postGetStorageKeys = {\r", " url: getStorageKeyURL,\r", " method: 'POST',\r", " header: {\r", " 'Content-Type': 'application/json',\r", " 'Authorization': bearerToken\r", " },\r", " body: {\r", " mode: 'raw',\r", " raw: JSON.stringify({\r", " \"kind\": \"BlockBlobStorage\",\r", " \"location\": \"eastus\",\r", " \"sku\": {\r", " \"name\": \"Premium_LRS\"\r", " }\r", " })\r", " }\r", "};\r", "\r", "// Create a storage container\r", "const createStorageContainerRequestURL = pm.collectionVariables.replaceIn(\"https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.Storage/storageAccounts/{{accountName}}/blobServices/default/containers/{{storageAccountcontainerName}}?api-version={{storageControlPlaneGA}}\");\r", "const putCreateStorageContainerRequest = {\r", " url: createStorageContainerRequestURL,\r", " method: 'PUT',\r", " header: {\r", " 'Content-Type': 'application/json',\r", " 'Authorization': bearerToken\r", " },\r", " body: {\r", " mode: 'raw',\r", " raw: JSON.stringify({\r", " \"kind\": \"BlockBlobStorage\",\r", " \"location\": \"eastus\",\r", " \"sku\": {\r", " \"name\": \"Premium_LRS\"\r", " }\r", " })\r", " }\r", "};\r", "\r", "\r", "// Create the resource group\r", "console.log(\"Creating resource group...\");\r", "pm.sendRequest(putResourceGroup, (error, response) => {\r", " if (error) {\r", " console.log(error);\r", " } else {\r", " createStorageAccount();\r", " }\r", "});\r", "\r", "function createStorageAccount()\r", "{\r", " console.log(\"Waiting for resource group creation...\");\r", " var retryDelay = 10000;\r", " var retryLimit = 10;\r", "\r", " function isProcessingComplete(retryCount) {\r", " pm.sendRequest(getResourceGroup, (error, response) => {\r", " if (error) {\r", " console.log(error);\r", " } else {\r", " var jsonData = response.json();\r", " if (jsonData.properties.provisioningState == 'Succeeded') {\r", " // Get the storage account key we need\r", " console.log(\"Resource group ready. Creating storage account...\");\r", " pm.sendRequest(putCreateStorageRequest, (error, response) => {\r", " if (error) {\r", " console.log(error);\r", " } else {\r", " console.log(\"Created storage account\")\r", " getAccountKey();\r", " }\r", " });\r", " } else {\r", " if (retryCount < retryLimit) {\r", " console.log('Resource group not ready yet. Retrying in ' + retryDelay + 'ms');\r", " setTimeout(function() {\r", " isProcessingComplete(++retryCount);\r", " }, retryDelay);\r", " } else {\r", " console.log('Retry limit reached, giving up.');\r", " }\r", " }\r", " }\r", " });\r", " }\r", " isProcessingComplete(1);\r", "}\r", "\r", "function getAccountKey()\r", "{\r", " console.log('Waiting for storage account to be ready...');\r", " var retryDelay = 5000;\r", " var retryLimit = 10;\r", "\r", " function isProcessingComplete(retryCount) {\r", " pm.sendRequest(postGetStorageKeys, (error, response) => {\r", " if (error) {\r", " console.log(error);\r", " } else {\r", " var jsonData = response.json();\r", " if (jsonData.error) {\r", " if (retryCount < retryLimit) {\r", " console.log('Storage account not ready yet. Retrying in ' + retryDelay + 'ms');\r", " setTimeout(function() {\r", " isProcessingComplete(++retryCount);\r", " }, retryDelay);\r", " } else {\r", " console.log('Retry limit reached, giving up.');\r", " }\r", " } else {\r", " // Get the storage account key we need\r", " console.log(\"Storage account is ready. Setting accountKey collection variable...\");\r", " var jsonData = response.json();\r", " pm.collectionVariables.set(\"accountKey\", jsonData.keys[0].value);\r", " console.log(\"accountKey collection variable set!\");\r", "\r", " // Create the container\r", " pm.sendRequest(putCreateStorageContainerRequest, (error, response) => {\r", " if (error){\r", " console.log(error);\r", " } else {\r", " console.log(\"Created storage container\");\r", " }\r", " });\r", " }\r", " }\r", " });\r", " }\r", " isProcessingComplete(1);\r", "}\r", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"account\": \"{{accountName}}\",\r\n \"connectionString\": \"DefaultEndpointsProtocol=https;AccountName={{accountName}};AccountKey={{accountKey}};BlobEndpoint=https://{{accountName}}.blob.core.windows.net/\",\r\n \"container\": \"{{storageAccountcontainerName}}\",\r\n \"sasTtl\": \"PT1H\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/fileUploads?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "fileUploads" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] }, "description": "This example uses a pre-request script that sets up the prerequisites for the call. The script:\n\n- Creates a resource group\n- Creates a storage account\n- Adds the storage account key to a collection variable\n- Creates a blob container" }, "response": [] }, { "name": "Get storage configuration", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/fileUploads?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "fileUploads" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Update a storage configuration", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"connectionString\": \"DefaultEndpointsProtocol=https;AccountName={{accountName}};AccountKey={{accountKey}};BlobEndpoint=https://{{accountName}}.blob.core.windows.net/\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/fileUploads?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "fileUploads" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] }, { "name": "Delete storage configuration", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/fileUploads?api-version={{dataPlaneGA}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "fileUploads" ], "query": [ { "key": "api-version", "value": "{{dataPlaneGA}}" } ] } }, "response": [] } ], "description": "To learn more, see [How to use the IoT Central REST API to upload a file](https://docs.microsoft.com/azure/iot-central/core/howto-upload-file-rest-api)" }, { "name": "Manage dashboards", "item": [ { "name": "Add a dashboard", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Example custom dashboard\",\r\n \"tiles\": [\r\n {\r\n \"displayName\": \"Average Temperature\",\r\n \"configuration\": {\r\n \"type\": \"lineChart\",\r\n \"capabilities\": [\r\n {\r\n \"capability\": \"temperature\",\r\n \"aggregateFunction\": \"avg\"\r\n }\r\n ],\r\n \"devices\": [\r\n \"{{deviceId}}\"\r\n ],\r\n \"group\": \"{{deviceGroupId}}\",\r\n \"format\": {\r\n \"xAxisEnabled\": true,\r\n \"yAxisEnabled\": true,\r\n \"legendEnabled\": true\r\n },\r\n \"queryRange\": {\r\n \"type\": \"time\",\r\n \"duration\": \"PT30M\",\r\n \"resolution\": \"PT1M\"\r\n }\r\n },\r\n \"x\": 0,\r\n \"y\": 0,\r\n \"width\": 2,\r\n \"height\": 2\r\n },\r\n {\r\n \"displayName\": \"LKV - temperature\",\r\n \"configuration\": {\r\n \"type\": \"lkv\",\r\n \"capabilities\": [\r\n {\r\n \"capability\": \"temperature\",\r\n \"aggregateFunction\": \"avg\"\r\n }\r\n ],\r\n \"group\": \"{{deviceGroupId}}\",\r\n \"devices\": [\r\n \"{{deviceId}}\"\r\n ],\r\n \"format\": {\r\n \"abbreviateValue\": false,\r\n \"wordWrap\": false,\r\n \"textSize\": 24\r\n }\r\n },\r\n \"x\": 2,\r\n \"y\": 0,\r\n \"width\": 2,\r\n \"height\": 1\r\n },\r\n {\r\n \"displayName\": \"Documentation\",\r\n \"configuration\": {\r\n \"type\": \"markdown\",\r\n \"description\": \"Comprehensive help articles and links to more support.\",\r\n \"href\": \"https://aka.ms/iotcentral-pnp-docs\"\r\n },\r\n \"x\": 3,\r\n \"y\": 1,\r\n \"width\": 1,\r\n \"height\": 1\r\n }\r\n ],\r\n \"favorite\": false\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dashboards/{{dashboardId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dashboards", "{{dashboardId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Update a dashboard", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"displayName\": \"Updated example custom dashboard\",\r\n \"favorite\": true\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dashboards/{{dashboardId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dashboards", "{{dashboardId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Get a dashboard", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dashboards/{{dashboardId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dashboards", "{{dashboardId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "List Dashboards", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dashboards?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dashboards" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] }, { "name": "Delete a dashboard", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{yourAppSubdomain}}.azureiotcentral.com/api/dashboards/{{dashboardId}}?api-version={{dataPlanePreview}}", "protocol": "https", "host": [ "{{yourAppSubdomain}}", "azureiotcentral", "com" ], "path": [ "api", "dashboards", "{{dashboardId}}" ], "query": [ { "key": "api-version", "value": "{{dataPlanePreview}}" } ] } }, "response": [] } ] } ], "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{adminToken}}", "type": "string" }, { "key": "key", "value": "Authorization", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "yourAppSubdomain", "value": "Add your IoT Central app subdomain", "type": "default" }, { "key": "adminToken", "value": "Add your IoT Central admin auth token", "type": "default" }, { "key": "subscriptionId", "value": "Add your Azure subscription ID", "type": "default" }, { "key": "destBlobConnectionString", "value": "Add your blob connection string for data export", "type": "string" }, { "key": "BearerToken", "value": "Add your bearer token ", "type": "default" }, { "key": "applicationName", "value": "Add your new IoT Central app name", "type": "default" }, { "key": "accountName", "value": "Add the name of your storage account for file uploads", "type": "string" }, { "key": "accountKey", "value": "Run \"Storage accounts - list keys\" to set this variable", "type": "string" }, { "key": "base64-certificate", "value": "Add your base-64 encoded certificate", "type": "string" }, { "key": "base64-verification-certificate", "value": "Add your base64-verification-certificate", "type": "string" }, { "key": "newUserId", "value": "user-001", "type": "string" }, { "key": "operatorId", "value": "ae2c9854-393b-4f97-8c42-479d70ce626e", "type": "string" }, { "key": "builderId", "value": "344138e9-8de4-4497-8c54-5237e96d6aaf", "type": "string" }, { "key": "administratorId", "value": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", "type": "string" }, { "key": "organizationId", "value": "seattle-org", "type": "default" }, { "key": "destinationId", "value": "dest-001", "type": "default" }, { "key": "containerName", "value": "exportdestination", "type": "string" }, { "key": "exportId", "value": "export-001", "type": "default" }, { "key": "deviceTemplateId", "value": "dtmi:contoso:mythermostattemplate;1", "type": "default" }, { "key": "deploymentManifestId", "value": "envsensorv1", "type": "string" }, { "key": "deviceId", "value": "therm-001", "type": "default" }, { "key": "telemetryName", "value": "temperature", "type": "default" }, { "key": "componentName", "value": "thermostat1", "type": "default" }, { "key": "jobId", "value": "job-001", "type": "default" }, { "key": "deviceGroupId", "value": "device-group-01" }, { "key": "resourceGroupName", "value": "centralrg", "type": "string" }, { "key": "resourceGroupNameFileUploads", "value": "fileuploadsrg", "type": "string" }, { "key": "storageAccountcontainerName", "value": "centralfileuploads" }, { "key": "dataPlaneGA", "value": "2022-07-31", "type": "string" }, { "key": "dataPlanePreview", "value": "2022-10-31-preview", "type": "string" }, { "key": "controlPlaneGA", "value": "2021-06-01", "type": "string" }, { "key": "storageControlPlaneGA", "value": "2021-09-01", "type": "string" }, { "key": "tokenId", "value": "token-001", "type": "string" }, { "key": "propertyName", "value": "maxTempSinceLastReboot", "type": "string" }, { "key": "moduleName", "value": "SimulatedTemperatureSensor", "type": "string" }, { "key": "commandName", "value": "getMaxMinReport", "type": "string" }, { "key": "scheduledJobId", "value": "scheduled-job-001", "type": "string" }, { "key": "enrollmentGroupId", "value": "enrollmentGroupId-001", "type": "string" }, { "key": "entry", "value": "primary", "type": "string" }, { "key": "componentId", "value": "componentId-001", "type": "string" }, { "key": "dashboardId", "value": "dtmi:kkfvwa2xi:p7pyt5x3o", "type": "string" }, { "key": "edgeDevice1", "value": "edge-device-01", "type": "string" } ] }