{"type":"api","title":"Assign Sensors To Asset","meta":{"id":"/apps/pubhub/media/cisco-iot-suite/64f8fe4b343793ff572741607351ff520b6a158d/5c66b3aa-a761-3029-b823-c160b9ed90db","swagger":"2.0","info":{"contact":{"email":"asset-tracking-team@cisco.com"},"description":"This service exposes APIs for managing AssetTypes, Assets, Sensors, Gateways deployed in the network.","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"http://swagger.io/terms/","title":"Industrial Asset Vision","version":"1.0.0"},"host":"us.ciscoiot.com","basePath":"/at/nbapi/v1","schemes":["https"],"externalDocs":{"description":"Find out more about Industrial Asset Vision","url":"https://www.cisco.com/c/en/us/products/cloud-systems-management/industrial-asset-vision/index.html"},"securityDefinitions":{"BearerToken":{"in":"header","name":"Authorization","type":"apiKey"}},"x-parser-conf":{"apiKeyGenerator":{"$remoteModule":"./config/apikey.js"},"serverConfig":true,"meta":{"useProxy":true}}},"spec":{"consumes":["application/json"],"description":"Assign Sensors to Asset","operationId":"assignSensorsToAsset","parameters":[{"description":"Asset Id","format":"uuid","in":"path","name":"assetId","required":true,"type":"string","x-example":"b376f226-25ad-4f90-b706-f977a51f4cb2"},{"description":"Sensor id(s) that need to be assigned to the Asset","in":"body","name":"body","required":true,"schema":{"example":{"sensorIdList":["041d87103-ec31-4e46-a670-a8347fd26b5b","bdf6ee02-7013-4196-b4a9-9a0565135116","0ebf937f-bbed-4691-992a-702b02df7833"]},"properties":{"sensorIdList":{"description":"List of Sensor Ids to be assigned to the Asset","items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object","$$ref":"#/definitions/AssignSensorsRequest"}}],"produces":["application/json"],"responses":{"200":{"description":"Success","schema":{"example":{"successUUIDList":["41d87103-ec31-4e46-a670-a8347fd26b5b","bdf6ee02-7013-4196-b4a9-9a0565135116","0ebf937f-bbed-4691-992a-702b02df7833"]},"properties":{"failureUUIDList":{"description":"List of failed Sensor Ids","items":{"format":"uuid","type":"string"},"type":"array"},"successUUIDList":{"description":"List of successfully assigned Sensor Ids","items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object","$$ref":"#/definitions/AssignSensorsResponse"}},"207":{"description":"Partial Success","examples":{"application/json":{"failureUUIDList":["0ebf937f-bbed-4691-992a-702b02df7833"],"successUUIDList":["41d87103-ec31-4e46-a670-a8347fd26b5b","bdf6ee02-7013-4196-b4a9-9a0565135116"]}},"schema":{"example":{"successUUIDList":["41d87103-ec31-4e46-a670-a8347fd26b5b","bdf6ee02-7013-4196-b4a9-9a0565135116","0ebf937f-bbed-4691-992a-702b02df7833"]},"properties":{"failureUUIDList":{"description":"List of failed Sensor Ids","items":{"format":"uuid","type":"string"},"type":"array"},"successUUIDList":{"description":"List of successfully assigned Sensor Ids","items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object","$$ref":"#/definitions/AssignSensorsResponse"}},"400":{"description":"Bad Request","schema":{"description":"Contains errorCode and message","example":{"message":"Error Message","status":"4xx/500"},"properties":{"message":{"description":"A user readable message that describes the error in details.","type":"string"},"status":{"description":"Http Status Code that describes the error","type":"integer"}},"type":"object","$$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"description":"Contains errorCode and message","example":{"message":"Error Message","status":"4xx/500"},"properties":{"message":{"description":"A user readable message that describes the error in details.","type":"string"},"status":{"description":"Http Status Code that describes the error","type":"integer"}},"type":"object","$$ref":"#/definitions/Error"}},"403":{"description":"Forbidden","schema":{"description":"Contains errorCode and message","example":{"message":"Error Message","status":"4xx/500"},"properties":{"message":{"description":"A user readable message that describes the error in details.","type":"string"},"status":{"description":"Http Status Code that describes the error","type":"integer"}},"type":"object","$$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"description":"Contains errorCode and message","example":{"message":"Error Message","status":"4xx/500"},"properties":{"message":{"description":"A user readable message that describes the error in details.","type":"string"},"status":{"description":"Http Status Code that describes the error","type":"integer"}},"type":"object","$$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"description":"Contains errorCode and message","example":{"message":"Error Message","status":"4xx/500"},"properties":{"message":{"description":"A user readable message that describes the error in details.","type":"string"},"status":{"description":"Http Status Code that describes the error","type":"integer"}},"type":"object","$$ref":"#/definitions/Error"}}},"security":[{"BearerToken":[]}],"summary":"Assign Sensors to Asset","tags":["Assets"],"__originalOperationId":"assignSensorsToAsset","method":"post","path":"/assets/{assetId}/assign"}}