---
name: ContinuousDelivery-add_devops_insights
title: Adding DevOps Insights to your toolchain
description: Use IBM Cloud&reg; DevOps Insights to help improve build quality for your projects. DevOps Insights is a tool that provides data for team insights and deployment risk. Get insights about your application by uploading unit tests, code coverage, functional verification tests, and static security scans for each application to DevOps Insights.
last-updated: 2026-07-23
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/ContinuousDelivery?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Adding DevOps Insights to your toolchain
{: #add-devops-insights}

DevOps Insights will reach end of service and be discontinued on **August 31, 2026**. After this date, the service will no longer be available. New DevOps Insights tool integrations can no longer be created. [Learn more](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-faq_region_feature_consolidation&format=markdown)
{: important}

Use IBM Cloud&reg; DevOps Insights to help improve build quality for your projects. DevOps Insights is a tool that provides data for team insights and deployment risk. Get insights about your application by uploading unit tests, code coverage, functional verification tests, and static security scans for each application to DevOps Insights.
{: shortdesc}


## Before you begin
{: #adding-insights-prereq}

To use DevOps Insights, you must have a toolchain. A toolchain is a group of tools that are attached to one of your applications. Think of the tools as enhancements to the app and the toolchain as a utility belt. DevOps Insights works with the other tools in the toolchain, like GitHub and Delivery Pipeline, to aggregate data for your application.

For more information about toolchains, see [Creating a toolchain from an app](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-toolchains_getting_started&format=markdown#creating_a_toolchain_from_an_app).


## Integrating DevOps Insights
{: #integrate-insights-toolchain}

### Integrating DevOps Insights by using the console
{: #integrate-insights-toolchain-ui}
{: ui}

You can add DevOps Insights to any toolchain by selecting it from the tool integration catalog.

1. From the IBM Cloud console, click the **Menu** icon ![hamburger icon](images/icon_hamburger.svg) > **Platform Automation** > **Toolchains**.
2. Select your toolchain.  
3. Click **Add tool**.
4. Select the **DevOps Insights** tile.
5. Click **Create Integration**.
6. On the Toolchain's Overview page, on the **IBM Cloud tools** card, click **DevOps Insights** to view your DevOps Insights dashboard.

### Integrating DevOps Insights with the API
{: #integrate-insights-toolchain-api}
{: api}

1. [Obtain an IAM bearer token](https://cloud.ibm.com/apis/toolchain#authentication){: external}. Alternatively, if you are using an SDK, [obtain an IAM API key](https://cloud.ibm.com/iam/apikeys){: external} and set the client options by using environment variables.
   
   ```bash
   export CD_TOOLCHAIN_AUTH_TYPE=iam && \
   export CD_TOOLCHAIN_APIKEY={iam_api_key} && \
   export CD_TOOLCHAIN_URL={base_url}
   ```
   {: pre}

2. [Determine the region and ID of the toolchain](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-toolchains_getting_started&interface=api&format=markdown#viewing-toolchain-api) that you want to add the DevOps Insights tool integration to.

3. Add the DevOps Insights tool integration to the toolchain.

   ```curl
   curl -X POST \
     {base_url}/toolchains/{toolchain_id}/tools \
     -H 'Authorization: Bearer {token}' \
     -H 'Accept: application/json` \
     -H 'Content-Type: application/json' \
       -d '{
       "tool_type_id": "draservicebroker",
       "name": "{tool_integration_name}"
     }'
   ```
   {: pre}
   {: curl}

   ```javascript
   const CdToolchainV2 = require('@ibm-cloud/continuous-delivery/cd-toolchain/v2');
   ...
   (async () => { 
      const toolchainService = CdToolchainV2.newInstance();
      const draPrototypeModel = {
         toolchainId: {toolchain_id},
         toolTypeId: 'draservicebroker',
         name: {tool_integration_name}
      };
      const draTool = await toolchainService.createTool(draPrototypeModel);
   })();
   ```
   {: codeblock}
   {: node}

   ```go
   import (
	   "github.com/IBM/continuous-delivery-go-sdk/cdtoolchainv2"
   )
   ...
   toolchainClientOptions := &cdtoolchainv2.CdToolchainV2Options{}
   toolchainClient, err := cdtoolchainv2.NewCdToolchainV2UsingExternalConfig(toolchainClientOptions)
   createDraToolOptions := toolchainClient.NewCreateToolOptions({toolchain_id}, "draservicebroker")
   createDraToolOptions.SetName({tool_integration_name})
   draTool, response, err := toolchainClient.CreateTool(createDraToolOptions)
   ```
   {: codeblock}
   {: go}

   ```python
   from ibm_continuous_delivery.cd_toolchain_v2 import CdToolchainV2
   ...
   toolchain_service = CdToolchainV2.new_instance()
   dra_tool = toolchain_service.create_tool(
      name = {tool_integration_name},
      toolchain_id = {toolchain_id},
      tool_type_id = "draservicebroker"
   )
   ```
   {: codeblock}
   {: python}

   ```java
   import com.ibm.cloud.continuous_delivery.cd_toolchain.v2.CdToolchain;
   import com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model.*;
   ...
   CdToolchain toolchainService = CdToolchain.newInstance();
   CreateToolOptions createDraToolOptions = new CreateToolOptions.Builder()
      .name({tool_integration_name})
      .toolchainId({toolchain_id})
      .toolTypeId("draservicebroker")
      .build();
   Response<ToolchainToolPost> response = toolchainService.createTool(createDraToolOptions).execute();
   ToolchainToolPost draTool = response.getResult();
   ```
   {: codeblock}
   {: java}

The following table lists and describes each of the variables that are used in the previous steps.   
    
| Variable | Description |
|:---------|:------------|
| `{base_url}` | The Toolchain API endpoint URL, for example `https://api.us-south.devops.cloud.ibm.com/toolchain/v2`. For more information about this endpoint URL, including a list of values, see [Endpoint URL](https://cloud.ibm.com/apis/toolchain#endpoint-url){: external}. |
| `{iam_api_key}` | Your IAM API key. |
| `{tool_integration_name}` | A name for your tool integration. |
| `{toolchain_id}` | The ID of the toolchain to which to add the tool integration. |
| `{token}` | A valid IAM bearer token. |
{: caption="Variables for adding the DevOps Insights tool integration with the API" caption-side="top"}

For more information about the DevOps Insights tool integration, see [Adding DevOps Insights](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-dra&format=markdown).

### Integrating DevOps Insights with Terraform
{: #integrate-insights-toolchain-terraform}
{: terraform}

1. To install the Terraform CLI and configure the IBM Cloud provider plug-in for Terraform, follow the tutorial for [Getting started with Terraform on IBM Cloud](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-getting-started&format=markdown).

2. Locate the Terraform file (for example, `main.tf`) that contains the resource block for the toolchain to which you want to add the DevOps Insights tool integration. In this file, add the configuration to create the tool integration.

   The following example creates the toolchain if it does not exist, then adds the DevOps Insights tool integration by using the `ibm_cd_toolchain_tool_devopsinsights` resource.
  
   ```terraform
   data "ibm_resource_group" "group" {
     name = "default"
   }

   resource "ibm_cd_toolchain" "cd_toolchain" {
     name              = "my toolchain"
     resource_group_id = data.ibm_resource_group.group.id
   }

   resource "ibm_cd_toolchain_tool_devopsinsights" "cd_toolchain_tool_insights" {
     toolchain_id = ibm_cd_toolchain.cd_toolchain.id
   }
   ```
   {: codeblock}

   For more information about `ibm_cd_toolchain_tool_devopsinsights`, see the argument reference details in the [Terraform Registry Documentation](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_toolchain_tool_devopsinsights){: external}.
  
3. Initialize the Terraform CLI.

   ```terraform
   terraform init
   ```
   {: pre}
   
4. Create a Terraform execution plan. This plan summarizes all of the actions that must run to add the DevOps Insights tool integration to the toolchain.

   ```terraform
   terraform plan
   ```
   {: pre}

5. Apply the Terraform execution plan. Terraform takes all of the required actions to add the DevOps Insights tool integration to the toolchain.

   ```terraform
   terraform apply
   ```
   {: pre}

For more information about using Terraform with Continuous Delivery, see [Setting up Terraform for Continuous Delivery](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-terraform-setup&format=markdown).

## Next steps
{: #adding-next-steps}

After you add DevOps Insights, you can publish quality data from other sources. These sources include IBM&reg; Continuous Delivery Pipeline for IBM Cloud&reg; in the toolchain, Jenkins, Travis CI, or other pipelines. To learn more, see [aggregating data from multiple sources into a single toolchain](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-aggregating-multiple-sources&format=markdown).