This API allows you to query devices and fetch details related to them. The API offers various endpoints to facilitate different types of search queries.
The base URL for all the API endpoints is http://[your_domain]/api/
.
GET
/devices/search
q
: String to search in codename
, name
, or vendor
.GET /api/devices/search?q=iphone
Returns a JSON array of all devices that match the query string in either codename
, name
, or vendor
.
GET
/devices/single
codename
: The codename of the device.GET /api/devices/single?codename=Pixel_4a
Returns a JSON object of the device that matches the codename.
GET
/devices
name
: String to search in name
.megapixel
: Minimal camera megapixels.size_in
: Maximum screen size in inches.release
: Release year.resolution
: Screen resolution.screen_type
: Screen technology type.soc
: System on Chip.storage
: Storage size.vendor
: Vendor name.version
: OS version.short_view
: Use this parameter for a shorter view of devices.GET /api/devices?megapixel=3&vendor=Apple&short_view=true
Returns a JSON array of all devices that match the query parameters.
codename
(string): Codename of the device.name
(string): Name of the device.megapixel
(float): Camera quality in megapixels.size_in
(float): Screen size in inches.release
(string): Release year.resolution
(string): Screen resolution.screen_type
(string): Screen technology.soc
(string): System on Chip.storage
(string): Storage size.vendor
(string): Vendor name.version
(string): OS version.400 Bad Request
: The request could not be understood or was missing required parameters.404 Not Found
: Resource was not found.500 Internal Server Error
: An error occurred on the server.short_view
parameter will return a trimmed-down version of the device object.megapixel
and size_in
parameters accept decimal values.I hope this helps! Feel free to customize it further as you see fit.