Skip to main content

QUERY

Constant QUERY 

Source
pub const QUERY: &str = "#Gets the list of devices limited to the first 1000\n#hasMore - if there are more devices in the account than requested\n#total - total number of devices based on query filter and account\n#Retrieves details of each devices such as\n#id, online/offline state, lastReported Date\n#which users have accounts\n#tags and attributes associated with each device\n\nquery GetDevices($orgId: String, $limit: Int, $offset: Int, $state: String) {\n    login {\n        account(id: $orgId) {\n            devices (size: $limit, from: $offset, state: $state) {\n                hasMore\n                total\n                items {\n                    id\n                    name\n                    online\n                    created\n                    state\n                    lastReported\n                    access {\n                        created\n                        user {\n                            id\n                            email\n                        }\n                        scripting\n                    }\n                    tags {\n                        name\n                    }\n                    attributes\n                    services {\n                        id\n                        name\n                        created\n                        access {\n                            created\n                            user {\n                                id\n                                email\n                            }\n                            scripting\n                        }\n                        application\n                        attributes\n                        enabled\n                    }\n                    categoryA\n                    categoryB\n                    categoryC\n                    categoryD\n                    categoryE\n\n                }\n            }\n        }\n    }\n}\n";