Skip to main content

JSON Structure

The returned JSON is structured into five main sections.

{
"metadata": {
...
},
"data": {
...
},
// optional, depending on query parameter 'showTags'
"tags": {
...
},
"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
{
"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 the Squid version processing the request.
  • licensed_max_entities - See Pricing.
  • 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.)

  • license_valid_till - See License. Only present if license is valid.
  • license_error_msg - error message if license is invalid or expired.
  • 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.

Extended metadata:
(Only rendered with queryParameter metaData)

  • config_queries - the amount of SQL queries executed in order to retrieve configuration data.
  • config_cache - caching stats for configuration data.
    • view_metadata - Squid caches metadata for views (column types, internal datatype, target tables for references).
    • references - Squid caches reference configurations.
  • duration_parse_config - time spent retrieving and parsing the requested configuration.
  • base_data_query_start - timestamp when the base query was executed.
  • base_data_query_duration - time spent executing the base query.
  • base_data_query_returned - timestamp when the base query returned.
  • data_queries - the amount of SQL queries executed in order to retrieve data.
extended metadata
{
"metadata": {
...
"config_cache": {
"view_metadata": {
"hits": 12,
"misses": 0
},
"references": {
"hits": 10,
"misses": 0
}
},
"duration_parse_config": "123ms",
"base_data_query_start": "2025-12-15T10:22:27.129Z",
"base_data_query_duration": "2ms",
"base_data_query_returned": "2025-12-15T10:22:27.131Z",
"data_queries": 1,
...
}
}

data

data contains the entities directly defined by the configuration. The content depends on the configuration you requested.

data
{
...,
"data": [
{
"asset_tag": "P1000173",
"assigned_to": {
"sys_id": "b9fe0810472a02103c1eb150706d431f",
"sys_class_name": "sys_user"
},
"classification": "Production",
"company": {
"sys_id": "72f2c03f475706103c1eb150706d437f",
"sys_class_name": "core_company"
},
"cpu_count": 1,
"cpu_manufacturer": {
"sys_id": "067018092b2692103c92f65ac891bf66",
"sys_class_name": "core_company"
},
"cpu_speed": 3192,
"cpu_type": "GenuineIntel",
"department": {
"sys_id": "21d148bb475706103c1eb150706d430f",
"sys_class_name": "cmn_department"
},
"discovery_source": "ServiceNow",
"firewall_status": "Intranet",
"install_status": 1,
"life_cycle_stage": "Operational",
"life_cycle_stage_status": "In Use",
"location": {
"sys_id": "a6e4e92b2b2522103c92f65ac891bf6d",
"sys_class_name": "cmn_location"
},
"managed_by": {
"sys_id": "aadd23ad47360a103c1eb150706d43e1",
"sys_class_name": "sys_user"
},
"managed_by_group": {
"sys_id": "6577e5908f972410960c53ac37bdee66",
"sys_class_name": "sys_user_group"
},
"manufacturer": {
"sys_id": "4a0ba562478872503c1eb150706d4301",
"sys_class_name": "core_company"
},
"model_id": {
"sys_id": "47aa6b3f3763100044e0bfc8bcbe5d76",
"sys_class_name": "cmdb_model"
},
"name": "lb_1534.arc46.io",
"operational_status": 1,
"os": "Linux Red Hat",
"os_version": "Enterprise Server 3",
"ram": -1,
"serial_number": "543234578",
"short_description": "Loadbalancer",
"sys_class_name": "cmdb_ci_server",
"sys_created_by": "glide.maint",
"sys_created_on": "2008-05-23T20:37:13Z",
"sys_id": "106c5c13c61122750194a1e96cfde951",
"sys_updated_by": "rainer@arc46.io",
"sys_updated_on": "2025-10-10T08:12:18Z",
"virtual": false
},
{
"asset_tag": "P1000114",
"assigned_to": {
"sys_id": "30ad318577ab2300454792718a10619e",
"sys_class_name": "sys_user"
},
...
"virtual": false
}
],
...
}

tags

Public cloud provider have adopted tags as way of adding metadata to entities (AWS, Azure, GCP) making tags a common and established way of qualifying and accessing configuration items, especially in a dev-ops environment.

ServiceNow supports this concept by way of cmdb_key_value. This table is populated by Cloud Discovery, but may also be populated directly.

Tags are not Tags

ServiceNow uses the term tag for a slightly different concept. See Tags for details on the ServiceNow usage.

Squid users are mainly peripheral systems or devOps integrations. These users generally understand tag as described by the major public cloud providers. We try to make life easy for our users.

tags are only rendered if explicitly requested by setting the query parameter showTags.

See showTags for details on the different render forms.

tags with queryParameter showTags or showTags=object
{
...,
"tags": {
"995390bccd34f010f8778495fd9bf7f7": { <= sys_id of the entity
// key : value
"Owner": "SD DC Ops",
"Location": "San Diego",
"Environment": "Production"
}
},
...
}
tags with queryParameter showTags=array
{
...,
"tags": {
"995390bccd34f010f8778495fd9bf7f7": [ <= sys_id of the entity
{
// key
"name": "Owner",
// value
"value": "SD DC Ops"
},
{
"name": "Location",
"value": "San Diego"
},
{
"name": "Environment",
"value": "Production"
}
]
},
...
}

relations

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

The sysId of the entity is the key.

{
...,
"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?