# Device type

## Get a device type by its ID

> \## Device type Resource Fields\
> \
> \| Field |\
> \| :--- |\
> \| \`id\` |\
> \| \`slug\` |\
> \| \`name\` |\
> \| \`is\_private\` |\
> \| \`is\_of\_\_cpu\_architecture\` |\
> \| \`belongs\_to\_\_device\_family\` |\
> \
> \
> \---\
> \
> \`GET /v7/device\_type(\<ID>)\`\
> \
> When querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional.

```json
{"openapi":"3.0.0","info":{"title":"Balena API Spec","version":"7.0.0"},"servers":[{"url":"https://api.balena-cloud.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/v7/device_type({ID})":{"get":{"tags":["Device type"],"summary":"Get a device type by its ID","description":"## Device type Resource Fields\n\n| Field |\n| :--- |\n| `id` |\n| `slug` |\n| `name` |\n| `is_private` |\n| `is_of__cpu_architecture` |\n| `belongs_to__device_family` |\n\n\n---\n\n`GET /v7/device_type(<ID>)`\n\nWhen querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional.","parameters":[{"name":"ID","in":"path","required":true}]}}}}
```

## Get a device type by its SLUG

> \`GET /v7/device\_type(slug='\<DEVICE TYPE SLUG>')\`\
> \
> When querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional.

```json
{"openapi":"3.0.0","info":{"title":"Balena API Spec","version":"7.0.0"},"servers":[{"url":"https://api.balena-cloud.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/v7/device_type(slug='{DEVICE TYPE SLUG}')":{"get":{"tags":["Device type"],"summary":"Get a device type by its SLUG","description":"`GET /v7/device_type(slug='<DEVICE TYPE SLUG>')`\n\nWhen querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional.","parameters":[{"name":"DEVICE TYPE SLUG","in":"path","required":true}]}}}}
```

## Get a device type by its NAME

> \`GET /v7/device\_type\`\
> \
> When querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional.\
> \
> \
> \### Usage Variations\
> \
> \--- \
> \#### Get all supported device types\
> \`GET /v7/device\_type?$filter=is\_default\_for\_\_application/any(idfa:(idfa/is\_host eq true) and (idfa/is\_archived eq false) and (idfa/owns\_\_release/any(r:(r/status eq 'success') and (r/is\_final eq true) and (r/is\_invalidated eq false))))&$orderby=name asc\`\
> \
> When querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional.

```json
{"openapi":"3.0.0","info":{"title":"Balena API Spec","version":"7.0.0"},"servers":[{"url":"https://api.balena-cloud.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/v7/device_type":{"get":{"tags":["Device type"],"summary":"Get a device type by its NAME","description":"`GET /v7/device_type`\n\nWhen querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional.\n\n\n### Usage Variations\n\n--- \n#### Get all supported device types\n`GET /v7/device_type?$filter=is_default_for__application/any(idfa:(idfa/is_host eq true) and (idfa/is_archived eq false) and (idfa/owns__release/any(r:(r/status eq 'success') and (r/is_final eq true) and (r/is_invalidated eq false))))&$orderby=name asc`\n\nWhen querying a private device type it's necessary to include your bearer token. For public device types the auth header is optional."}}}}
```
