---
title: "POST /v1/{+location}/insights:writeInsight"
method: POST
path: "/v1/{+location}/insights:writeInsight"
tags: ["projects"]
---

# POST /v1/{+location}/insights:writeInsight

`POST /v1/{+location}/insights:writeInsight`

Write the data insights to workload manager data warehouse.

## Path parameters

- `location` string, required

## Request body

- WriteInsightRequest — Request for sending the data insights.
  - `agentVersion` string — Optional. The agent version collected this data point.
  - `insight` Insight — A presentation of host resource usage where the workload runs.
    - `sapValidation` SapValidation — A presentation of SAP workload insight. The schema of SAP workloads validation related data.
      - `validationDetails` SapValidationValidationDetail[] — Optional. A list of SAP validation metrics data.
        - `sapValidationType` 'SAP_VALIDATION_TYPE_UNSPECIFIED' | 'SYSTEM' | 'COROSYNC' | 'PACEMAKER' | 'HANA' | 'NETWEAVER' | 'HANA_SECURITY' | 'CUSTOM' — Optional. The SAP system that the validation data is from.
        - `details` object — Optional. The pairs of metrics data: field name & field value.
        - `isPresent` boolean — Optional. Was there a SAP system detected for this validation type.
      - `projectId` string — Required. The project_id of the cloud project that the Insight data comes from.
      - `zone` string — Optional. The zone of the instance that the Insight data comes from.
    - `instanceId` string — Optional. The instance id where the insight is generated from
    - `torsoValidation` TorsoValidation — The schema of torso workload validation data.
      - `workloadType` 'WORKLOAD_TYPE_UNSPECIFIED' | 'MYSQL' | 'ORACLE' | 'REDIS' — Required. workload_type specifies the type of torso workload.
      - `instanceName` string — Optional. instance_name lists the human readable name of the instance that the data comes from.
      - `agentVersion` string — Required. agent_version lists the version of the agent that collected this data.
      - `projectId` string — Required. project_id lists the human readable cloud project that the data comes from.
      - `validationDetails` object — Required. validation_details contains the pairs of validation data: field name & field value.
    - `sentTime` string, google-datetime — Output only. [Output only] Create time stamp
    - `agentStatus` AgentStatus — The schema of agent status data.
      - `instanceUri` string — Output only. The URI of the instance. Format: projects//zones//instances/
      - `configurationErrorMessage` string — Output only. The error message for the agent configuration if invalid.
      - `kernelVersion` SapDiscoveryResourceInstancePropertiesKernelVersion — KernelVersion encapsulates the kernel version data for the system.
        - `osKernel` SapDiscoveryResourceInstancePropertiesKernelVersionVersion — Version is reported as Major.Minor.Build.Patch.
          - `patch` integer — Optional. The patch version number.
          - `major` integer — Optional. The major version number.
          - `minor` integer — Optional. The minor version number.
          - `build` integer — Optional. The build version number.
          - `remainder` string — Optional. A catch-all for any unparsed version components. This is in case the number of points in the version string exceeds the expected count of 4.
        - `rawString` string — Optional. Raw string of the kernel version.
        - `distroKernel` SapDiscoveryResourceInstancePropertiesKernelVersionVersion — Version is reported as Major.Minor.Build.Patch.
          - `patch` integer — Optional. The patch version number.
          - `major` integer — Optional. The major version number.
          - `minor` integer — Optional. The minor version number.
          - `build` integer — Optional. The build version number.
          - `remainder` string — Optional. A catch-all for any unparsed version components. This is in case the number of points in the version string exceeds the expected count of 4.
      - `systemdServiceEnabled` 'UNSPECIFIED_STATE' | 'SUCCESS_STATE' | 'FAILURE_STATE' | 'ERROR_STATE' — Output only. Whether the agent service is enabled in systemd.
      - `services` AgentStatusServiceStatus[] — Output only. The services (process metrics, host metrics, etc.).
        - `state` 'UNSPECIFIED_STATE' | 'SUCCESS_STATE' | 'FAILURE_STATE' | 'ERROR_STATE' — Output only. The state of the service (enabled or disabled in the configuration).
        - `iamPermissions` AgentStatusIAMPermission[] — Output only. The permissions required for the service.
          - `name` string — Output only. The name of the permission.
          - `granted` 'UNSPECIFIED_STATE' | 'SUCCESS_STATE' | 'FAILURE_STATE' | 'ERROR_STATE' — Output only. Whether the permission is granted.
        - `unspecifiedStateMessage` string — Output only. The message to display when the service state is unspecified.
        - `configValues` AgentStatusConfigValue[] — Output only. The configuration values for the service.
          - `name` string — Output only. The name of the configuration value.
          - `value` string — Output only. The value of the configuration value.
          - `isDefault` boolean — Output only. Whether the configuration value is the default value or overridden.
        - `errorMessage` string — Output only. The error message for the service if it is not fully functional.
        - `name` string — Output only. The name of the service.
        - `fullyFunctional` 'UNSPECIFIED_STATE' | 'SUCCESS_STATE' | 'FAILURE_STATE' | 'ERROR_STATE' — Output only. Whether the service is fully functional (all checks passed).
      - `availableVersion` string — Output only. The available version of the agent in artifact registry.
      - `agentName` string — Output only. The name of the agent.
      - `configurationFilePath` string — Output only. The path to the agent configuration file.
      - `systemdServiceRunning` 'UNSPECIFIED_STATE' | 'SUCCESS_STATE' | 'FAILURE_STATE' | 'ERROR_STATE' — Output only. Whether the agent service is running in systemd.
      - `configurationValid` 'UNSPECIFIED_STATE' | 'SUCCESS_STATE' | 'FAILURE_STATE' | 'ERROR_STATE' — Output only. Whether the agent configuration is valid.
      - `installedVersion` string — Output only. The installed version of the agent on the host.
      - `references` AgentStatusReference[] — Output only. Optional references to public documentation.
        - `name` string — Output only. The name of the reference.
        - `url` string — Output only. The URL of the reference.
      - `cloudApiAccessFullScopesGranted` 'UNSPECIFIED_STATE' | 'SUCCESS_STATE' | 'FAILURE_STATE' | 'ERROR_STATE' — Output only. Whether the agent has full access to Cloud APIs.
    - `openShiftValidation` OpenShiftValidation — A presentation of OpenShift workload insight. The schema of OpenShift workloads validation related data.
      - `clusterId` string — Required. The OpenShift cluster ID (e.g. 8371bb05-7cac-4d38-82c0-0f58c4f6f936).
      - `validationDetails` object — Required. The validation details of the OpenShift cluster in JSON format.
    - `sapDiscovery` SapDiscovery — The schema of SAP system discovery data.
      - `databaseLayer` SapDiscoveryComponent — Message describing the system component.
        - `resources` SapDiscoveryResource[] — Optional. The resources in a component.
          - `resourceType` 'RESOURCE_TYPE_UNSPECIFIED' | 'RESOURCE_TYPE_COMPUTE' | 'RESOURCE_TYPE_STORAGE' | 'RESOURCE_TYPE_NETWORK' — Required. The type of this resource.
          - `resourceKind` 'RESOURCE_KIND_UNSPECIFIED' | 'RESOURCE_KIND_INSTANCE' | 'RESOURCE_KIND_DISK' | 'RESOURCE_KIND_ADDRESS' | 'RESOURCE_KIND_FILESTORE' | 'RESOURCE_KIND_HEALTH_CHECK' | 'RESOURCE_KIND_FORWARDING_RULE' | 'RESOURCE_KIND_BACKEND_SERVICE' | 'RESOURCE_KIND_SUBNETWORK' | 'RESOURCE_KIND_NETWORK' | 'RESOURCE_KIND_PUBLIC_ADDRESS' | 'RESOURCE_KIND_INSTANCE_GROUP' — Required. ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.
          - `relatedResources` string[] — Optional. A list of resource URIs related to this resource.
          - `updateTime` string, google-datetime — Required. Unix timestamp of when this resource last had its discovery data updated.
          - `instanceProperties` SapDiscoveryResourceInstanceProperties — A set of properties only present for an instance type resource
            - `virtualHostname` string — Optional. A virtual hostname of the instance if it has one.
            - `isDrSite` boolean — Optional. Instance is part of a DR site.
            - `instanceNumber` string, int64 — Optional. The VM's instance number.
            - `osKernelVersion` SapDiscoveryResourceInstancePropertiesKernelVersion — KernelVersion encapsulates the kernel version data for the system.
              - …
            - `clusterInstances` string[] — Optional. A list of instance URIs that are part of a cluster with this one.
            - `instanceRole` 'INSTANCE_ROLE_UNSPECIFIED' | 'INSTANCE_ROLE_ASCS' | 'INSTANCE_ROLE_ERS' | 'INSTANCE_ROLE_APP_SERVER' | 'INSTANCE_ROLE_DATABASE' | 'INSTANCE_ROLE_ASCS_ERS' | 'INSTANCE_ROLE_ASCS_APP_SERVER' | 'INSTANCE_ROLE_ASCS_DATABASE' | 'INSTANCE_ROLE_ERS_APP_SERVER' | 'INSTANCE_ROLE_ERS_DATABASE' | 'INSTANCE_ROLE_APP_SERVER_DATABASE' | 'INSTANCE_ROLE_ASCS_ERS_APP_SERVER' | 'INSTANCE_ROLE_ASCS_ERS_DATABASE' | 'INSTANCE_ROLE_ASCS_APP_SERVER_DATABASE' | 'INSTANCE_ROLE_ERS_APP_SERVER_DATABASE' | 'INSTANCE_ROLE_ASCS_ERS_APP_SERVER_DATABASE' — Optional. Bitmask of instance role, a resource may have multiple roles at once.
            - `diskMounts` SapDiscoveryResourceInstancePropertiesDiskMount[] — Optional. Disk mounts on the instance.
              - …
            - `appInstances` SapDiscoveryResourceInstancePropertiesAppInstance[] — Optional. App server instances on the host
              - …
          - `resourceUri` string — Required. URI of the resource, includes project, location, and name.
        - `applicationProperties` SapDiscoveryComponentApplicationProperties — A set of properties describing an SAP Application layer.
          - `applicationType` 'APPLICATION_TYPE_UNSPECIFIED' | 'NETWEAVER' | 'NETWEAVER_ABAP' | 'NETWEAVER_JAVA' — Required. Type of the application. Netweaver, etc.
          - `ascsUri` string — Optional. Resource URI of the recognized ASCS host of the application.
          - `kernelVersion` string — Optional. Kernel version for Netweaver running in the system.
          - `abap` boolean — Optional. Deprecated: ApplicationType now tells you whether this is ABAP or Java.
          - `ersInstanceNumber` string — Optional. Instance number of the ERS instance.
          - `nfsUri` string — Optional. Resource URI of the recognized shared NFS of the application. May be empty if the application server has only a single node.
          - `appInstanceNumber` string — Optional. Instance number of the SAP application instance.
          - `ascsInstanceNumber` string — Optional. Instance number of the ASCS instance.
        - `haHosts` string[] — Optional. A list of host URIs that are part of the HA configuration if present. An empty list indicates the component is not configured for HA.
        - `replicationSites` SapDiscoveryComponentReplicationSite[] — Optional. A list of replication sites used in Disaster Recovery (DR) configurations.
          - `sourceSite` string — Optional. The name of the source site from which this one replicates.
          - `component` SapDiscoveryComponent — recursive
        - `region` string — Optional. The region this component's resources are primarily located in.
        - `databaseProperties` SapDiscoveryComponentDatabaseProperties — A set of properties describing an SAP Database layer.
          - `databaseType` 'DATABASE_TYPE_UNSPECIFIED' | 'HANA' | 'MAX_DB' | 'DB2' | 'ORACLE' | 'SQLSERVER' | 'ASE' — Required. Type of the database. HANA, DB2, etc.
          - `sharedNfsUri` string — Optional. URI of the recognized shared NFS of the database. May be empty if the database has only a single node.
          - `databaseVersion` string — Optional. The version of the database software running in the system.
          - `instanceNumber` string — Optional. Instance number of the SAP instance.
          - `databaseSid` string — Optional. SID of the system database.
          - `landscapeId` string — Optional. Landscape ID from the HANA nameserver.
          - `primaryInstanceUri` string — Required. URI of the recognized primary instance of the database.
        - `topologyType` 'TOPOLOGY_TYPE_UNSPECIFIED' | 'TOPOLOGY_SCALE_UP' | 'TOPOLOGY_SCALE_OUT' — Optional. The detected topology of the component.
        - `hostProject` string — Required. Pantheon Project in which the resources reside.
        - `sid` string — Optional. The SAP identifier, used by the SAP software and helps differentiate systems for customers.
      - `applicationLayer` SapDiscoveryComponent — Message describing the system component.
        - `resources` SapDiscoveryResource[] — Optional. The resources in a component.
          - `resourceType` 'RESOURCE_TYPE_UNSPECIFIED' | 'RESOURCE_TYPE_COMPUTE' | 'RESOURCE_TYPE_STORAGE' | 'RESOURCE_TYPE_NETWORK' — Required. The type of this resource.
          - `resourceKind` 'RESOURCE_KIND_UNSPECIFIED' | 'RESOURCE_KIND_INSTANCE' | 'RESOURCE_KIND_DISK' | 'RESOURCE_KIND_ADDRESS' | 'RESOURCE_KIND_FILESTORE' | 'RESOURCE_KIND_HEALTH_CHECK' | 'RESOURCE_KIND_FORWARDING_RULE' | 'RESOURCE_KIND_BACKEND_SERVICE' | 'RESOURCE_KIND_SUBNETWORK' | 'RESOURCE_KIND_NETWORK' | 'RESOURCE_KIND_PUBLIC_ADDRESS' | 'RESOURCE_KIND_INSTANCE_GROUP' — Required. ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.
          - `relatedResources` string[] — Optional. A list of resource URIs related to this resource.
          - `updateTime` string, google-datetime — Required. Unix timestamp of when this resource last had its discovery data updated.
          - `instanceProperties` SapDiscoveryResourceInstanceProperties — A set of properties only present for an instance type resource
            - `virtualHostname` string — Optional. A virtual hostname of the instance if it has one.
            - `isDrSite` boolean — Optional. Instance is part of a DR site.
            - `instanceNumber` string, int64 — Optional. The VM's instance number.
            - `osKernelVersion` SapDiscoveryResourceInstancePropertiesKernelVersion — KernelVersion encapsulates the kernel version data for the system.
              - …
            - `clusterInstances` string[] — Optional. A list of instance URIs that are part of a cluster with this one.
            - `instanceRole` 'INSTANCE_ROLE_UNSPECIFIED' | 'INSTANCE_ROLE_ASCS' | 'INSTANCE_ROLE_ERS' | 'INSTANCE_ROLE_APP_SERVER' | 'INSTANCE_ROLE_DATABASE' | 'INSTANCE_ROLE_ASCS_ERS' | 'INSTANCE_ROLE_ASCS_APP_SERVER' | 'INSTANCE_ROLE_ASCS_DATABASE' | 'INSTANCE_ROLE_ERS_APP_SERVER' | 'INSTANCE_ROLE_ERS_DATABASE' | 'INSTANCE_ROLE_APP_SERVER_DATABASE' | 'INSTANCE_ROLE_ASCS_ERS_APP_SERVER' | 'INSTANCE_ROLE_ASCS_ERS_DATABASE' | 'INSTANCE_ROLE_ASCS_APP_SERVER_DATABASE' | 'INSTANCE_ROLE_ERS_APP_SERVER_DATABASE' | 'INSTANCE_ROLE_ASCS_ERS_APP_SERVER_DATABASE' — Optional. Bitmask of instance role, a resource may have multiple roles at once.
            - `diskMounts` SapDiscoveryResourceInstancePropertiesDiskMount[] — Optional. Disk mounts on the instance.
              - …
            - `appInstances` SapDiscoveryResourceInstancePropertiesAppInstance[] — Optional. App server instances on the host
              - …
          - `resourceUri` string — Required. URI of the resource, includes project, location, and name.
        - `applicationProperties` SapDiscoveryComponentApplicationProperties — A set of properties describing an SAP Application layer.
          - `applicationType` 'APPLICATION_TYPE_UNSPECIFIED' | 'NETWEAVER' | 'NETWEAVER_ABAP' | 'NETWEAVER_JAVA' — Required. Type of the application. Netweaver, etc.
          - `ascsUri` string — Optional. Resource URI of the recognized ASCS host of the application.
          - `kernelVersion` string — Optional. Kernel version for Netweaver running in the system.
          - `abap` boolean — Optional. Deprecated: ApplicationType now tells you whether this is ABAP or Java.
          - `ersInstanceNumber` string — Optional. Instance number of the ERS instance.
          - `nfsUri` string — Optional. Resource URI of the recognized shared NFS of the application. May be empty if the application server has only a single node.
          - `appInstanceNumber` string — Optional. Instance number of the SAP application instance.
          - `ascsInstanceNumber` string — Optional. Instance number of the ASCS instance.
        - `haHosts` string[] — Optional. A list of host URIs that are part of the HA configuration if present. An empty list indicates the component is not configured for HA.
        - `replicationSites` SapDiscoveryComponentReplicationSite[] — Optional. A list of replication sites used in Disaster Recovery (DR) configurations.
          - `sourceSite` string — Optional. The name of the source site from which this one replicates.
          - `component` SapDiscoveryComponent — recursive
        - `region` string — Optional. The region this component's resources are primarily located in.
        - `databaseProperties` SapDiscoveryComponentDatabaseProperties — A set of properties describing an SAP Database layer.
          - `databaseType` 'DATABASE_TYPE_UNSPECIFIED' | 'HANA' | 'MAX_DB' | 'DB2' | 'ORACLE' | 'SQLSERVER' | 'ASE' — Required. Type of the database. HANA, DB2, etc.
          - `sharedNfsUri` string — Optional. URI of the recognized shared NFS of the database. May be empty if the database has only a single node.
          - `databaseVersion` string — Optional. The version of the database software running in the system.
          - `instanceNumber` string — Optional. Instance number of the SAP instance.
          - `databaseSid` string — Optional. SID of the system database.
          - `landscapeId` string — Optional. Landscape ID from the HANA nameserver.
          - `primaryInstanceUri` string — Required. URI of the recognized primary instance of the database.
        - `topologyType` 'TOPOLOGY_TYPE_UNSPECIFIED' | 'TOPOLOGY_SCALE_UP' | 'TOPOLOGY_SCALE_OUT' — Optional. The detected topology of the component.
        - `hostProject` string — Required. Pantheon Project in which the resources reside.
        - `sid` string — Optional. The SAP identifier, used by the SAP software and helps differentiate systems for customers.
      - `metadata` SapDiscoveryMetadata — Message describing SAP discovery system metadata
        - `definedSystem` string — Optional. Customer defined, something like "E-commerce pre prod"
        - `environmentType` string — Optional. Should be "prod", "QA", "dev", "staging", etc.
        - `customerRegion` string — Optional. Customer region string for customer's use. Does not represent GCP region.
        - `sapProduct` string — Optional. This SAP product name
      - `updateTime` string, google-datetime — Required. Unix timestamp this system has been updated last.
      - `projectNumber` string — Optional. The GCP project number that this SapSystem belongs to.
      - `workloadProperties` SapDiscoveryWorkloadProperties — A set of properties describing an SAP workload.
        - `productVersions` SapDiscoveryWorkloadPropertiesProductVersion[] — Optional. List of SAP Products and their versions running on the system.
          - `version` string — Optional. Version of the product.
          - `name` string — Optional. Name of the product.
        - `softwareComponentVersions` SapDiscoveryWorkloadPropertiesSoftwareComponentProperties[] — Optional. A list of SAP software components and their versions running on the system.
          - `extVersion` string — Optional. The component's minor version.
          - `type` string — Optional. The component's type.
          - `version` string — Optional. The component's major version.
          - `name` string — Optional. Name of the component.
      - `useDrReconciliation` boolean — Optional. Whether to use DR reconciliation or not.
      - `systemId` string — Output only. A combination of database SID, database instance URI and tenant DB name to make a unique identifier per-system.
    - `sqlserverValidation` SqlserverValidation — A presentation of SQLServer workload insight. The schema of SqlServer workloads validation related data.
      - `validationDetails` SqlserverValidationValidationDetail[] — Optional. A list of SqlServer validation metrics data.
        - `type` 'SQLSERVER_VALIDATION_TYPE_UNSPECIFIED' | 'OS' | 'DB_LOG_DISK_SEPARATION' | 'DB_MAX_PARALLELISM' | 'DB_CXPACKET_WAITS' | 'DB_TRANSACTION_LOG_HANDLING' | 'DB_VIRTUAL_LOG_FILE_COUNT' | 'DB_BUFFER_POOL_EXTENSION' | 'DB_MAX_SERVER_MEMORY' | 'INSTANCE_METRICS' | 'DB_INDEX_FRAGMENTATION' | 'DB_TABLE_INDEX_COMPRESSION' | 'DB_BACKUP_POLICY' — Optional. The Sqlserver system that the validation data is from.
        - `details` SqlserverValidationDetails[] — Required. Details wraps map that represents collected data names and values.
          - `fields` object — Required. Collected data is in format.
      - `agentVersion` string — Optional. The agent version collected this data point
      - `projectId` string — Required. The project_id of the cloud project that the Insight data comes from.
      - `instance` string — Required. The instance_name of the instance that the Insight data comes from. According to https://linter.aip.dev/122/name-suffix: field names should not use the _name suffix unless the field would be ambiguous without it.
  - `requestId` string — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/workloadmanager.md) · [All operations](https://skmtc.net/google/apis/workloadmanager/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/workloadmanager/versions/1fdb3d3057d0/schema)
