v1

latestOpenAPI 3.1.02026-07-2481742657.4 KB
Supply Chain Intelligence

Aggregate supply chain assets

Aggregate assets across a supply chain by a given field. By default the aggregation covers every supplier in the supply chain; provide supplier_ids to narrow it to specific suppliers.

post/v1/supplychains/{supply_chain_id}/assets/aggregate

Path parameters

supply_chain_idstring uuid required

The ID of a Censys supply chain. Obtain the supply chain ID using the list supply chains endpoint to find the IDs of your organization's supply chains.

Example:11111111-2222-3333-4444-555555555555

The ID of a Censys supply chain. Obtain the supply chain ID using the list supply chains endpoint to find the IDs of your organization's supply chains.

Query parameters

organization_idstring uuid required

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information.

Example:11111111-2222-3333-4444-555555555555

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information.

Headers

X-Organization-IDstring uuid

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information. Note: The header parameter is supported for atypical use cases; we recommend always providing this field via the query parameter.

Example:11111111-2222-3333-4444-555555555555

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information. Note: The header parameter is supported for atypical use cases; we recommend always providing this field via the query parameter.

Request body

count_by_levelstring

Specifies which document level's count is returned per term bucket, primarily for nested fields. This is the same functionality available in the Count By dropdown in the Report Builder UI. When aggregating on nested fields like 'host.services.port': empty string (default) counts documents at the deepest level containing the field; '.' counts root documents (e.g. counts matching 'host'); 'host.services' counts documents at the specified nested level.

fieldstring required

field to aggregate by

filter_by_queryboolean

Controls whether aggregation results are limited to values that match the query. When true, only field values that satisfy the query constraints are included in aggregation counts. When false, aggregation includes all field values from records that match the query, even if those specific field values don't match the query constraints. For example, if the query is 'host.services.protocol=SSH' and you are aggregating by 'host.services.port' - when true, only shows SSH ports; when false, shows all ports on hosts that have SSH services.

number_of_bucketsinteger required

number of buckets to split results into

querystring required

CenQL query string to search upon

supplier_idsstring[] nullable

The IDs of Censys suppliers in the supply chain to narrow the aggregation to, each as a unique UUID string. When omitted, the entire supply chain is aggregated.

Example request

{
  "field": "host.services.port",
  "query": "host.services.protocol=SSH",
  "supplier_ids": [
    "11111111-2222-3333-4444-555555555555"
  ]
}

Response

Assets aggregated successfully