Skip to content

Commit

Permalink
API/Resources: Add docs for the device type resource
Browse files Browse the repository at this point in the history
Change-type: minor
  • Loading branch information
thgreasi committed Feb 19, 2024
1 parent e368070 commit 01cfe85
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions config/dictionaries/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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(<ID>)",
"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='<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'<DEVICE TYPE NAME>'"
},
{
"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",
Expand Down

0 comments on commit 01cfe85

Please sign in to comment.