{ "swagger": "2.0", "info": { "title": "Azure IoT Central", "description": "Azure IoT Central is a service that makes it easy to connect, monitor, and manage your IoT devices at scale.", "version": "2022-07-31" }, "x-ms-parameterized-host": { "hostTemplate": "{subdomain}.{baseDomain}", "parameters": [ { "$ref": "#/parameters/BaseDomain" }, { "$ref": "#/parameters/Subdomain" } ] }, "basePath": "/api", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "definitions": { "ADGroupUser": { "description": "The active directory group user definition.", "x-ms-discriminator-value": "adGroup", "allOf": [ { "$ref": "#/definitions/User" } ], "type": "object", "properties": { "tenantId": { "description": "The AAD tenant ID of the AD Group.", "type": "string" }, "objectId": { "description": "The AAD object ID of the AD Group.", "type": "string" } }, "required": [ "tenantId", "objectId" ] }, "AnyValue": { "description": "Can be anything: string, number, array, object, etc. (except `null`)" }, "ApiToken": { "description": "The API access token definition.", "allOf": [ { "$ref": "#/definitions/Permission" } ], "type": "object", "properties": { "id": { "description": "Unique ID of the API token.", "type": "string", "readOnly": true }, "token": { "description": "Value of the API token.", "type": "string", "readOnly": true }, "expiry": { "description": "String-formatted date representing the time when the token expires.", "type": "string", "format": "date-time" } } }, "ApiTokenCollection": { "description": "The paged results of API tokens.", "type": "object", "properties": { "value": { "description": "The collection of API tokens.", "type": "array", "items": { "$ref": "#/definitions/ApiToken" } }, "nextLink": { "description": "URL to get the next page of API tokens.", "type": "string" } }, "required": [ "value" ] }, "Attestation": { "description": "The attestation definition.", "type": "object", "properties": { "type": { "description": "Type of the attestation.", "type": "string" } }, "required": [ "type" ], "discriminator": "type" }, "CapabilityJobData": { "description": "The capability job data definition.", "type": "object", "properties": { "target": { "description": "The device template which defines the target capability for the job.", "type": "string", "minLength": 1 }, "path": { "description": "The path to the target capability within the device template.", "type": "string" }, "value": { "description": "The value used to update the target capability, if any.", "$ref": "#/definitions/AnyValue" } }, "required": [ "target", "path" ] }, "CloudPropertyJobData": { "description": "The cloud property job data.", "x-ms-discriminator-value": "cloudProperty", "allOf": [ { "$ref": "#/definitions/JobData" }, { "$ref": "#/definitions/CapabilityJobData" } ] }, "Collection": { "description": "The paged results of entities.", "type": "object", "properties": { "value": { "description": "The collection of entities.", "type": "array", "items": { "type": "object" } }, "nextLink": { "description": "URL to get the next page of entities.", "type": "string" } }, "required": [ "value" ] }, "CommandJobData": { "description": "The command job data definition.", "x-ms-discriminator-value": "command", "allOf": [ { "$ref": "#/definitions/JobData" }, { "$ref": "#/definitions/CapabilityJobData" } ] }, "DateJobScheduleEnd": { "description": "The date based end definition of job schedule.", "x-ms-discriminator-value": "date", "allOf": [ { "$ref": "#/definitions/JobScheduleEnd" } ], "type": "object", "properties": { "date": { "description": "The date when to end the scheduled job.", "type": "string", "format": "date" } }, "required": [ "date" ] }, "Device": { "description": "The device definition.", "type": "object", "properties": { "id": { "description": "Unique ID of the device.", "type": "string", "readOnly": true }, "etag": { "description": "ETag used to prevent conflict in device updates.", "type": "string" }, "displayName": { "description": "Display name of the device.", "type": "string" }, "template": { "description": "The device template definition for the device.", "type": "string" }, "enabled": { "description": "Whether the device connection to IoT Central has been enabled.", "type": "boolean" }, "provisioned": { "description": "Whether resources have been allocated for the device.", "type": "boolean", "readOnly": true }, "simulated": { "description": "Whether the device is simulated.", "type": "boolean" }, "organizations": { "description": "List of organization IDs that the device is a part of, only one organization is supported today, multiple organizations will be supported soon.", "type": "array", "items": { "type": "string" } } } }, "DeviceCollection": { "description": "The paged results of devices.", "type": "object", "properties": { "value": { "description": "The collection of devices.", "type": "array", "items": { "$ref": "#/definitions/Device" } }, "nextLink": { "description": "URL to get the next page of devices.", "type": "string" } }, "required": [ "value" ] }, "DeviceCommand": { "description": "The device command definition.", "type": "object", "properties": { "id": { "description": "The request ID of the device command execution.", "type": "string", "readOnly": true }, "connectionTimeout": { "description": "Connection timeout in seconds to wait for a disconnected device to come online. Defaults to 0 seconds.", "type": "integer", "format": "int32", "minimum": 0, "maximum": 30 }, "responseTimeout": { "description": "Response timeout in seconds to wait for a command completion on a device. Defaults to 30 seconds.", "type": "integer", "format": "int32", "minimum": 5, "maximum": 30 }, "request": { "description": "The payload for the device command, support any primitive types or object." }, "response": { "description": "The payload of the device command response, support any primitive types or object.", "readOnly": true }, "responseCode": { "description": "The status code of the device command response.", "type": "integer", "format": "int32", "readOnly": true } } }, "DeviceCommandCollection": { "description": "The paged results of device command executions.", "type": "object", "properties": { "value": { "description": "The collection of device command executions.", "type": "array", "items": { "$ref": "#/definitions/DeviceCommand" } }, "nextLink": { "description": "URL to get the next page of device command executions.", "type": "string" } }, "required": [ "value" ] }, "DeviceCredentials": { "description": "The device credentials definition.", "type": "object", "properties": { "idScope": { "description": "ID scope for connecting to the IoT Central application.", "type": "string" }, "symmetricKey": { "description": "The symmetric key credentials for the device.", "$ref": "#/definitions/SymmetricKey" }, "x509": { "description": "The X.509 credential information for the device.", "$ref": "#/definitions/X509" }, "tpm": { "description": "The TPM credentials for the device.", "$ref": "#/definitions/Tpm" } }, "required": [ "idScope" ] }, "DeviceGroup": { "description": "The device group definition.", "type": "object", "properties": { "id": { "description": "Unique ID of the device group.", "type": "string", "readOnly": true }, "displayName": { "description": "Display name of the device group.", "type": "string" }, "filter": { "description": "Query defining which devices should be in this group, [Query Language Reference](https://aka.ms/iotcquery).", "type": "string" }, "description": { "description": "Short summary of device group.", "type": "string" }, "etag": { "description": "ETag used to prevent conflict in device group updates.", "type": "string" }, "organizations": { "description": "List of organization IDs of the device group, only one organization is supported today, multiple organizations will be supported soon.", "type": "array", "items": { "type": "string" } } }, "required": [ "displayName", "filter" ] }, "DeviceGroupCollection": { "description": "The paged results of device groups.", "type": "object", "properties": { "value": { "description": "The collection of device groups.", "type": "array", "items": { "$ref": "#/definitions/DeviceGroup" } }, "nextLink": { "description": "URL to get the next page of device groups.", "type": "string" } }, "required": [ "value" ] }, "DeviceGroupDeviceCollection": { "description": "The paged results of devices belonging to the device group.", "type": "object", "properties": { "value": { "description": "The collection of devices belonging to the device group.", "type": "array", "items": { "$ref": "#/definitions/Device" } }, "nextLink": { "description": "URL to get the next page of devices in the group.", "type": "string" } }, "required": [ "value" ] }, "DeviceProperties": { "description": "Property values associated with the device.", "type": "object", "additionalProperties": true }, "DeviceRelationship": { "type": "object", "description": "An object representing the relationship between an upstream and a downstream device.", "properties": { "id": { "description": "The unique identifier of this relationship.", "type": "string", "readOnly": true }, "source": { "description": "The device ID of the source (parent) device.", "type": "string" }, "target": { "description": "The device ID of the target (child) device.", "type": "string" } } }, "DeviceRelationshipCollection": { "description": "The paged results of device relationships.", "type": "object", "properties": { "value": { "description": "The collection of device relationships.", "type": "array", "items": { "$ref": "#/definitions/DeviceRelationship" } }, "nextLink": { "description": "URL to get the next page of device relationships.", "type": "string" } }, "required": [ "value" ] }, "DeviceTelemetry": { "description": "The device telemetry definition.", "type": "object", "properties": { "value": { "description": "The last known value of this device telemetry." }, "timestamp": { "description": "String-formatted date representing the time when the telemetry value was sent.", "type": "string", "format": "date-time" } } }, "DeviceTemplate": { "description": "The device template definition.", "type": "object", "properties": { "@id": { "description": "Unique ID of the device template.", "type": "string", "readOnly": true }, "@type": { "description": "The JSON-LD types of this device template.", "type": "array", "items": { "type": "string" } }, "etag": { "description": "ETag used to prevent conflict in device template updates.", "type": "string" }, "displayName": { "description": "Display name of the device template.", "type": "string" }, "description": { "description": "Detailed description of the device template.", "type": "string" }, "capabilityModel": { "description": "The capability model utilized by this device template.", "type": "object" } }, "required": [ "@type", "capabilityModel" ] }, "DeviceTemplateCollection": { "description": "The paged results of device templates.", "type": "object", "properties": { "value": { "description": "The collection of device templates.", "type": "array", "items": { "$ref": "#/definitions/DeviceTemplate" } }, "nextLink": { "description": "URL to get the next page of device templates.", "type": "string" } }, "required": [ "value" ] }, "DeviceTemplateMigrationJobData": { "description": "The device template migration job data definition.", "x-ms-discriminator-value": "deviceTemplateMigration", "allOf": [ { "$ref": "#/definitions/JobData" } ], "type": "object", "properties": { "template": { "description": "The target device template to which devices will be migrated.", "type": "string", "minLength": 1 } }, "required": [ "template" ] }, "EmailUser": { "description": "The email user definition.", "x-ms-discriminator-value": "email", "allOf": [ { "$ref": "#/definitions/User" } ], "type": "object", "properties": { "email": { "description": "Email address of the user.", "type": "string" } }, "required": [ "email" ] }, "EnrollmentGroup": { "description": "The enrollment group definition.", "type": "object", "properties": { "id": { "description": "Unique ID of the enrollment group.", "type": "string", "readOnly": true }, "displayName": { "description": "Display name of the enrollment group.", "type": "string" }, "enabled": { "description": "Whether the devices using the group are allowed to connect to IoT Central.", "type": "boolean", "default": true }, "type": { "description": "Type of devices that connect through the group.", "type": "string", "enum": [ "iot", "iotEdge" ], "x-ms-enum": { "name": "EnrollmentGroupType", "modelAsString": false, "values": [ { "value": "iot", "name": "IoT devices", "description": "Regular (non-Edge) IoT devices" }, { "value": "iotEdge", "name": "IoT Edge devices", "description": "IoT Edge devices" } ] } }, "attestation": { "description": "The attestation mechanism for the enrollment group.", "$ref": "#/definitions/GroupAttestation" }, "etag": { "description": "ETag used to prevent conflict in enrollment group updates.", "type": "string" } }, "required": [ "displayName", "attestation", "type" ] }, "EnrollmentGroupCollection": { "description": "The paged results of enrollment groups.", "type": "object", "properties": { "value": { "description": "The collection of enrollment groups.", "type": "array", "items": { "$ref": "#/definitions/EnrollmentGroup" } }, "nextLink": { "description": "URL to get the next page of enrollment groups.", "type": "string" } }, "required": [ "value" ] }, "Error": { "description": "The response error definition.", "type": "object", "properties": { "error": { "description": "Error details for current request.", "$ref": "#/definitions/ErrorDetails" } }, "required": [ "error" ] }, "ErrorDetails": { "description": "The detail information of the error.", "type": "object", "properties": { "code": { "type": "string", "description": "Error code." }, "message": { "type": "string", "description": "Error message details." }, "requestId": { "type": "string", "description": "Correlation Id for current request." }, "time": { "type": "string", "format": "date-time-rfc1123", "description": "The time that error request failed." } }, "required": [ "code", "message" ] }, "FileUpload": { "description": "The file upload configuration definition.", "type": "object", "properties": { "account": { "description": "The storage account name where to upload the file to", "type": "string" }, "connectionString": { "description": "The connection string used to configure the storage account", "type": "string" }, "container": { "description": "The name of the container inside the storage account", "type": "string" }, "sasTtl": { "description": "ISO 8601 duration standard, The amount of time the device’s request to upload a file is valid before it expires.", "type": "string" }, "state": { "description": "The state of the file upload configuration", "type": "string", "readOnly": true, "enum": [ "pending", "updating", "deleting", "succeeded", "failed" ], "x-ms-enum": { "name": "FileUploadState", "modelAsString": false, "values": [ { "value": "pending", "name": "Pending" }, { "value": "updating", "name": "Updating" }, { "value": "deleting", "name": "Deleting" }, { "value": "succeeded", "name": "Succeeded" }, { "value": "failed", "name": "Failed" } ] } }, "etag": { "description": "ETag used to prevent conflict with multiple uploads", "type": "string" } }, "required": [ "connectionString", "container" ] }, "GroupAttestation": { "description": "The attestation definition for an enrollment group.", "type": "object", "properties": { "type": { "description": "Type of the attestation.", "type": "string" } }, "required": [ "type" ], "discriminator": "type" }, "GroupSymmetricKeyAttestation": { "description": "The symmetric key attestation definition.", "x-ms-discriminator-value": "symmetricKey", "allOf": [ { "$ref": "#/definitions/GroupAttestation" } ], "type": "object", "properties": { "symmetricKey": { "description": "The symmetric key credentials for this attestation.", "$ref": "#/definitions/SymmetricKey" } } }, "GroupX509Attestation": { "description": "The X509 attestation definition.", "x-ms-discriminator-value": "x509", "allOf": [ { "$ref": "#/definitions/GroupAttestation" } ], "type": "object", "properties": { "x509": { "description": "The X.509 credentials for this attestation.", "$ref": "#/definitions/SigningX509" } } }, "Job": { "description": "The job definition.", "type": "object", "properties": { "id": { "description": "Unique ID of the job.", "type": "string", "readOnly": true }, "scheduledJobId": { "description": "Id of the scheduled job definition that created this job.", "type": "string" }, "displayName": { "description": "Display name of the job.", "type": "string" }, "description": { "description": "Detailed description of the job.", "type": "string" }, "group": { "description": "The ID of the device group on which to execute the job.", "type": "string" }, "batch": { "description": "The batching configuration for the job.", "$ref": "#/definitions/JobBatch" }, "cancellationThreshold": { "description": "The cancellation threshold for the job.", "$ref": "#/definitions/JobCancellationThreshold" }, "data": { "description": "The capabilities being updated by the job and the values with which they are being updated.", "type": "array", "items": { "$ref": "#/definitions/JobData" }, "minItems": 1 }, "start": { "description": "The start time of the job", "type": "string", "format": "date-time", "readOnly": true }, "end": { "description": "The end time of the job", "type": "string", "format": "date-time", "readOnly": true }, "progress": { "description": "The progress statistics of the job.", "$ref": "#/definitions/JobProgress", "readOnly": true }, "status": { "description": "Indicates whether the job is starting, running, etc.", "type": "string", "readOnly": true }, "organizations": { "description": "List of organizations of the job, only one organization is supported today, multiple organizations will be supported soon.", "type": "array", "items": { "type": "string" }, "minItems": 1, "maxItems": 1 } }, "required": [ "group", "data" ] }, "JobBatch": { "description": "The job batch definition.", "type": "object", "properties": { "type": { "description": "Whether batching is done on a specified number of devices or a percentage of the total devices.", "type": "string", "enum": [ "number", "percentage" ], "x-ms-enum": { "name": "JobBatchType", "modelAsString": false, "values": [ { "value": "number", "name": "Number", "description": "Job Batching based on number of devices." }, { "value": "percentage", "name": "Percentage", "description": "Job Batching based percentage of total applied devices." } ] } }, "value": { "description": "The number or percentage of devices on which batching is done.", "type": "number" } }, "required": [ "type", "value" ] }, "JobCancellationThreshold": { "description": "The job cancellation threshold definition.", "type": "object", "properties": { "type": { "description": "Whether the cancellation threshold is per a specified number of devices or a percentage of the total devices.", "type": "string", "enum": [ "number", "percentage" ], "x-ms-enum": { "name": "JobCancellationThresholdType", "modelAsString": false, "values": [ { "value": "number", "name": "Number", "description": "Job cancellation threshold based on specified number of devices." }, { "value": "percentage", "name": "Percentage", "description": "Job cancellation threshold based on percentage of total devices." } ] } }, "value": { "description": "The number or percentage of devices on which the cancellation threshold is applied.", "type": "number" }, "batch": { "description": "Whether the cancellation threshold applies per-batch or to the overall job.", "type": "boolean" } }, "required": [ "type", "value" ] }, "JobCollection": { "description": "The paged results of jobs.", "type": "object", "properties": { "value": { "description": "The collection of jobs.", "type": "array", "items": { "$ref": "#/definitions/Job" } }, "nextLink": { "description": "URL to get the next page of jobs.", "type": "string" } }, "required": [ "value" ] }, "JobData": { "description": "The job data definition.", "type": "object", "properties": { "type": { "description": "Type of the job data.", "type": "string" } }, "required": [ "type" ], "discriminator": "type" }, "JobDeviceStatus": { "description": "The job device status definition.", "type": "object", "properties": { "id": { "description": "ID of the device whose job status is being provided.", "type": "string", "readOnly": true }, "status": { "description": "Indicates whether the job is starting, running, etc. for the given device.", "type": "string", "readOnly": true } } }, "JobDeviceStatusCollection": { "description": "The paged results of job device statuses.", "type": "object", "properties": { "value": { "description": "The collection of job device statuses.", "type": "array", "items": { "$ref": "#/definitions/JobDeviceStatus" } }, "nextLink": { "description": "URL to get the next page of job device statuses.", "type": "string" } }, "required": [ "value" ] }, "JobProgress": { "description": "progress summary for a scheduled job.", "type": "object", "properties": { "total": { "description": "The total number of entities targeted by the job.", "type": "integer", "format": "int32" }, "pending": { "description": "The number of entities for which the job is not yet running.", "type": "integer", "format": "int32" }, "completed": { "description": "The number of entities for which the job has completed.", "type": "integer", "format": "int32" }, "failed": { "description": "The number of entities for which the job has failed.", "type": "integer", "format": "int32" } } }, "JobSchedule": { "description": "The schedule definition of job.", "type": "object", "properties": { "recurrence": { "description": "The recurrence of the scheduled job. If not provided, the job will run once at the specified start time.", "type": "string", "enum": [ "daily", "weekly", "monthly" ], "x-ms-enum": { "name": "JobRecurrence", "modelAsString": false, "values": [ { "value": "daily", "name": "Daily", "description": "The job will run once daily" }, { "value": "weekly", "name": "Weekly", "description": "The job will run once every week" }, { "value": "monthly", "name": "Monthly", "description": "The job will run once every month" } ] } }, "start": { "description": "The start time for the scheduled job", "type": "string", "format": "date-time" }, "end": { "description": "The specification of when to end the scheduled job.", "$ref": "#/definitions/JobScheduleEnd" } }, "required": [ "start" ] }, "JobScheduleEnd": { "description": "The end definition of job schedule.", "type": "object", "properties": { "type": { "description": "Type of the job schedule end.", "type": "string" } }, "required": [ "type" ], "discriminator": "type" }, "OccurrencesJobScheduleEnd": { "description": "The occurences based end definition of job schedule.", "x-ms-discriminator-value": "occurrences", "allOf": [ { "$ref": "#/definitions/JobScheduleEnd" } ], "type": "object", "properties": { "occurrences": { "description": "The number of occurrences after which to end the scheduled job.", "type": "integer", "format": "int32", "minimum": 1, "maximum": 999 } }, "required": [ "occurrences" ] }, "Organization": { "description": "The organization definition.", "type": "object", "properties": { "id": { "description": "Unique ID of the organization.", "type": "string", "readOnly": true }, "displayName": { "description": "Display name of the organization.", "type": "string" }, "parent": { "description": "ID of the parent of the organization.", "type": "string" } } }, "OrganizationCollection": { "description": "The paged results of organizations.", "type": "object", "properties": { "value": { "description": "The collection of organizations.", "type": "array", "items": { "$ref": "#/definitions/Organization" } }, "nextLink": { "description": "URL to get the next page of organizations.", "type": "string" } }, "required": [ "value" ] }, "Permission": { "description": "The permission definition.", "type": "object", "properties": { "roles": { "description": "List of role assignments that specify the permissions to access the application.", "type": "array", "items": { "$ref": "#/definitions/RoleAssignment" }, "minItems": 1 } }, "required": [ "roles" ] }, "PropertyJobData": { "description": "The property job data definition.", "x-ms-discriminator-value": "property", "allOf": [ { "$ref": "#/definitions/JobData" }, { "$ref": "#/definitions/CapabilityJobData" } ] }, "Role": { "description": "The role definition.", "type": "object", "properties": { "id": { "description": "Unique ID of the role.", "type": "string", "readOnly": true }, "displayName": { "description": "Display name of the role.", "type": "string" } } }, "RoleAssignment": { "description": "The role assignment definition.", "type": "object", "properties": { "role": { "description": "ID of the role for this role assignment.", "type": "string" }, "organization": { "description": "ID of the organization for this role assignment.", "type": "string" } }, "required": [ "role" ] }, "RoleCollection": { "description": "The paged results of roles.", "type": "object", "properties": { "value": { "description": "The collection of roles.", "type": "array", "items": { "$ref": "#/definitions/Role" } }, "nextLink": { "description": "URL to get the next page of roles.", "type": "string" } }, "required": [ "value" ] }, "ScheduledJob": { "description": "The scheduled job definition.", "type": "object", "properties": { "etag": { "description": "ETag used to prevent conflict in scheduled job updates.", "type": "string" }, "id": { "description": "Unique ID of the scheduled job.", "type": "string", "readOnly": true }, "displayName": { "description": "Display name of the scheduled job.", "type": "string" }, "description": { "description": "Detailed description of the scheduled job.", "type": "string" }, "group": { "description": "The ID of the device group on which to execute the scheduled job.", "type": "string" }, "batch": { "description": "The batching configuration for the scheduled job.", "$ref": "#/definitions/JobBatch" }, "cancellationThreshold": { "description": "The cancellation threshold for the scheduled job.", "$ref": "#/definitions/JobCancellationThreshold" }, "data": { "description": "Data related to the operation being performed by this job. All entries must be of the same type.", "type": "array", "items": { "$ref": "#/definitions/JobData" }, "minItems": 1 }, "organizations": { "description": "List of organizations of the job, only one organization is supported today, multiple organizations will be supported soon.", "type": "array", "items": { "type": "string" }, "minItems": 1, "maxItems": 1 }, "schedule": { "description": "The schedule at which to execute the job.", "$ref": "#/definitions/JobSchedule" }, "enabled": { "description": "Whether the scheduled job is enabled.", "type": "boolean" }, "completed": { "description": "Whether the scheduled job has completed.", "type": "boolean", "readOnly": true } }, "required": [ "schedule", "group", "data" ] }, "ScheduledJobCollection": { "description": "The paged results of scheduled job definitions.", "type": "object", "properties": { "value": { "description": "The collection of scheduled jobs.", "type": "array", "items": { "$ref": "#/definitions/ScheduledJob" } }, "nextLink": { "description": "URL to get the next page of scheduled jobs.", "type": "string" } }, "required": [ "value" ] }, "ServicePrincipalUser": { "description": "The service principal user definition.", "x-ms-discriminator-value": "servicePrincipal", "allOf": [ { "$ref": "#/definitions/User" } ], "type": "object", "properties": { "tenantId": { "description": "The AAD tenant ID of the service principal.", "type": "string" }, "objectId": { "description": "The AAD object ID of the service principal.", "type": "string" } }, "required": [ "tenantId", "objectId" ] }, "SigningX509": { "description": "The X509 definition.", "type": "object", "properties": { "signingCertificates": { "description": "The X.509 signing certificates for this credential.", "$ref": "#/definitions/SigningX509Certificates" } } }, "SigningX509Certificate": { "description": "The X509 certificate definition.", "type": "object", "properties": { "verified": { "description": "Whether the certificate has been verified.", "type": "boolean", "default": false }, "certificate": { "description": "The string representation of this certificate.", "type": "string" }, "info": { "description": "Information about this certificate.", "readOnly": true, "$ref": "#/definitions/X509CertificateInfo" }, "etag": { "description": "ETag used to prevent conflict across multiple updates", "type": "string" } } }, "SigningX509Certificates": { "description": "The X509 certificates definition.", "type": "object", "properties": { "primary": { "description": "The primary X.509 certificate for this credential.", "$ref": "#/definitions/SigningX509Certificate" }, "secondary": { "description": "The secondary X.509 certificate for this credential.", "$ref": "#/definitions/SigningX509Certificate" } } }, "SymmetricKey": { "description": "The symmetric key definition.", "type": "object", "properties": { "primaryKey": { "description": "The primary key for this credential.", "type": "string" }, "secondaryKey": { "description": "The secondary key for this credential.", "type": "string" } }, "required": [ "primaryKey", "secondaryKey" ] }, "SymmetricKeyAttestation": { "description": "The symmetric key attestation definition.", "x-ms-discriminator-value": "symmetricKey", "allOf": [ { "$ref": "#/definitions/Attestation" } ], "type": "object", "properties": { "symmetricKey": { "description": "The symmetric key credentials for this attestation.", "$ref": "#/definitions/SymmetricKey" } }, "required": [ "symmetricKey" ] }, "Tpm": { "description": "The trusted platform module definition.", "type": "object", "properties": { "endorsementKey": { "description": "The TPM endorsement key for this credential.", "type": "string" } }, "required": [ "endorsementKey" ] }, "TpmAttestation": { "description": "The TPM attestation definition.", "x-ms-discriminator-value": "tpm", "allOf": [ { "$ref": "#/definitions/Attestation" } ], "type": "object", "properties": { "tpm": { "description": "The TPM credentials for this attestation.", "$ref": "#/definitions/Tpm" } }, "required": [ "tpm" ] }, "User": { "description": "The user definition.", "allOf": [ { "$ref": "#/definitions/Permission" } ], "type": "object", "properties": { "id": { "description": "Unique ID of the user.", "type": "string", "readOnly": true }, "type": { "description": "Type of the user.", "type": "string" } }, "required": [ "type" ], "discriminator": "type" }, "UserCollection": { "description": "The paged results of users.", "type": "object", "properties": { "value": { "description": "The collection of users.", "type": "array", "items": { "$ref": "#/definitions/User" } }, "nextLink": { "description": "URL to get the next page of users.", "type": "string" } }, "required": [ "value" ] }, "X509": { "description": "The X509 definition.", "type": "object", "properties": { "clientCertificates": { "description": "The X.509 client certificates for this credential.", "$ref": "#/definitions/X509Certificates" } } }, "X509Attestation": { "description": "The X509 attestation definition.", "x-ms-discriminator-value": "x509", "allOf": [ { "$ref": "#/definitions/Attestation" } ], "type": "object", "properties": { "x509": { "description": "The X.509 credentials for this attestation.", "$ref": "#/definitions/X509" } }, "required": [ "x509" ] }, "X509Certificate": { "description": "The X509 certificate definition.", "type": "object", "properties": { "certificate": { "description": "The string representation of this certificate.", "type": "string" }, "info": { "description": "Information about this certificate.", "readOnly": true, "$ref": "#/definitions/X509CertificateInfo" } } }, "X509CertificateInfo": { "description": "The X509 certificate info.", "type": "object", "properties": { "sha1Thumbprint": { "description": "The SHA-1 hash value of the certificate.", "type": "string" } }, "required": [ "sha1Thumbprint" ] }, "X509Certificates": { "description": "The X509 certificates definition.", "type": "object", "properties": { "primary": { "description": "The primary X.509 certificate for this credential.", "$ref": "#/definitions/X509Certificate" }, "secondary": { "description": "The secondary X.509 certificate for this credential.", "$ref": "#/definitions/X509Certificate" } }, "required": [ "primary" ] }, "X509VerificationCertificate": { "description": "The X509 verification certificate definition.", "type": "object", "properties": { "certificate": { "description": "The string representation of this certificate.", "type": "string" } }, "required": [ "certificate" ] }, "X509VerificationCode": { "description": "The X509 certificate verification code.", "type": "object", "properties": { "verificationCode": { "description": "The X509 certificate verification code.", "type": "string", "readOnly": true } } } }, "paths": { "/apiTokens": { "get": { "operationId": "ApiTokens_List", "summary": "Get the list of API tokens in an application. The token value will never be returned for security reasons.", "x-ms-examples": { "List API tokens": { "$ref": "./examples/apitoken_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ApiTokenCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/apiTokens/{tokenId}": { "get": { "operationId": "ApiTokens_Get", "summary": "Get an API token by ID.", "x-ms-examples": { "Get API token by ID": { "$ref": "./examples/apitoken_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "in": "path", "name": "tokenId", "description": "Unique ID for the API token.", "type": "string", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ApiToken" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "ApiTokens_Create", "summary": "Create a new API token in the application to use in the IoT Central public API. The token value will be returned in the response, and won't be returned again in subsequent requests.", "x-ms-examples": { "Create API token": { "$ref": "./examples/apitoken_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "in": "path", "name": "tokenId", "description": "Unique ID for the API token.", "type": "string", "required": true }, { "in": "body", "name": "body", "description": "API token body.", "schema": { "$ref": "#/definitions/ApiToken" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ApiToken" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "ApiTokens_Remove", "summary": "Delete an API token.", "x-ms-examples": { "Delete API token": { "$ref": "./examples/apitoken_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "in": "path", "name": "tokenId", "description": "Unique ID for the API token.", "type": "string", "required": true } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/deviceGroups": { "get": { "operationId": "DeviceGroups_List", "summary": "Get the list of device groups in an application.", "x-ms-examples": { "List device groups": { "$ref": "./examples/devicegroups_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceGroupCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/deviceGroups/{deviceGroupId}": { "get": { "operationId": "DeviceGroups_Get", "summary": "Get the device group by ID.", "x-ms-examples": { "Get device group by ID": { "$ref": "./examples/devicegroups_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceGroupId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceGroup" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "DeviceGroups_Create", "summary": "Create or update a device group", "description": "Create or update a device group.", "x-ms-examples": { "Create device group": { "$ref": "./examples/devicegroups_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceGroupId" }, { "in": "body", "name": "body", "description": "Device group body.", "schema": { "$ref": "#/definitions/DeviceGroup" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceGroup" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "DeviceGroups_Update", "summary": "Update a device group via patch", "description": "Update an existing device group by ID.", "x-ms-examples": { "Update device device group": { "$ref": "./examples/devicegroups_update.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceGroupId" }, { "in": "body", "name": "body", "description": "Device group patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceGroup" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "DeviceGroups_Remove", "summary": "Delete a device group.", "x-ms-examples": { "Delete device group": { "$ref": "./examples/devicegroups_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceGroupId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/deviceGroups/{deviceGroupId}/devices": { "get": { "operationId": "DeviceGroups_GetDevices", "summary": "Get the devices of a device group", "description": "Get the list of devices by device group ID.", "x-ms-examples": { "Get device group by ID": { "$ref": "./examples/devicegroups_getdevices.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceGroupId" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceGroupDeviceCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/deviceTemplates": { "get": { "operationId": "DeviceTemplates_List", "summary": "Get the list of device templates in an application.", "x-ms-examples": { "List device templates": { "$ref": "./examples/devicetemplates_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTemplateCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/deviceTemplates/{deviceTemplateId}": { "get": { "operationId": "DeviceTemplates_Get", "summary": "Get a device template by ID", "x-ms-examples": { "Get a device template by ID": { "$ref": "./examples/devicetemplates_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceTemplateId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTemplate" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "DeviceTemplates_Create", "summary": "Publish a new device template. Default views will be automatically generated for new device templates created this way.", "x-ms-examples": { "Create a device template": { "$ref": "./examples/devicetemplates_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceTemplateId" }, { "in": "body", "name": "body", "description": "Device template body.", "schema": { "$ref": "#/definitions/DeviceTemplate" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTemplate" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "DeviceTemplates_Update", "summary": "Update the cloud properties and overrides of an existing device template via patch.", "x-ms-examples": { "Update a device template": { "$ref": "./examples/devicetemplates_update.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceTemplateId" }, { "in": "body", "name": "body", "description": "Device template patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTemplate" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "DeviceTemplates_Remove", "summary": "Delete a device template", "description": "Delete an existing device template by device ID.", "x-ms-examples": { "Delete a device template by ID": { "$ref": "./examples/devicetemplates_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceTemplateId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices": { "get": { "operationId": "Devices_List", "summary": "Get the list of devices in an application.", "x-ms-examples": { "List devices": { "$ref": "./examples/devices_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}": { "get": { "operationId": "Devices_Get", "summary": "Get a device by ID", "description": "Get details about an existing device by device ID.", "x-ms-examples": { "Get device by ID": { "$ref": "./examples/devices_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Device" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Devices_Create", "summary": "Create or update a device", "description": "Create a new device.", "x-ms-examples": { "Create device": { "$ref": "./examples/devices_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "in": "body", "name": "body", "description": "Device body.", "schema": { "$ref": "#/definitions/Device" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Device" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Devices_Update", "summary": "Update a device via patch", "description": "Update an existing device by ID.", "x-ms-examples": { "Update device": { "$ref": "./examples/devices_create.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "in": "body", "name": "body", "description": "Device patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Device" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "Devices_Remove", "summary": "Delete a device", "description": "Delete an existing device by device ID.", "x-ms-examples": { "Delete device": { "$ref": "./examples/devices_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/attestation": { "get": { "operationId": "Devices_GetAttestation", "summary": "Get device attestation", "x-ms-examples": { "Get device attestation": { "$ref": "./examples/devices_attestations_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Attestation" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Devices_CreateAttestation", "summary": "Create an individual device attestation", "x-ms-examples": { "Create or update device attestation - Symmetric Key": { "$ref": "./examples/devices_attestations_set_symmetricKey.json" }, "Create or update device attestation - TPM": { "$ref": "./examples/devices_attestations_set_tpm.json" }, "Create or update device attestation - X509": { "$ref": "./examples/devices_attestations_set_x509.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "in": "body", "name": "body", "description": "Individual device attestation body.", "schema": { "$ref": "#/definitions/Attestation" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Attestation" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Devices_UpdateAttestation", "summary": "Update an individual device attestation via patch", "x-ms-examples": { "Update device attestation - Symmetric Key": { "$ref": "./examples/devices_attestations_set_symmetricKey.json" }, "Update device attestation - TPM": { "$ref": "./examples/devices_attestations_set_tpm.json" }, "Update device attestation - X509": { "$ref": "./examples/devices_attestations_set_x509.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "in": "body", "name": "body", "description": "Individual device attestation patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Attestation" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "Devices_RemoveAttestation", "summary": "Remove an individual device attestation", "x-ms-examples": { "Delete device attestation": { "$ref": "./examples/devices_attestations_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/commands/{commandName}": { "get": { "operationId": "Devices_GetCommandHistory", "summary": "Get device command history", "x-ms-examples": { "Get command history": { "$ref": "./examples/devices_commandshistory_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/CommandName" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommandCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "Devices_RunCommand", "summary": "Run a device command", "description": "Run a command on a device.", "x-ms-examples": { "Send command": { "$ref": "./examples/devices_commands_send.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/CommandName" }, { "in": "body", "name": "body", "description": "Device command body.", "schema": { "$ref": "#/definitions/DeviceCommand" }, "required": true } ], "responses": { "201": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommand" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/components": { "get": { "operationId": "Devices_ListComponents", "summary": "List the components present in a device", "x-ms-examples": { "List components": { "$ref": "./examples/devices_components_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Collection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/components/{componentName}/commands/{commandName}": { "get": { "operationId": "Devices_GetComponentCommandHistory", "summary": "Get component command history", "x-ms-examples": { "Get command history": { "$ref": "./examples/devices_commandshistory_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ComponentName" }, { "$ref": "#/parameters/CommandName" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommandCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "Devices_RunComponentCommand", "summary": "Run a component command", "description": "Run a command on a component.", "x-ms-examples": { "Send command": { "$ref": "./examples/devices_commands_send.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ComponentName" }, { "$ref": "#/parameters/CommandName" }, { "in": "body", "name": "body", "description": "Device command body.", "schema": { "$ref": "#/definitions/DeviceCommand" }, "required": true } ], "responses": { "201": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommand" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/components/{componentName}/properties": { "get": { "operationId": "Devices_GetComponentProperties", "summary": "Get device properties for a specific component", "x-ms-examples": { "Get properties on components": { "$ref": "./examples/devices_properties_components_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ComponentName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Devices_ReplaceComponentProperties", "summary": "Replace device properties for a specific component", "x-ms-examples": { "Update properties on components": { "$ref": "./examples/devices_properties_components_set.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ComponentName" }, { "in": "body", "name": "body", "description": "Device properties.", "schema": { "$ref": "#/definitions/DeviceProperties" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Devices_UpdateComponentProperties", "summary": "Update device properties for a specific component via patch", "x-ms-examples": { "Update properties on components": { "$ref": "./examples/devices_properties_components_set.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ComponentName" }, { "in": "body", "name": "body", "description": "Device properties patch.", "schema": { "type": "object" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/components/{componentName}/telemetry/{telemetryName}": { "get": { "operationId": "Devices_GetComponentTelemetryValue", "summary": "Get component telemetry value", "description": "Get the last telemetry value from a component.", "x-ms-examples": { "Get telemetry": { "$ref": "./examples/devices_telemetry_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ComponentName" }, { "$ref": "#/parameters/TelemetryName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTelemetry" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/credentials": { "get": { "operationId": "Devices_GetCredentials", "summary": "Get device credentials", "x-ms-examples": { "Get device credentials": { "$ref": "./examples/devicecredentials_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCredentials" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules": { "get": { "operationId": "Devices_ListModules", "summary": "List the modules present in a device", "x-ms-examples": { "List modules": { "$ref": "./examples/devices_modules_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Collection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules/{moduleName}/commands/{commandName}": { "get": { "operationId": "Devices_GetModuleCommandHistory", "summary": "Get module command history", "x-ms-examples": { "Get command history within module": { "$ref": "./examples/modules_commandshistory_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/CommandName" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommandCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "Devices_RunModuleCommand", "summary": "Run a module command", "description": "Run a command on a module.", "x-ms-examples": { "Send command to module": { "$ref": "./examples/modules_commands_send.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/CommandName" }, { "in": "body", "name": "body", "description": "Device command body.", "schema": { "$ref": "#/definitions/DeviceCommand" }, "required": true } ], "responses": { "201": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommand" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules/{moduleName}/components": { "get": { "operationId": "Devices_ListModuleComponents", "summary": "List the components present in a module", "x-ms-examples": { "List module components": { "$ref": "./examples/devices_modules_components_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Collection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules/{moduleName}/components/{componentName}/commands/{commandName}": { "get": { "operationId": "Devices_GetModuleComponentCommandHistory", "summary": "Get module component command history", "x-ms-examples": { "Get command history within module": { "$ref": "./examples/modules_commandshistory_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/ComponentName" }, { "$ref": "#/parameters/CommandName" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommandCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "Devices_RunModuleComponentCommand", "summary": "Run a module component command", "description": "Run a command on a module.", "x-ms-examples": { "Send command to module": { "$ref": "./examples/modules_commands_send.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/ComponentName" }, { "$ref": "#/parameters/CommandName" }, { "in": "body", "name": "body", "description": "Device command body.", "schema": { "$ref": "#/definitions/DeviceCommand" }, "required": true } ], "responses": { "201": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceCommand" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules/{moduleName}/components/{componentName}/properties": { "get": { "operationId": "Devices_GetModuleComponentProperties", "summary": "Get module properties for a specific component", "x-ms-examples": { "Get properties of a module": { "$ref": "./examples/modules_properties_components_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/ComponentName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Devices_ReplaceModuleComponentProperties", "summary": "Replace module properties for a specific component", "x-ms-examples": { "Update properties of a module within a component": { "$ref": "./examples/modules_properties_components_set.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/ComponentName" }, { "in": "body", "name": "body", "description": "Module properties.", "schema": { "$ref": "#/definitions/DeviceProperties" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Devices_UpdateModuleComponentProperties", "summary": "Update module properties for a specific component via patch", "x-ms-examples": { "Update properties of a module within a component": { "$ref": "./examples/modules_properties_components_set.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/ComponentName" }, { "in": "body", "name": "body", "description": "Module properties patch.", "schema": { "type": "object" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules/{moduleName}/components/{componentName}/telemetry/{telemetryName}": { "get": { "operationId": "Devices_GetModuleComponentTelemetryValue", "summary": "Get module component telemetry value", "description": "Get the last telemetry value from a module component.", "x-ms-examples": { "Get telemetry from module": { "$ref": "./examples/modules_telemetry_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/ComponentName" }, { "$ref": "#/parameters/TelemetryName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTelemetry" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules/{moduleName}/properties": { "get": { "operationId": "Devices_GetModuleProperties", "summary": "Get module properties", "description": "Get all property values of a module.", "x-ms-examples": { "Get properties of a module": { "$ref": "./examples/modules_properties_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Devices_ReplaceModuleProperties", "summary": "Replace module properties", "description": "Replace all property values of a module.", "x-ms-examples": { "Update properties of a module": { "$ref": "./examples/modules_properties_update.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "in": "body", "name": "body", "description": "Module properties.", "schema": { "$ref": "#/definitions/DeviceProperties" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Devices_UpdateModuleProperties", "summary": "Update module properties via patch", "description": "Update property values of a module.", "x-ms-examples": { "Update properties of a module": { "$ref": "./examples/modules_properties_update.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "in": "body", "name": "body", "description": "Module properties patch.", "schema": { "type": "object" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/modules/{moduleName}/telemetry/{telemetryName}": { "get": { "operationId": "Devices_GetModuleTelemetryValue", "summary": "Get module telemetry value", "description": "Get the last telemetry value from a module.", "x-ms-examples": { "Get telemetry from module": { "$ref": "./examples/modules_telemetry_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/ModuleName" }, { "$ref": "#/parameters/TelemetryName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTelemetry" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/properties": { "get": { "operationId": "Devices_GetProperties", "summary": "Get device properties", "description": "Get all property values of a device by device ID.", "x-ms-examples": { "Get properties": { "$ref": "./examples/devices_properties_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Devices_ReplaceProperties", "summary": "Replace device properties", "description": "Replace all property values of a device by device ID.", "x-ms-examples": { "Update properties": { "$ref": "./examples/devices_properties_update.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "in": "body", "name": "body", "description": "Device properties.", "schema": { "$ref": "#/definitions/DeviceProperties" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Devices_UpdateProperties", "summary": "Update device properties via patch", "description": "Update property values of a device by device ID.", "x-ms-examples": { "Update properties": { "$ref": "./examples/devices_properties_update.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "in": "body", "name": "body", "description": "Device properties patch.", "schema": { "type": "object" }, "required": true } ], "responses": { "202": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceProperties" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/relationships": { "get": { "operationId": "Devices_ListRelationships", "summary": "Given the ID for an upstream device, will return the upstream and the downstream relationships associated with that gateway. These downstream relationships are only those associated with the direct downstream level (they don’t work recursively).", "description": "List all relationships based on device ID", "x-ms-examples": { "List device relationships": { "$ref": "./examples/devices_relationships_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceRelationshipCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/relationships/{relationshipId}": { "get": { "operationId": "Devices_GetRelationship", "summary": "Given the ID for a device and a relationship ID associated with this device, get the details of the relationship.", "description": "Get device relationship by ID", "x-ms-examples": { "Get device relationship by ID": { "$ref": "./examples/devices_relationships_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/RelationshipId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceRelationship" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Devices_CreateRelationship", "summary": "Given the ID for a device and a relationship ID associated with this device, create a new relationship for between the given device and a second device specified in the body.", "description": "Create a device relationship", "x-ms-examples": { "Create a new device relationship": { "$ref": "./examples/devices_relationships_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/RelationshipId" }, { "in": "body", "name": "body", "description": "Device relationship body.", "schema": { "$ref": "#/definitions/DeviceRelationship" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceRelationship" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Devices_UpdateRelationship", "summary": "Patch a given relationship given the relationship ID and a given device ID.", "description": "Update device relationship", "x-ms-examples": { "Update a device relationship": { "$ref": "./examples/devices_relationships_update.json" } }, "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/RelationshipId" }, { "in": "body", "name": "body", "description": "Device relationship patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceRelationship" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "Devices_RemoveRelationship", "summary": "Given the ID for a device and an associated relationship ID, delete the relationship. The given device ID can be that of the upstream or downstream device.", "description": "Delete a device relationship", "x-ms-examples": { "Delete a device relationship": { "$ref": "./examples/devices_relationships_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/RelationshipId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/devices/{deviceId}/telemetry/{telemetryName}": { "get": { "operationId": "Devices_GetTelemetryValue", "summary": "Get device telemetry value", "description": "Get the last telemetry value from a device.", "x-ms-examples": { "Get telemetry": { "$ref": "./examples/devices_telemetry_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/DeviceId" }, { "$ref": "#/parameters/TelemetryName" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeviceTelemetry" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/enrollmentGroups": { "get": { "operationId": "EnrollmentGroups_List", "summary": "Get the list of enrollment groups in an application", "x-ms-examples": { "List enrollment groups": { "$ref": "./examples/enrollmentgroups_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/EnrollmentGroupCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/enrollmentGroups/{enrollmentGroupId}": { "get": { "operationId": "EnrollmentGroups_Get", "summary": "Get an enrollment group by ID", "description": "Get details about an enrollment group by ID.", "x-ms-examples": { "Get an enrollment group by ID": { "$ref": "./examples/enrollmentgroups_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/EnrollmentGroup" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "EnrollmentGroups_Create", "summary": "Create an enrollment group", "description": "Create an enrollment group.", "x-ms-examples": { "Get an enrollment group": { "$ref": "./examples/enrollmentgroups_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" }, { "in": "body", "name": "body", "description": "Enrollment group body.", "schema": { "$ref": "#/definitions/EnrollmentGroup" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/EnrollmentGroup" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "EnrollmentGroups_Update", "summary": "Update an enrollment group", "description": "Update an enrollment group.", "x-ms-examples": { "Update an enrollment group by ID": { "$ref": "./examples/enrollmentgroups_update.json" } }, "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" }, { "in": "body", "name": "body", "description": "Enrollment group patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/EnrollmentGroup" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "EnrollmentGroups_Remove", "summary": "Delete an enrollment group", "description": "Delete an enrollment group by ID.", "x-ms-examples": { "Remove an enrollment group by ID": { "$ref": "./examples/enrollmentgroups_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/enrollmentGroups/{enrollmentGroupId}/certificates/{entry}": { "get": { "operationId": "EnrollmentGroups_GetX509", "summary": "Get the primary or secondary x509 certificate of an enrollment group", "description": "Get details about the primary or secondary x509 certificate of an enrollment group, if it exists.", "x-ms-examples": { "Get primary or secondary X509": { "$ref": "./examples/enrollmentgroups_getx509.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" }, { "$ref": "#/parameters/Entry" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SigningX509Certificate" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "EnrollmentGroups_CreateX509", "summary": "Sets the primary or secondary x509 certificate of an enrollment group", "description": "Sets the primary or secondary x509 certificate of an enrollment group.", "x-ms-examples": { "Set primary or secondary X509": { "$ref": "./examples/enrollmentgroups_setx509.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" }, { "$ref": "#/parameters/Entry" }, { "in": "body", "name": "body", "description": "Certificate definition.", "schema": { "$ref": "#/definitions/SigningX509Certificate" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SigningX509Certificate" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "EnrollmentGroups_RemoveX509", "summary": "Removes the primary or secondary x509 certificate of an enrollment group", "description": "Removes the primary or secondary x509 certificate of an enrollment group.", "x-ms-examples": { "Remove primary or secondary X509": { "$ref": "./examples/enrollmentgroups_removex509.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" }, { "$ref": "#/parameters/Entry" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/enrollmentGroups/{enrollmentGroupId}/certificates/{entry}/generateVerificationCode": { "post": { "operationId": "EnrollmentGroups_GenerateVerificationCodeX509", "summary": "Generate a verification code for the primary or secondary x509 certificate of an enrollment group", "description": "Generate a verification code for the primary or secondary x509 certificate of an enrollment group.", "x-ms-examples": { "Generate primary or secondary X509 verification code": { "$ref": "./examples/enrollmentgroups_generateverificationcodex509.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" }, { "$ref": "#/parameters/Entry" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/X509VerificationCode" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/enrollmentGroups/{enrollmentGroupId}/certificates/{entry}/verify": { "post": { "operationId": "EnrollmentGroups_VerifyX509", "summary": "Verify the primary or secondary x509 certificate of an enrollment group", "description": "Verify the primary or secondary x509 certificate of an enrollment group by providing a certificate with the signed verification code.", "x-ms-examples": { "Verify primary or secondary X509 verification code": { "$ref": "./examples/enrollmentgroups_verifyx509.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/EnrollmentGroupId" }, { "$ref": "#/parameters/Entry" }, { "in": "body", "name": "body", "description": "Certificate for the signed verification code.", "schema": { "$ref": "#/definitions/X509VerificationCertificate" }, "required": true } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/fileUploads": { "get": { "operationId": "FileUploads_Get", "summary": "Get the file upload storage account configuration.", "x-ms-examples": { "Get file upload storage account configuration": { "$ref": "./examples/fileUpload_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/FileUpload" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "FileUploads_Create", "summary": "Create the file upload storage account configuration.", "x-ms-examples": { "Create file upload storage account configuration": { "$ref": "./examples/fileUpload_update.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "in": "body", "name": "body", "description": "File upload storage account configuration body.", "schema": { "$ref": "#/definitions/FileUpload" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/FileUpload" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "FileUploads_Update", "summary": "Update the file upload storage account configuration", "x-ms-examples": { "Update file upload storage account configuration": { "$ref": "./examples/fileUpload_update.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "in": "body", "name": "body", "description": "File upload storage account configuration body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/FileUpload" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "FileUploads_Remove", "summary": "Delete the file upload storage configuration.", "x-ms-examples": { "Remove file upload storage configuration": { "$ref": "./examples/fileUpload_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/jobs": { "get": { "operationId": "Jobs_List", "summary": "Get the list of jobs in an application", "x-ms-examples": { "List jobs": { "$ref": "./examples/jobs_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/JobCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/jobs/{jobId}": { "get": { "operationId": "Jobs_Get", "summary": "Get a job by ID", "description": "Get details about a running or completed job by job ID.", "x-ms-examples": { "Get a job by ID": { "$ref": "./examples/jobs_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/JobId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Job" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Jobs_Create", "summary": "Execute a new job", "description": "Create and execute a new job via its job definition.", "x-ms-examples": { "Execute a new job": { "$ref": "./examples/jobs_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/JobId" }, { "in": "body", "name": "body", "description": "Job definition.", "schema": { "$ref": "#/definitions/Job" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Job" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/jobs/{jobId}/devices": { "get": { "operationId": "Jobs_GetDevices", "summary": "Get device statuses", "description": "Get the list of individual device statuses by job ID.", "x-ms-examples": { "Get device statuses": { "$ref": "./examples/jobs_devices.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/JobId" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/JobDeviceStatusCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/jobs/{jobId}/rerun/{rerunId}": { "put": { "operationId": "Jobs_Rerun", "summary": "Rerun a job on failed devices", "description": "Execute a rerun of an existing job on all failed devices.", "x-ms-examples": { "Rerun a job on failed devices": { "$ref": "./examples/jobs_rerun.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/JobId" }, { "in": "path", "name": "rerunId", "description": "Unique ID of the job rerun.", "x-ms-parameter-location": "method", "type": "string", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Job" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/jobs/{jobId}/resume": { "post": { "operationId": "Jobs_Resume", "summary": "Resume a stopped job", "description": "Resume execution of an existing stopped job.", "x-ms-examples": { "Resume a stopped job": { "$ref": "./examples/jobs_resume.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/JobId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/jobs/{jobId}/stop": { "post": { "operationId": "Jobs_Stop", "summary": "Stop a running job", "description": "Stop execution of a job that is currently running.", "x-ms-examples": { "Stop a running job": { "$ref": "./examples/jobs_stop.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/JobId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/organizations": { "get": { "operationId": "Organizations_List", "summary": "Get the list of organizations the user has access to in an application", "x-ms-examples": { "List organizations": { "$ref": "./examples/organizations_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/OrganizationCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/organizations/{organizationId}": { "get": { "operationId": "Organizations_Get", "summary": "Get an organization by ID", "x-ms-examples": { "Get organization": { "$ref": "./examples/organizations_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/OrganizationId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Organization" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Organizations_Create", "summary": "Create an organization in the application", "x-ms-examples": { "Add or update organization": { "$ref": "./examples/organizations_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/OrganizationId" }, { "in": "body", "name": "body", "description": "Organization body.", "schema": { "$ref": "#/definitions/Organization" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Organization" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Organizations_Update", "summary": "Update an organization in the application via patch", "x-ms-examples": { "Update organization": { "$ref": "./examples/organizations_create.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/OrganizationId" }, { "in": "body", "name": "body", "description": "Organization patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Organization" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "Organizations_Remove", "summary": "Delete an organization", "x-ms-examples": { "Delete organization": { "$ref": "./examples/organizations_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/OrganizationId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/roles": { "get": { "operationId": "Roles_List", "summary": "Get the list of roles in an application.", "x-ms-examples": { "List roles": { "$ref": "./examples/roles_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RoleCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/roles/{roleId}": { "get": { "operationId": "Roles_Get", "summary": "Get a role by ID.", "x-ms-examples": { "Get role by ID": { "$ref": "./examples/roles_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "in": "path", "name": "roleId", "description": "Unique ID for the role.", "type": "string", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Role" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/scheduledJobs": { "get": { "operationId": "ScheduledJobs_List", "summary": "Get the list of scheduled job definitions in an application", "x-ms-examples": { "List scheduled jobs": { "$ref": "./examples/scheduledjobs_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ScheduledJobCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/scheduledJobs/{scheduledJobId}": { "get": { "operationId": "ScheduledJobs_Get", "summary": "Get a scheduled job by ID", "description": "Get details about a scheduled job by ID.", "x-ms-examples": { "Get a scheduled job by ID": { "$ref": "./examples/scheduledjobs_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/ScheduledJobId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ScheduledJob" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "ScheduledJobs_Create", "summary": "Create or update a scheduled job", "description": "Create or update a scheduled job by ID.", "x-ms-examples": { "Create a scheduled job": { "$ref": "./examples/scheduledjobs_create.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/ScheduledJobId" }, { "in": "body", "name": "body", "description": "Scheduled job definition.", "schema": { "$ref": "#/definitions/ScheduledJob" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ScheduledJob" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "ScheduledJobs_Update", "summary": "Update a scheduled job via patch", "description": "Update an existing scheduled job by ID.", "x-ms-examples": { "Update a scheduled job": { "$ref": "./examples/scheduledjobs_update.json" } }, "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/ScheduledJobId" }, { "in": "body", "name": "body", "description": "Scheduled job patch.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ScheduledJob" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "ScheduledJobs_Remove", "summary": "Delete a scheduled job", "description": "Delete an existing scheduled job by ID.", "x-ms-examples": { "Delete a scheduled job": { "$ref": "./examples/scheduledjobs_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/ScheduledJobId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/scheduledJobs/{scheduledJobId}/jobs": { "get": { "operationId": "ScheduledJobs_ListJobs", "summary": "Get the list of jobs for a scheduled job definition", "x-ms-examples": { "List running job instances": { "$ref": "./examples/scheduledjobs_list_jobs.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/ScheduledJobId" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/JobCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/users": { "get": { "operationId": "Users_List", "summary": "Get the list of users in an application", "x-ms-examples": { "List users": { "$ref": "./examples/users_list.json" } }, "parameters": [ { "$ref": "#/parameters/Version" } ], "x-ms-pageable": { "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UserCollection" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } }, "/users/{userId}": { "get": { "operationId": "Users_Get", "summary": "Get a user by ID", "x-ms-examples": { "Get a user by ID": { "$ref": "./examples/users_get.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/UserId" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/User" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "Users_Create", "summary": "Create a user in the application", "x-ms-examples": { "Add or update a service principal user": { "$ref": "./examples/users_set_serviceprincipal.json" }, "Add or update an email user": { "$ref": "./examples/users_set.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/UserId" }, { "in": "body", "name": "body", "description": "User body.", "schema": { "$ref": "#/definitions/User" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/User" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "Users_Update", "summary": "Update a user in the application via patch", "x-ms-examples": { "Update a service principal user": { "$ref": "./examples/users_set_serviceprincipal.json" }, "Update an email user": { "$ref": "./examples/users_set.json" } }, "consumes": [ "application/json", "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/UserId" }, { "in": "body", "name": "body", "description": "User patch body.", "schema": { "type": "object" }, "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/User" } }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "Users_Remove", "summary": "Delete a user", "x-ms-examples": { "Delete a user": { "$ref": "./examples/users_delete.json" } }, "parameters": [ { "$ref": "#/parameters/Version" }, { "$ref": "#/parameters/UserId" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "An error response received from the IoT Central Service.", "headers": { "x-ms-error-code": { "type": "string", "description": "Error code for specific error that occurred." } }, "schema": { "$ref": "#/definitions/Error" } } } } } }, "parameters": { "BaseDomain": { "in": "path", "name": "baseDomain", "description": "The base domain for all Azure IoT Central service requests.", "x-ms-parameter-location": "client", "type": "string", "x-ms-skip-url-encoding": true, "default": "azureiotcentral.com", "required": true }, "CommandName": { "in": "path", "name": "commandName", "description": "Name of this device command.", "x-ms-parameter-location": "method", "type": "string", "required": true }, "ComponentName": { "in": "path", "name": "componentName", "description": "Name of the device component.", "x-ms-parameter-location": "method", "type": "string", "required": true }, "DeviceGroupId": { "in": "path", "name": "deviceGroupId", "description": "Unique ID for the device group.", "x-ms-parameter-location": "method", "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9_-]*$", "required": true }, "DeviceId": { "in": "path", "name": "deviceId", "description": "Unique ID of the device.", "x-ms-parameter-location": "method", "type": "string", "required": true }, "DeviceTemplateId": { "in": "path", "name": "deviceTemplateId", "description": "Unique [Digital Twin Model Identifier](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twin-model-identifier) of the device template.", "x-ms-parameter-location": "method", "type": "string", "required": true }, "EnrollmentGroupId": { "in": "path", "name": "enrollmentGroupId", "description": "Unique ID of the enrollment group.", "x-ms-parameter-location": "method", "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9-]*$", "required": true }, "Entry": { "in": "path", "name": "entry", "description": "Entry of certificate only support primary and secondary.", "x-ms-parameter-location": "method", "type": "string", "enum": [ "primary", "secondary" ], "x-ms-enum": { "name": "CertificateEntry", "modelAsString": false, "values": [ { "value": "primary", "name": "Primary", "description": "The entry of primary certificate" }, { "value": "secondary", "name": "Secondary", "description": "The entry of secondary certificate" } ] }, "required": true }, "JobId": { "in": "path", "name": "jobId", "description": "Unique ID of the job.", "x-ms-parameter-location": "method", "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9_-]*$", "required": true }, "ModuleName": { "in": "path", "name": "moduleName", "description": "Name of the device module.", "x-ms-parameter-location": "method", "type": "string", "required": true }, "OrganizationId": { "in": "path", "name": "organizationId", "description": "Unique ID for the organization.", "x-ms-parameter-location": "method", "type": "string", "maxLength": 48, "pattern": "^(?!-)[a-z0-9-]{1,48}[a-z0-9]$", "required": true }, "RelationshipId": { "in": "path", "name": "relationshipId", "description": "Unique ID of a relationship between devices.", "x-ms-parameter-location": "method", "type": "string", "required": true }, "ScheduledJobId": { "in": "path", "name": "scheduledJobId", "description": "Unique ID of the scheduled job.", "x-ms-parameter-location": "method", "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9_-]*$", "required": true }, "Subdomain": { "in": "path", "name": "subdomain", "description": "The application subdomain.", "x-ms-parameter-location": "client", "type": "string", "required": true }, "TelemetryName": { "in": "path", "name": "telemetryName", "description": "Name of this device telemetry.", "x-ms-parameter-location": "method", "type": "string", "required": true }, "UserId": { "in": "path", "name": "userId", "description": "Unique ID for the user.", "x-ms-parameter-location": "method", "type": "string", "maxLength": 48, "pattern": "^[a-zA-Z0-9-_]*$", "required": true }, "Version": { "in": "query", "name": "api-version", "description": "The version of the API being called.", "x-ms-parameter-location": "client", "type": "string", "required": true } }, "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } } }