# Devices

## List

> Get a list of devices of a given team.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Devices"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["devices:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/devices":{"get":{"tags":["Devices"],"summary":"List","description":"Get a list of devices of a given team.","parameters":[{"name":"teamId","in":"query","schema":{"type":"integer"},"required":true},{"name":"assigned","in":"query","schema":{"type":"boolean"},"description":"true = devices with scenarioId; false = devices without scenarioId - this filter only affects the trigger scope"},{"name":"viewForScenarioId","in":"query","schema":{"type":"integer"},"description":"Devices assigned to the scenario and not assigned devices. If this parameter is set assigned parameter is ignored."},{"name":"scope[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["call","scanner"]}}},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","udid","scope","info","queueCount","queueLimit","scenarioId"]}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"udid":{"type":"string"},"scope":{"type":"array","items":{"type":"string"}},"info":{"type":"object"},"queueCount":{"type":"integer"},"queueLimit":{"type":"integer"},"scenarioId":{"type":"integer"}}}}}}}}}}}}}}
```

## Detail

> The ID can be id or udid.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Devices"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["devices:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/devices/{deviceId}":{"get":{"tags":["Devices"],"summary":"Detail","description":"The ID can be id or udid.","parameters":[{"name":"deviceId","in":"path","schema":{"type":"integer"},"required":true},{"name":"inspector","in":"query","schema":{"type":"integer"}},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","udid","scope","info","queueCount","queueLimit","scenarioId"]}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"udid":{"type":"string"},"scope":{"type":"array","items":{"type":"string"}},"info":{"type":"object"},"queueCount":{"type":"integer"},"queueLimit":{"type":"integer"},"scenarioId":{"type":"integer"}}}}}}}}}}}}}
```

## Delete

> Errors:\<br />> \
> IM004 - Confirmation required (error with metadata) - needs confirmation\<br />> \
> IM405 - Device can't be deleted because it contains messages in queue (error with metadata) - needs confirmation\<br />> \
> IM005 - Device is locked by a running scenario and thus can't be deleted

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Devices"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["devices:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/devices/{deviceId}":{"delete":{"tags":["Devices"],"summary":"Delete","description":"Errors:<br />\r\nIM004 - Confirmation required (error with metadata) - needs confirmation<br />\r\nIM405 - Device can't be deleted because it contains messages in queue (error with metadata) - needs confirmation<br />\r\nIM005 - Device is locked by a running scenario and thus can't be deleted","parameters":[{"name":"deviceId","in":"path","schema":{"type":"string"},"required":true},{"name":"confirmed","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"integer"}}}}}}}}}}}
```

## Partial update

> Update a device

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Devices"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["devices:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/devices/{deviceId}":{"patch":{"tags":["Devices"],"summary":"Partial update","description":"Update a device","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"parameters":[{"name":"deviceId","in":"path","schema":{"type":"string"},"required":true},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","teamId","udid","scope","info","queueCount","queueLimit","scenarioId"]}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"udid":{"type":"string"},"scope":{"type":"array","items":{"type":"string"}},"info":{"type":"object"},"queueCount":{"type":"integer"},"queueLimit":{"type":"integer"},"scenarioId":{"type":"integer"}}}}}}}}}}}}}
```

## Create request

> Required scope: devices:write

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Devices"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["devices:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/devices/request":{"post":{"tags":["Devices"],"summary":"Create request","description":"Required scope: devices:write","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"teamId":{"type":"integer"}}}}}},"parameters":[{"name":"inspector","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"createDeviceRequest":{"type":"object","properties":{"udid":{"type":"string"},"inspector":{"type":"boolean"}}}}}}}}}}}}}
```
