Detected country: US
logo
API Docs

Getting Started

  • How to get started with Cobalt

Assets

  • Assets are what we pentest
  • Asset Types
  • Create an Asset
  • Risk Advisories

Pentests

  • Pentests
  • Create a Pentest
    • Overview
    • Asset Details
    • Pentest Details
    • Scope & Test Period
    • Preparation
  • Create an Autonomous Pentest
    • Launch a Saved Autonomous Pentest
    • Review a Closed Autonomous Pentest Report
  • Pentest Process
  • Pentest States
  • Coverage Checklist
  • Pentest Expectations
  • In House Pentests
    • Complete an In-House Pentest (For Pentesters)
    • Set Up an In-House Pentest
  • Findings
    • Remediate Findings
    • Finding States
    • Severity Levels
  • Reports
    • Contents of a Pentest Report
    • Customize Your Report
    • Co-branded Reports
  • Preparation

Engagements

  • Engagements Overview
  • Digital Risk Assessment
  • Secure Code Review

Findings

  • Findings

Insights

  • Insights

Planning

  • Planning

Methodologies

  • Cobalt Methodologies Overview
  • Web Methodologies
  • Autonomous Web Methodologies
  • API Methodologies
  • External Network Methodologies
  • Internal Network Methodologies
  • Mobile Methodologies
  • Cloud Configuration Review Methodologies
  • Cloud Pentest Methodology
  • Desktop Methodologies
  • AI/LLM Methodologies
  • Digital Risk Assessment Methodology
  • Secure Code Review Methodologies

Attack Surface

  • Attack Surface Monitoring (ASM)

DAST Scanner

  • DAST Scanner Overview
  • Best Practices
  • FAQ
  • Integrations
  • Partial Scans: Reduced Scope
  • Scans
  • Sequence recorder
  • Targets
  • Target Authentication
  • Extra Hosts
  • Blackout Period

User Account

  • Account Overview
  • Account Settings
  • Password Best Practices
  • Sign In to Cobalt
  • Troubleshoot Sign-in Issues

Collaboration

  • Collaboration Overview
  • Collaborate on Pentests
  • Groups
  • Manage Pentest Collaborators
  • User Roles and Permissions
  • Manage Notifications

Organization

  • Organization Overview
  • Manage Users
  • Your Cobalt Contract
  • Configure Organization Settings
    • Configure SAML SSO
    • SAML Migration: Update Your Configuration
    • SCIM Provisioning Setup Guide

Credits

  • Cobalt PtaaS Tiers
  • Cobalt Credits
  • Track Your Credits

Integrations

  • Cobalt Integrations Overview
  • Integration Builder
    • Connect your applications
    • How to Guides
      • Create Azure DevOps Work Item for Findings
      • Create GitHub tickets for Findings
      • Create GitLab tickets for Findings
      • Send email notifications for Findings from Outlook
      • Send MS Teams notifications for Findings
      • Create Jira tickets for Findings
      • HTTP Connector
      • Import Assets from Google Sheets
      • Map Cobalt Pentest Finding Severity to Jira Issue Priority
      • Modify Jira Issue Summary to contain Pentest Title
    • Troubleshooting
  • Integrate Jira with Cobalt
    • Jira Cloud Integration
    • Jira Data Center Integration
    • Push Cobalt Findings to Jira
    • Synchronize Cobalt Severity Levels with Jira
    • Switching to a New Jira Instance
    • Troubleshoot Your Jira Integration
  • Slack
  • Microsoft Teams
  • Webhooks
  • DefectDojo
  • Kenna Security
  • Vanta
  • Carried Over Findings
  • Create Test Finding
  • Wiz

Cobalt API

  • Cobalt API Overview
  • Create a Personal Cobalt API Token
  • Get an Organization Token
  • Revoke Your Personal Cobalt API Tokens
  • Create or Modify an Asset
  • Import Findings to Google Sheets

Glossary

  • Glossary

What's New

  • August 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • November 2025 
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • January 2024
  • Product Updates
‌
‌
‌
logo

Powered by

Assistant

Ask new question

Powered by
  • Home
  • Cobalt API
  • Import Findings to Google Sheets

Import Findings to Google Sheets

7min read

Share

Retrieve Findings and Import Them to Google Sheets

Learn how to retrieve all findings using the Cobalt API and import them to Google Sheets.

:::info Use this document with our Cobalt API documentation to retrieve Cobalt findings for all pentests.

:::

Complete the following steps:

  • Step 1: Get all findings
  • Step 2: Import findings to Google Sheets
  • Step 3: Visualize findings data

To use our API, you need a Cobalt account with membership in your organization. Your organization owner can create an account and assign you as a member. Your organization owner is typically the user who interacts with the Cobalt Customer Success Manager (CSM).

What You Need

  • Personal API token: YOUR-PERSONAL-API-TOKEN
  • Organization token: YOUR-V2-ORGANIZATION-TOKEN

Step 1: Get All Findings

Retrieve all findings of an organization with the following REST call:

curl -X GET "https://api.cobalt.io/findings" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN" \
  | jq .

Click to view a sample response.

You should see output similar to:

{
  "data": [
    {
      "resource": {
        "id": "vl_3sP2RCWWUajc3oRXmbQ4j9",
        "tag": "#PT3334_37",
        "title": "XSS vulnerability",
        "description": "Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts...",
        "type_category": "Cross-Site Scripting (XSS)",
        "labels": [
          {
            "name": "Your label"
          }
        ],
        "impact": 5,
        "likelihood": 4,
        "severity": "high",
        "affected_targets": [
          "https://example.com",
          "192.168.1.1"
        ],
        "proof_of_concept": "Here you can see...",
        "severity_justification": "The vulnerability can cause a lot of damage",
        "suggested_fix": "Ensure this...",
        "prerequisites": "Credentials are needed",
        "pentest_id": "pt_PEtv4dqnwGV2efZhLw3BM5",
        "http_request": "HTTP GET / ...",
        "asset_id": "as_HcChCMueiPQQgvckmZtRSd",
        "log": [
          {
            "action": "created",
            "timestamp": "2021-04-01T15:13:24.322Z"
          },
          {
            "action": "likelihood_changed",
            "value": 4,
            "timestamp": "2021-04-01T15:14:05.856Z"
          },
          {
            "action": "impact_changed",
            "value": 5,
            "timestamp": "2021-04-01T15:14:05.856Z"
          },
          {
            "action": "state_changed",
            "value": "need_fix",
            "timestamp": "2021-04-01T15:14:06.757Z"
          },
          {
            "action": "state_changed",
            "value": "check_fix",
            "timestamp": "2021-04-01T15:14:57.845Z"
          }
        ],
        "state": "check_fix",
        "created_at": "2022-09-26T18:35:18.759Z",
        "updated_at": "2022-09-26T18:36:57.462Z",
        "attachments": [
          {
            "id": "at_LA5GcEL4HRitFGCHREqmzL",
            "file_name": "rainbow.jpeg",
            "download_url": "https://s3.amazonaws.com/acmecorp/uploads/attachment/file/12345/rainbow.jpeg?something=1"
          }
        ]
      },
      "links": {
        "ui": {
          "url": "https://api.cobalt.io/links/eyJ0eXBlIjoic29tZXRoaW5nIiwib3JnU2x1ZyI6ImNvYmFsdCIsInBlbnRlc3RUYWciOiJz="
        }
      }
    }
  ],
  "pagination": {
    "next_page": "/findings?cursor=a1b2c3d4",
    "prev_page": "/findings?cursor=4d3c2b1a"
  }
}

For more information on each parameter, see our API reference documentation on how to get all findings.

If the command is successful, you’ll see the following HTTP code:

MessageMeaning
200 OKFindings for all pentests of an organization are returned.

For a list of error codes, see the Errors section of our API reference.

Step 2: Import Findings to Google Sheets

Now that you have findings data in JSON format, you can import it to the spreadsheet software of your choice.

As an example, let’s import findings to Google Sheets.

  1. In Google Sheets, select Extensions > Apps Script.

  2. Use the Class UrlFetchApp service to import raw findings data. Refer to the Class SpreadsheetApp reference for details.

  3. Run the following script to download and import Cobalt findings. Replace YOUR-PERSONAL-API-TOKEN and YOUR-V2-ORGANIZATION-TOKEN with your values.

    function FETCH_DATA() {
      var url = 'https://api.cobalt.io/findings';
      var params = { headers: {
        'Accept': 'application/vnd.cobalt.v2+json',
        'Content-Type': 'application/vnd.cobalt.v2+json',
        'Authorization': 'Bearer YOUR-PERSONAL-API-TOKEN',
        'X-Org-Token': 'YOUR-V2-ORGANIZATION-TOKEN'
      }}
      var sheet = SpreadsheetApp.getActiveSheet();
    
      var response = JSON.parse(UrlFetchApp.fetch(url, params)).data;
      sheet.appendRow(Object.keys(response[0].resource));
      response.forEach((i) => 
        sheet.appendRow(
          Object.entries(i.resource)
          .map(([key, content]) => { 
            if(key == 'labels') {
              return content.map(c => c.name).join(',');
            }
            if(key == 'affected_targets') {
              return content.join(',');
            }
            if(key == 'log') {
              return JSON.stringify(content);
            }
            return content;
          })
        )
      );
    }
    

Step 3: Visualize Findings Data

After importing raw findings data, you can create charts to visualize data. Here are some examples for Google Sheets.

  • Sum of impact points per target: Use a QUERY inside a spreadsheet. The request sums up Impact Points (column G) and groups them by Affected Targets (Column J): =TRANSPOSE(QUERY('Raw Data'!B:J, "SELECT J, SUM(G) group by J " , 1))

  • Chart representing severity: In Google Sheets, select Insert > Chart, and select Column I as the data source.

  • Chart representing likelihood: In Google Sheets, select Insert > Chart, and select Column H as the data source.

  • Chart showing the highest severity: Use the following command:

    =INDIRECT("'Raw Data'!B"&MATCH(MAX('Raw Data'!G:G),'Raw Data'!G:G,0))
    

The result may appear as shown in the image.

You can control who can access your Macros and Google Sheets. Fine-tune to which parts of your data specific users have access. This allows you to generate live reports without inviting users to the Cobalt platform.

Share