From 01cfe85fa7a02704a761f71631369173f4b2f8fa Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Mon, 19 Feb 2024 10:31:10 +0200 Subject: [PATCH] API/Resources: Add docs for the `device type` resource Change-type: minor --- config/dictionaries/resource.json | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index 5be5773d8b..bcb53aa18c 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -438,6 +438,52 @@ } ] }, + { + "id": "device_type", + "name": "Device type", + "fields": [ + "id", + "slug", + "name", + "is_private", + "is_of__cpu_architecture", + "belongs_to__device_family" + ], + "examples": [ + { + "id": "device-type-by-id", + "summary": "Get the details of a device type by ID.", + "description": "The bearer token is optional for targeting public device types, but is required for private ones.", + "method": "GET", + "endpoint": "/v6/device_type()", + "filters": "" + }, + { + "id": "device-type-by-handle", + "summary": "Get the details of a device type by its SLUG.", + "description": "The bearer token is optional for targeting public device types, but is required for private ones.", + "method": "GET", + "endpoint": "/v6/device_type(slug='')", + "filters": "" + }, + { + "id": "device-type-by-name", + "summary": "Get the details of a device type by its NAME.", + "description": "The bearer token is optional for targeting public device types, but is required for private ones.", + "method": "GET", + "endpoint": "/v6/device_type", + "filters": "?\\$filter=name%20eq%20''" + }, + { + "id": "get-supported-device-types", + "summary": "Get all supported device types.", + "description": "The bearer token is optional for retrieving the public device types, but is required in order to also include private ones.", + "method": "GET", + "endpoint": "/v6/device_type", + "filters": "?\\$filter=is_default_for__application/any(idfa:(idfa/is_host%20eq%20true)%20and%20(idfa/is_archived%20eq%20false)%20and%20(idfa/owns__release/any(r:(r/status%20eq%20'success')%20and%20(r/is_final%20eq%20true)%20and%20(r/is_invalidated%20eq%20false))))&\\$orderby=name%20asc" + } + ] + }, { "id": "device_config_variable", "name": "Device config variable",