swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Sensors API schemes: - https tags: - name: Sensors paths: /sensor-partners/{sensorPartnerId}/sensors: get: tags: - Sensors description: Returns a paginated list of sensor resources. operationId: microsoftAzureSensorsList produces: - application/json parameters: - in: query name: sensorDataModelIds description: Id's of the sensor data models. type: array items: type: string collectionFormat: multi - in: query name: sensorMappingIds description: Ids of the sensor mappings. type: array items: type: string collectionFormat: multi - in: path name: sensorPartnerId description: Id of the associated sensor partner. required: true type: string - in: query name: deviceIds description: Id's of the devices. type: array items: type: string collectionFormat: multi - in: query name: ids description: Ids of the resource. type: array items: type: string collectionFormat: multi - in: query name: names description: Names of the resource. type: array items: type: string collectionFormat: multi - in: query name: propertyFilters description: "Filters on key-value pairs within the Properties object.\r\neg. \"{testKey} eq {testValue}\"." type: array items: type: string collectionFormat: multi - in: query name: statuses description: Statuses of the resource. type: array items: type: string collectionFormat: multi - in: query name: minCreatedDateTime description: Minimum creation date of resource (inclusive). type: string format: date-time - in: query name: maxCreatedDateTime description: Maximum creation date of resource (inclusive). type: string format: date-time - in: query name: minLastModifiedDateTime description: Minimum last modified date of resource (inclusive). type: string format: date-time - in: query name: maxLastModifiedDateTime description: Maximum last modified date of resource (inclusive). type: string format: date-time - in: query name: maxPageSize description: "Maximum number of items needed (inclusive).\r\nMinimum = 10, Maximum = 1000, Default value = 50." type: integer format: int32 default: 50 maximum: 1000 minimum: 10 - in: query name: skipToken description: Skip token for getting next set of results. type: string - in: query name: api-version description: The requested API version required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/SensorListResponse' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-pageable: nextLinkName: nextLink x-ms-examples: Sensors_List: $ref: ./examples/Sensors_List.json summary: Microsoft Azure Get Sensor Partners Sensorpartnerid Sensors /sensor-partners/{sensorPartnerId}/sensors/{sensorId}: patch: tags: - Sensors description: Create a sensor entity. operationId: microsoftAzureSensorsCreateorupdate consumes: - application/merge-patch+json produces: - application/json parameters: - in: path name: sensorPartnerId description: Id of the sensor partner. required: true type: string - in: path name: sensorId description: Id of the sensor resource. required: true type: string - in: query name: api-version description: The requested API version required: true type: string - in: body name: sensorDetails description: Sensor object details. required: true schema: $ref: '#/definitions/Sensor' responses: '200': description: Success schema: $ref: '#/definitions/Sensor' '201': description: Created schema: $ref: '#/definitions/Sensor' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Sensors_CreateOrUpdate: $ref: ./examples/Sensors_CreateOrUpdate.json summary: Microsoft Azure Patch Sensor Partners Sensorpartnerid Sensors Sensorid get: tags: - Sensors description: Gets a sensor entity. operationId: microsoftAzureSensorsGet produces: - application/json parameters: - in: path name: sensorPartnerId description: Id of the sensor partner. required: true type: string - in: path name: sensorId description: Id of the sensor resource. required: true type: string - in: query name: api-version description: The requested API version required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/Sensor' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Sensors_Get: $ref: ./examples/Sensors_Get.json summary: Microsoft Azure Get Sensor Partners Sensorpartnerid Sensors Sensorid delete: tags: - Sensors description: Deletes a sensor entity. operationId: microsoftAzureSensorsDelete produces: - application/json parameters: - in: path name: sensorPartnerId description: Id of the sensor partner. required: true type: string - in: path name: sensorId description: Id of the sensor resource. required: true type: string - in: query name: api-version description: The requested API version required: true type: string responses: '204': description: No Content default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Sensors_Delete: $ref: ./examples/Sensors_Delete.json summary: Microsoft Azure Delete Sensor Partners Sensorpartnerid Sensors Sensorid /sensor-partners/{sensorPartnerId}/sensors/{sensorId}/connection-strings: get: tags: - Sensors description: Gets a sensor connection string. operationId: microsoftAzureSensorsGetconnectionstring produces: - application/json parameters: - in: path name: sensorPartnerId description: Id of the sensor partner. required: true type: string - in: path name: sensorId description: Id of the sensor resource. required: true type: string - in: query name: api-version description: The requested API version required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/IoTHubDeviceAuthentication' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Sensors_GetConnectionString: $ref: ./examples/Sensors_GetConnectionString.json summary: Microsoft Azure Get Sensor Partners Sensorpartnerid Sensors Sensorid Connection Strings /sensor-partners/{sensorPartnerId}/sensors/{sensorId}/connection-strings/:renew: post: tags: - Sensors description: Renews a sensor connection string. operationId: microsoftAzureSensorsRenewconnectionstring consumes: - application/json produces: - application/json parameters: - in: path name: sensorPartnerId description: Id of the sensor partner. required: true type: string - in: path name: sensorId description: Id of the sensor resource. required: true type: string - in: query name: api-version description: The requested API version required: true type: string - in: body name: renewConnectionStringModel description: Sensor's connection string model. required: true schema: $ref: '#/definitions/SensorRenewConnectionStringModel' responses: '200': description: Success schema: $ref: '#/definitions/IoTHubDeviceAuthentication' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Sensors_RenewConnectionString: $ref: ./examples/Sensors_RenewConnectionString.json summary: Microsoft Azure Post Sensor Partners Sensorpartnerid Sensors Sensorid Connection Strings :renew definitions: ErrorResponse: description: An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document. type: object properties: error: $ref: '#/definitions/Error' traceId: description: Unique trace Id. type: string Location: description: Location model class. required: - latitude - longitude type: object properties: latitude: format: double description: Latitude of the location. maximum: 90 minimum: -90 type: number longitude: format: double description: Longitude of the location. maximum: 180 minimum: -180 type: number IoTHubDeviceAuthentication: description: Authentication via connection string to IoTHub devices. type: object properties: primaryDeviceConnectionString: description: Primary connection string of the ioTHub device. type: string readOnly: true secondaryDeviceConnectionString: description: Secondary connection string of the ioTHub device. type: string readOnly: true Port: description: Schema for storing port values. type: object properties: name: description: Name of the port. maxLength: 50 minLength: 1 type: string type: description: Type of port digital/analog. maxLength: 100 minLength: 0 type: string SensorListResponse: description: Paged response contains list of requested objects and a URL link to get the next set of results. required: - value type: object properties: value: description: List of requested objects. type: array items: $ref: '#/definitions/Sensor' skipToken: description: Token used in retrieving the next page. If null, there are no additional pages. type: string nextLink: description: Continuation link (absolute URI) to the next page of results in the list. type: string InnerError: description: Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. type: object properties: code: description: Specific error code than was provided by the containing error. type: string innererror: $ref: '#/definitions/InnerError' SensorRenewConnectionStringModel: description: Model for renewing sensor's connection string. required: - connectionStringType type: object properties: connectionStringType: description: Specifies the type of connection string key to be renewed valid values - Primary/Secondary/Both. maxLength: 100 minLength: 0 enum: - Primary - Secondary - Both type: string x-ms-enum: name: RenewConnectionStringType modelAsString: true Sensor: description: Sensor API model. type: object properties: sensorDataModelId: description: Id of the associated sensor data model. type: string integrationId: description: Integration id for the device. type: string hardwareId: description: Id of the associated hardware. type: string deviceId: description: Id of the associated device. type: string type: description: Type of sensor. maxLength: 100 minLength: 0 type: string location: $ref: '#/definitions/Location' port: $ref: '#/definitions/Port' depthInMeters: description: "Depth of each sensor measure in meters.\r\nLike sensor moisture at 2m, 4m, 6m." type: array items: format: double type: number sensorPartnerId: description: Id of the associated sensor partner. type: string readOnly: true id: description: Id of the resource. type: string readOnly: true status: description: Status of the resource. maxLength: 100 minLength: 0 type: string createdDateTime: format: date-time description: 'Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.' type: string readOnly: true example: '2020-12-31T11:10:21Z' modifiedDateTime: format: date-time description: 'Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.' type: string readOnly: true example: '2020-12-31T11:10:21Z' eTag: description: The ETag value to implement optimistic concurrency. type: string readOnly: true name: description: Name to identify resource. maxLength: 100 minLength: 0 type: string description: description: Textual description of the resource. maxLength: 500 minLength: 0 type: string createdBy: description: Created by user/tenant id. type: string readOnly: true modifiedBy: description: Modified by user/tenant id. type: string readOnly: true properties: description: "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and\r\nonly string, numeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported." type: object additionalProperties: {} example: key1: value1 key2: 123.45 Error: description: An error from the Azure AgPlatform service. required: - code - message type: object properties: code: description: Server-defined set of error codes. minLength: 1 type: string message: description: Human-readable representation of the error. minLength: 1 type: string target: description: Target of the error. type: string details: description: Array of details about specific errors that led to this reported error. type: array items: $ref: '#/definitions/Error' innererror: $ref: '#/definitions/InnerError' x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'