> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cortex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve discovery audit report

> This report shows you recent changes in your environment that aren't reflected in Cortex, including newly created repositories, services, and resources that we discover from your integrations or which were deleted in the environment but corresponding Cortex entities are still present.



## OpenAPI

````yaml /openapi/cortex_swagger.json get /api/v1/discovery-audit
openapi: 3.0.1
info:
  description: >-
    The Cortex REST API provides programmatic access to the data in the catalog,
    Scorecards, and more.
  title: Cortex API
  version: v1
servers:
  - url: https://api.getcortexapp.com
    description: Cortex Cloud API host
security:
  - bearerAuth: []
tags:
  - name: API Keys
  - name: Audit Logs
  - name: Catalog Entities
  - name: Catalogs
  - name: Custom Data
  - name: Custom Data [Advanced]
  - name: Custom Events
  - name: Custom Metrics
  - name: Dependencies
  - name: Deploys
  - name: Discovery Audit
  - name: Docs
  - name: 'Eng Intel: 1-Registry'
  - name: 'Eng Intel: 2-Metrics'
  - name: 'Eng Intel: 3-Trace'
  - name: 'Eng Intel: User Labels'
  - name: Entity Relationship Types
  - name: Entity Relationships
  - name: Entity Types
  - name: GitOps Logs
  - name: Groups
  - name: IP Allowlist
  - name: Initiatives
  - name: My Workspace
  - name: Notification Logs
  - name: On-call
  - name: Packages
  - name: Plugins
  - name: Queries
  - name: SCIM
  - name: Scaffolder
  - name: Scorecards
  - name: Secrets
  - name: Team Roles
  - name: Teams
  - name: Teams Hierarchies
  - name: Teams [Advanced]
  - name: Teams [Departments] (legacy)
  - name: Users
  - name: Verifications
  - name: Workflows
  - name: '[Integrations] AWS'
  - name: '[Integrations] Anthropic'
  - name: '[Integrations] Apiiro'
  - name: '[Integrations] ArgoCD'
  - name: '[Integrations] Azure Active Directory'
  - name: '[Integrations] Azure Devops'
  - name: '[Integrations] Azure Resources'
  - name: '[Integrations] BambooHR'
  - name: '[Integrations] Bitbucket'
  - name: '[Integrations] Bugsnag'
  - name: '[Integrations] Buildkite'
  - name: '[Integrations] Checkmarx SAST'
  - name: '[Integrations] CircleCI'
  - name: '[Integrations] ClickUp'
  - name: '[Integrations] Codecov'
  - name: '[Integrations] Coralogix'
  - name: '[Integrations] Datadog'
  - name: '[Integrations] Dynatrace'
  - name: '[Integrations] Firehydrant'
  - name: '[Integrations] GitHub'
  - name: '[Integrations] GitLab'
  - name: '[Integrations] Harness'
  - name: '[Integrations] Incident.io'
  - name: '[Integrations] Instana'
  - name: '[Integrations] Jenkins'
  - name: '[Integrations] Jira'
  - name: '[Integrations] Kubernetes'
  - name: '[Integrations] LaunchDarkly'
  - name: '[Integrations] Lightstep'
  - name: '[Integrations] Mend SAST'
  - name: '[Integrations] Mend SCA'
  - name: '[Integrations] New Relic'
  - name: '[Integrations] Okta'
  - name: '[Integrations] Opsgenie'
  - name: '[Integrations] PagerDuty'
  - name: '[Integrations] Prometheus'
  - name: '[Integrations] Rollbar'
  - name: '[Integrations] Rootly'
  - name: '[Integrations] Semgrep'
  - name: '[Integrations] Sentry'
  - name: '[Integrations] ServiceNow'
  - name: '[Integrations] SignalFx'
  - name: '[Integrations] Snyk'
  - name: '[Integrations] SonarQube'
  - name: '[Integrations] SumoLogic'
  - name: '[Integrations] Veracode'
  - name: '[Integrations] VictorOps'
  - name: '[Integrations] Wiz'
  - name: '[Integrations] Workday'
  - name: '[Integrations] xMatters'
  - name: dev-login-controller
  - name: public-scim-schema-controller
paths:
  /api/v1/discovery-audit:
    get:
      tags:
        - Discovery Audit
      summary: Retrieve discovery audit report
      description: >-
        This report shows you recent changes in your environment that aren't
        reflected in Cortex, including newly created repositories, services, and
        resources that we discover from your integrations or which were deleted
        in the environment but corresponding Cortex entities are still present.
      operationId: getDiscoveryAudit
      parameters:
        - description: Filter based on type of the event
          in: query
          name: type
          required: false
          schema:
            type: string
            enum:
              - NEW_REPOSITORY
              - REPOSITORY_DELETED
              - REPOSITORY_ARCHIVED
              - NEW_K8S_RESOURCE
              - NEW_APM_RESOURCE
              - APM_RESOURCE_NOT_DETECTED
              - NEW_AWS_RESOURCE
              - AWS_RESOURCE_NOT_DETECTED
              - NEW_GOOGLE_CLOUD_RESOURCE
              - GOOGLE_CLOUD_RESOURCE_NOT_DETECTED
              - NEW_AZURE_RESOURCE
              - AZURE_RESOURCE_NOT_DETECTED
        - description: Filter based on integration source
          in: query
          name: source
          required: false
          schema:
            type: string
            enum:
              - AWS
              - AZURE_DEVOPS
              - AZURE_RESOURCES
              - BITBUCKET
              - DATADOG
              - DYNATRACE
              - GCP
              - GITHUB
              - GITLAB
              - INSTANA
              - K8S
              - LIGHTSTEP
              - LAMBDA_CLOUD_CONTROL
              - NEWRELIC
              - SERVICENOW
              - SERVICENOW_DOMAIN
        - description: Flag to include ignored events in result
          in: query
          name: includeIgnored
          required: false
          schema:
            type: boolean
            default: false
        - description: >-
            Number of results to return per page, between 1 and 1000. Default
            250.
          in: query
          name: pageSize
          required: true
          schema:
            type: integer
            format: int32
            default: 250
        - description: Page number to return, 0-indexed. Default 0.
          in: query
          name: page
          required: true
          schema:
            type: integer
            format: int32
            default: 0
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryAuditReportResponse'
          description: Successfully retrieved discovery audit report
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    DiscoveryAuditReportResponse:
      required:
        - events
        - page
        - total
        - totalPages
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/DiscoveryAuditEvent'
        page:
          type: integer
          description: Current page number, 0-indexed
          format: int32
        total:
          type: integer
          description: Total number of results
          format: int32
        totalPages:
          type: integer
          description: Total number of pages
          format: int32
    DiscoveryAuditEvent:
      required:
        - isIgnored
        - mappingKey
        - source
        - type
      type: object
      properties:
        entity:
          $ref: '#/components/schemas/CortexEntity'
        isIgnored:
          type: boolean
          description: Specifies whether discovered event is marked as ignored
          example: true
        mappingKey:
          $ref: '#/components/schemas/EntityDiscoveryKey'
        source:
          type: string
          description: Integration source
          example: AWS
          enum:
            - AWS
            - AZURE_DEVOPS
            - AZURE_RESOURCES
            - BITBUCKET
            - DATADOG
            - DYNATRACE
            - GCP
            - GITHUB
            - GITLAB
            - INSTANA
            - K8S
            - LIGHTSTEP
            - LAMBDA_CLOUD_CONTROL
            - NEWRELIC
            - SERVICENOW
            - SERVICENOW_DOMAIN
        type:
          type: string
          description: Type of the event
          example: NEW_REPOSITORY
          enum:
            - NEW_REPOSITORY
            - REPOSITORY_DELETED
            - REPOSITORY_ARCHIVED
            - NEW_K8S_RESOURCE
            - NEW_APM_RESOURCE
            - APM_RESOURCE_NOT_DETECTED
            - NEW_AWS_RESOURCE
            - AWS_RESOURCE_NOT_DETECTED
            - NEW_GOOGLE_CLOUD_RESOURCE
            - GOOGLE_CLOUD_RESOURCE_NOT_DETECTED
            - NEW_AZURE_RESOURCE
            - AZURE_RESOURCE_NOT_DETECTED
    TooManyRequestsProblemDetail:
      required:
        - type
        - title
        - status
      type: object
      properties:
        detail:
          type: string
        instance:
          type: string
          format: uri-reference
        retryAfter:
          minimum: 0
          type: integer
          description: The number of seconds until the rate limiting resets.
          format: int32
        status:
          maximum: 599
          minimum: 100
          type: integer
          format: int32
          enum:
            - 429
        title:
          type: string
        type:
          type: string
          format: uri-reference
    CortexEntity:
      required:
        - name
        - tag
        - type
      type: object
      properties:
        description:
          type: string
          description: >-
            Description of the entity visible in the catalog. This may contain
            markdown.
        name:
          type: string
          description: Human-readable name for the entity
          example: My Favorite Entity
        tag:
          type: string
          description: >-
            Unique identifier for the entity. Corresponds to the x-cortex-tag
            field in the entity descriptor.
          example: my-favorite-entity
        type:
          type: string
          description: >-
            Type of the entity. Corresponds to the x-cortex-type field in the
            entity descriptor or 'service' for services.
          example: service
      description: Related Cortex entity
    EntityDiscoveryKey:
      required:
        - type
      type: object
      properties:
        type:
          type: string
      description: Mapping key of the event. Its schema is dependent on the source
      example:
        type: AWS
        arn: arn
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/AWS'
        - $ref: '#/components/schemas/AZURE_DEVOPS'
        - $ref: '#/components/schemas/AZURE_RESOURCES'
        - $ref: '#/components/schemas/BITBUCKET'
        - $ref: '#/components/schemas/DATADOG'
        - $ref: '#/components/schemas/DYNATRACE'
        - $ref: '#/components/schemas/GCP'
        - $ref: '#/components/schemas/GITHUB'
        - $ref: '#/components/schemas/GITLAB'
        - $ref: '#/components/schemas/INSTANA'
        - $ref: '#/components/schemas/K8S'
        - $ref: '#/components/schemas/LIGHTSTEP'
        - $ref: '#/components/schemas/NEWRELIC'
        - $ref: '#/components/schemas/SERVICENOW'
    AWS:
      type: object
      discriminator:
        propertyName: type
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - type
          type: object
          properties:
            type:
              type: string
    AZURE_DEVOPS:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - projectName
            - repoName
          type: object
          properties:
            alias:
              type: string
            basePath:
              type: string
            projectName:
              type: string
            repoName:
              type: string
    AZURE_RESOURCES:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - identifier
          type: object
          properties:
            alias:
              type: string
            identifier:
              type: string
    BITBUCKET:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - repoName
          type: object
          properties:
            alias:
              type: string
            basePath:
              type: string
            repoName:
              type: string
    DATADOG:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - serviceName
          type: object
          properties:
            serviceName:
              type: string
    DYNATRACE:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - entityId
          type: object
          properties:
            entityId:
              type: string
    GCP:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - projectId
            - resourceName
            - resourceType
          type: object
          properties:
            projectId:
              type: string
            resourceName:
              type: string
            resourceType:
              type: string
              enum:
                - AI_DATASET
                - AI_ENDPOINT
                - AI_FEATURESTORE
                - AI_PLATFORM_INDEX_ENDPOINT
                - AI_INDEX
                - AI_BATCH_PREDICTION_JOB
                - AI_MODEL_DEPLOYMENT_MONITORING_JOB
                - AI_MODEL
                - AI_TRAINING_PIPELINE
                - AI_PIPELINE_JOB
                - AI_SPECIALIST_POOL
                - AI_TENSORBOARD
                - AI_STUDY
                - AI_NOTEBOOK_INSTANCE
                - AI_VISION_APPLICATION
                - AI_VISION_PROCESSOR
                - AI_VISION_OPERATOR
                - AI_VISION_CLUSTER
                - APP_ENGINE_SERVICE
                - ARTIFACT_REGISTRY_REPOSITORY
                - BIGQUERY_CONNECTION
                - BIGQUERY_DATASET
                - FUNCTION
                - GKE_CLUSTER
                - GKE_OPERATION
                - INSTANCE_GROUP
                - LOAD_BALANCER
                - SQL
                - STORAGE
                - TOPIC
                - VM_INSTANCE
                - MEMORYSTORE_REDIS
                - MEMORYSTORE_MEMCACHED
                - RUN_SERVICE
                - RUN_JOB
                - COMPOSER_ENVIRONMENT
                - IAM_SERVICE_ACCOUNT
                - SPANNER_INSTANCE_CONFIG
                - SPANNER_INSTANCE
                - VPC_SERVERLESS_CONNECTOR
                - APIGEE_INSTANCE
                - APIGEE_API
                - PROJECT
    GITHUB:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - repoName
          type: object
          properties:
            alias:
              type: string
            basePath:
              type: string
            repoName:
              type: string
    GITLAB:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - projectId
          type: object
          properties:
            alias:
              type: string
            basePath:
              type: string
            projectId:
              type: string
    INSTANA:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - label
          type: object
          properties:
            label:
              type: string
    K8S:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - identifier
            - k8sType
          type: object
          properties:
            identifier:
              type: string
            k8sType:
              type: string
              enum:
                - DEPLOYMENT
                - STATEFUL_SET
                - ARGO_ROLLOUT
                - CRON_JOB
    LIGHTSTEP:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - name
          type: object
          properties:
            name:
              type: string
    NEWRELIC:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - id
          type: object
          properties:
            id:
              type: string
    SERVICENOW:
      type: object
      allOf:
        - $ref: '#/components/schemas/EntityDiscoveryKey'
        - required:
            - id
            - tableName
          type: object
          properties:
            id:
              type: string
            tableName:
              type: string
  responses:
    TooManyRequests:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/TooManyRequestsProblemDetail'
      description: >-
        The client has exceeded the rate limit by performing too many requests
        in a short period. Retry the request after a delay.
      headers:
        Retry-After:
          description: The number of seconds until the rate limiting resets.
          schema:
            minimum: 0
            type: integer
            format: int32
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: >-
        All requests to the Cortex API need to provide an `Authorization: Bearer
        <token>` header, where `<token>` is an API key created in the Settings
        page of your workspace.
      scheme: bearer
      type: http

````

## Related topics

- [Discovery Audit](/api/rest/discovery-audit.md)
- [Retrieve audit logs](/api/rest/audit-logs/retrieve-audit-logs.md)
- [Audit Logs](/api/rest/audit-logs.md)
