Get Organization Count API

Use this API to fetch the total number of organizations or subsidiaries that match your search criteria.

[POST] /rest/2.0/am/organization/count

Input Filter ParametersInput Filter Parameters

Filter Parameter Mandatory/
Optional
Data Type Description
filters Optional Object List of filter conditions used to refine search results.
field Optional String Provide the token name to filter the response. 
operator Optional String Provide the operator.

Supported values: CONTAINS, IN, EQUALS, NOT_EQUALS

value Optional String Provide the organization name.
operation Optional String This is the logical operator used to add multiple filters.

Supported values: AND, OR.

Sample: Fetch the count of organizations or subsidiariesSample: Fetch the count of organizations or subsidiaries

API Request with filter in JSON

curl -X POST
'<qualys_base_url>/rest/2.0/am/organization/count'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{
    "filters": [
      {
        "field": "orgs.country",
        "operator": "EQUALS",
        "value": "QUALYS TECHNOLOGIES"
      }
    ],
    "operation": "AND"
  }'

API Request with filter in XML

curl -X POST
'<qualys_base_url>/rest/2.0/am/organization/count'
-H 'accept: application/xml'
-H 'Content-Type: application/xml'
-d '
    <filters>
      <Criteria field="orgs.country" operator="EQUALS">
        <value>QUALYS TECHNOLOGIES</value>
      </Criteria>
    </filters>
    <operation>AND</operation>

API Response

{
  "US": 23,
  "CA": 5,
  "IN": 3,
  "NL": 1
}

For the supported tokens and operator list, refer to Supported Operators.