JSON query examples
Example 1
In this example we would like to get all objects from the module 1004 (assets) with item type 25 (in our system this is PC) that has been updated after 7 (am) 2023-10-02 and we would like to get the following properties back: id, sequenceId, created and fields. The fields property will return all non system fields / properties that has a value.
Simple
| {
"query": "query { items(module: 1004, itemType: 25, updatedAfter: \"2023-10-02T07:00:00.000Z\") { fields created sequenceId id } }"
}
|
With variables
| {
"query": "query Items($module: Int!, $itemType: Int!, $updatedAfter: DateTime!) { items(module: $module, itemType: $itemType, updatedAfter: $updatedAfter) { fields created sequenceId id } }",
"variables": {
"module": 1004,
"itemType": 25,
"updatedAfter": "2023-10-02T07:00:00.000Z"
}
}
|