Exposure Management

Search attack surface assets

Changed on

Search the hosts, web properties and certificates of your attack surface. A query that references risk.* fields returns risk instances instead of assets. Reference the documentation on Censys Query Language for information about query syntax.

post/v1/attacksurfaces/{attack_surface_id}/search

Request

  • Base URL
    https://api.platform.censys.io
  • URL
    https://api.platform.censys.io/v1/attacksurfaces/{attack_surface_id}/search
  • Auth
    HTTP bearer

Path parameters

attack_surface_idstring required

The ID of the attack surface, or the literal 'default' for your organization's attack surface. Obtain the attack surface ID using the list attack surfaces endpoint.

Example:11111111-2222-3333-4444-555555555555

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

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

Request body

fieldsstring[] nullable

Specify fields to only return in the response. If you provide fields and omit host.services.port, host.services.transport_protocol, and host.services.protocol, then matched_services will not be returned in the response.

page_sizeinteger nullable

Number of results to return to per page. The default and maximum is 100.

page_tokenstring

page token for the requested page of search results

querystring required

CenQL query string to search upon

Example request

{
  "query": "host.services: (protocol=SSH and not port: 22)"
}

Response

Assets found successfully

Changes