---
title: "Get top field by finding count"
method: GET
path: "/compliance/api/v1/compliance_result/top/{field}/{count}"
tags: ["compliance"]
---

# Get top field by finding count

`GET /compliance/api/v1/compliance_result/top/{field}/{count}`

## Request

- Base URL: `https://api.opengovernance.io`
- URL: `https://api.opengovernance.io/compliance/api/v1/compliance_result/top/{field}/{count}`
- Auth: API key in header `Authorization`

Retrieving the top field by finding count.

## Path parameters

- `field` 'resourceType' | 'integrationID' | 'resourceID' | 'service' | 'controlID', required
- `count` integer, required

## Query parameters

- `integrationId` string[]
- `notIntegrationId` string[]
- `connectionGroup` string[]
- `connector` string[]
- `benchmarkId` string[]
- `controlId` string[]
- `severities` string[]
- `complianceStatus` string[]
- `stateActive` boolean[]
- `jobId` string[]
- `startTime` integer
- `endTime` integer
- `interval` string

## Response `200`

OK

- GithubComOpengovernOpengovernancePkgComplianceApiGetTopFieldResponse
  - `records` GithubComOpengovernOpengovernancePkgComplianceApiTopFieldRecord[]
    - `control` GithubComOpengovernOpengovernancePkgComplianceApiControl
      - `cliRemediation` string
      - `connector` string[]
      - `createdAt` string
      - `description` string
      - `documentURI` string
      - `enabled` boolean
      - `explanation` string
      - `guardrailRemediation` string
      - `id` string
      - `managed` boolean
      - `manualRemediation` string
      - `manualVerification` boolean
      - `nonComplianceCost` string
      - `programmaticRemediation` string
      - `query` GithubComOpengovernOpengovernancePkgComplianceApiQuery
        - `Global` boolean
        - `createdAt` string
        - `engine` string
        - `id` string
        - `integrationType` string[]
        - `listOfTables` string[]
        - `parameters` GithubComOpengovernOpengovernancePkgComplianceApiQueryParameter[]
          - `key` string
          - `required` boolean
        - `primaryTable` string
        - `queryToExecute` string
        - `updatedAt` string
      - `severity` 'none' | 'low' | 'medium' | 'high' | 'critical'
      - `tags` object
      - `title` string
      - `updatedAt` string
      - `usefulExample` string
    - `controlCount` integer
    - `controlTotalCount` integer
    - `count` integer
    - `field` string
    - `integration` GithubComOpengovernOpengovernanceServicesIntegrationApiModelsIntegration
      - `annotations` object
      - `credential_id` string
      - `integration_id` string
      - `integration_type` string
      - `labels` object
      - `last_check` string
      - `name` string
      - `provider_id` string
      - `state` 'ACTIVE' | 'INACTIVE' | 'ARCHIVED'
    - `resourceCount` integer
    - `resourceTotalCount` integer
    - `resourceType` GithubComOpengovernOpengovernancePkgInventoryApiResourceType
      - `attributes` string[]: List supported steampipe Attributes (columns) for this resource type - Metadata (GET only)
      - `compliance` string[]: List of Compliance that support this Resource Type - Metadata (GET only)
      - `compliance_count` integer: Number of Compliance that use this Resource Type - Metadata
      - `count` integer: Number of Resources of this Resource Type - Metric
      - `integration_type` string: Cloud Provider
      - `logo_uri` string: Logo URI
      - `old_count` integer: Number of Resources of this Resource Type in the past - Metric
      - `resource_name` string: Resource Name
      - `resource_type` string: Resource Type
      - `service_name` string: Service Name
      - `tags` string[]: Tags
    - `service` string
    - `totalCount` integer
  - `totalCount` integer

---

[API](https://skmtc.dev/opengovern/apis/opengovernance-service-api.md) - [All operations](https://skmtc.dev/opengovern/apis/opengovernance-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/opengovern/apis/opengovernance-service-api/revisions/ab05295c4094?raw)
