{"type":"api","title":"Add Devices","meta":{"id":"/apps/pubhub/media/edm-api-v2/a2a30bcc9ecab5281b65761ae61df7e0031d5691/f67a4e01-0023-334a-9a4a-7e606c2ef1a2","swagger":"2.0","info":{"contact":{"email":"devmgmt@cisco.com"},"description":"This is the IoT device management core service. The service is responsible for managing the lifecycle of various IoT gateways and endpoints deployed as part of the Field Area Networks","license":{"name":"Licensing is primarily subscription based. Call Andy now!","url":"https://www.cisco.com"},"termsOfService":"http://swagger.io/terms/","title":"IoT Device Lifecycle Management","version":"4.0.0"},"host":"us.ciscoiot.com","basePath":"/nbapi/edm/v1","schemes":["https"],"securityDefinitions":{"bearerAuth":{"description":"This is the bearer Auth token.","in":"header","name":"Authorization","type":"apiKey"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"apiKeyGenerator":{"$remoteModule":"./config/apikey.js"}}},"spec":{"consumes":["application/json"],"description":"Manually add new devices (max-count 10) through UI or add list of devices in a CSV file.\u003cbr /\u003e One of the below permissions is needed to invoke this API\u003cbr /\u003e- Tenant Management\u003cbr /\u003e- Manage Devices\u003cbr /\u003e- Add Devices","operationId":"addDevices","parameters":[{"description":"The uuid of the tenant in whose context we are calling the api.","format":"uuid","in":"header","name":"x-tenant-id","required":true,"type":"string"},{"description":"Devices that needs to be added from array/file","in":"body","name":"body","required":true,"schema":{"description":"list of devices to add","items":{"example":{"eid":"IE-3200-8P2S+12345612347","fields":{"configGroup":"default-ie3200","deviceType":"ie3200","field:name":"ie3200-three"}},"type":"object"},"type":"array","uniqueItems":true,"$$ref":"#/definitions/NewDeviceList"}}],"produces":["application/json"],"responses":{"201":{"description":"Created device/devices list if all the devices added correctly","headers":{"Count":{"description":"Total number of devices created","type":"integer"}},"schema":{"example":{"body":null,"message":"Device with following ID added successfully: [IE-3200-8P2S+12345612348]","statusCode":1},"type":"object"}},"400":{"description":"Bad Request or if any device fails to add/file has any issues reading","schema":{"description":"Specifies the error that occurred during the device add api request.","example":{"code":29,"message":"Error Adding Device. Cause : Following resource already exists: Key (eid)=(IE-3200-8P2S+12345612347) already exists.","meta":null},"type":"object","$$ref":"#/definitions/NewDeviceAddError"}},"401":{"description":"Unauthorized","schema":{"example":"Unauthorized","type":"string"}},"403":{"description":"Forbidden","schema":{"example":"Permission denied to access the resource","type":"string"}},"500":{"description":"Server failure","schema":{"example":"Could not connect to server","type":"string"}}},"summary":"Add device(s) to the system manually/bulk upload using csv","tags":["devices"],"__originalOperationId":"addDevices","security":[{"bearerAuth":[]}],"method":"post","path":"/devices"}}