Skip to main content

JSON Structure

The returned JSON is structured into four main sections.

{
"metadata": {
...
},
"data": {
...
},
"relations": {
...
},
"references": {
...
}
}

metadata

metadata contains information about build, license and requested data.

The main intention is to provide information as to how Squid understood and executed the query it was given. This is of limited value for proven production queries but has proven useful when building and testing queries.

{
"metadata": {
"powered_by": "arc46.io",
"git": "squid-1.1.0.0+0-1f88b4a",
"build": "2025-09-21T15:30:41.370Z",
"license_max_entities": "Unlimited",
"license_valid_till": "2050-12-31T23:59:59.000Z",
"requested_by": "arc46_rest_demo",
"request_received": "2025-10-02T09:23:35.877Z",
"config": "cmdb_ci_server",
"requested_relations": {
"cmdb_ci_server": [
"ci_to_asset"
]
},
"row_count": 1,
"limit_request": 10,
"sys_ids": [
"5f9b83bfc0a8010e005a2b3212c9dc07"
],
"updatedBefore": "2025-12-31T12:00:00Z",
"updatedSince": "2020-12-31T12:00:00Z",
"lastDiscoveredBefore": "2025-12-31T12:00:00Z",
"lastDiscoveredSince": "2020-12-31T12:00:00Z",
"provided_filter": "base_cpu_count>10",
"combined_filter": "base_sys_idIN5f9b83bfc0a8010e005a2b3212c9dc07^base_sys_updated_on<2025-12-31 12:00:00^base_sys_updated_on>=2020-12-31 12:00:00^base_last_discovered<2025-12-31 12:00:00^base_last_discovered>=2020-12-31 12:00:00^base_cpu_count>10"
},
  • powered_by - arc46.io
  • git - Git commit of the Squid version processing the request.
  • build - Build timestamp of Squid processing the request.
  • licensed_max_entities - See Pricing.
  • license_valid_till - See License.
  • requested_by - the authenticated user calling Squid.
  • request_received - timestamp when Squid was first invoked.
  • config - the configuration you have requested.
  • row_count - the number of entities returned by the base query.

Optional metadata:
(These will only be present if applicable.)

  • requested_relations - any relations requested.
  • updatedBefore - the updatedBefore query parameter as parsed by Squid
  • updatedSince - the updatedSince query parameter as parsed by Squid
  • lastDiscoveredBefore - the lastDiscoveredBefore query parameter as parsed by Squid
  • lastDiscoveredSince - the lastDiscoveredSince query parameter as parsed by Squid
  • provided_filter - the encodedQuery query parameter of the request.
  • view_filter - the encodedQuery as defined in the configuration.
  • combined_filter - the encodedQuery applied by ServiceNow to the view of the configuration. This is the combination of all applicable filters as returned by ServiceNow after the data query has been executed.

data

{
...,
"data": [
{
"asset_tag": "P1000182",
...
},
{
"asset_tag": "P1000183"
}
],
...
}

relations

Unless relations are rendered inline they are rendered in the seperate relations section.

The sysId of the entity is

{
...,
"relations": {
"5f9b83bfc0a8010e005a2b3212c9dc07": { <= sysId of the entity
"asset": [ <= relation name
{ <= the target of the relation, here rendered as Relation Reference
"sys_id": "9bc1fa8837f3100044e0bfc8bcbe5d26",
"sys_class_name": "alm_asset"
}
]
}
},
...
}

referenced

All referenced entities are rendered in the referenced section.

This enables Squid to consolidate and minimize database queries. Instead of retrieving referenced entities one by one, Squid keeps track of all referenced entities and the retrieves them with a single query per target configuration.

The sysId of the entity is the key.

{
...,
"referenced": {
"30ad318577ab2300454792718a10619e": { <= sysId of the entity
"active": true, <= entity rendered according to the target config
"department": {
"sys_id": "21d148bb475706103c1eb150706d430f",
"sys_class_name": "cmn_department"
},
"first_name": "Nirali",
"last_name": "Patel",
"name": "Nirali Patel",
"sys_class_name": "sys_user",
"sys_created_by": "admin",
"sys_created_on": "2019-02-09T05:59:28Z",
"sys_id": "30ad318577ab2300454792718a10619e",
"sys_mod_count": 6,
"sys_updated_by": "rainer@arc46.io",
"sys_updated_on": "2025-09-20T19:14:25Z",
"user_name": "homepage.alp"
},
"86ddef6d47360a103c1eb150706d436a": {
"country": "Germany",
"customer": false,
"manufacturer": false,
"name": "Accord Investments",
"sys_class_name": "core_company",
"sys_created_by": "rainer@arc46.io",
"sys_created_on": "2024-06-15T06:30:23Z",
"sys_id": "86ddef6d47360a103c1eb150706d436a",
"sys_mod_count": 1,
"sys_updated_by": "rainer@arc46.io",
"sys_updated_on": "2024-06-15T06:53:58Z",
"vendor": false
}
},
...
}
We track. Ok?