Cohesity

  • API Docs
  • GitHub
  • Marketplace
  • Blog

Getting Started with Helios API

Get apiKey to make API calls

Before making any API requests, the first step is to generate an apiKey from Helios UI. This apiKey needs to be passed in the header of the API call to Helios.

Steps

  • Login to Helios using your username and password.

Helios login

  • Click on Settings icon on top right corner and select Access Management

Click Settings

  • From the available tabs, select API Keys

Select API Key tab

  • Click on Add API Key button

Add API Key

  • Give the apiKey a name and click the Save button

save

  • Copy the key somewhere

Note that once you navigate to a different page from this page, you won't be able to view the apiKey again. So copy and save the apiKey

Copy and save the key

Now lets make some API calls using the generated apiKey

Making API calls

Example 1: Compute the Protection Summary of clusters

  • A "Request" must be first sent to the API endpoint.

    GET ​/public​/mcm​/stats​/protectionSummary
    
  • The "Request body" has no mandatory fields. Lets leave it empty

  • The header contains apiKey: GENERATED_API_KEY

  • A successful "Response" looks like this:

    {
    "numObjectsProtected": 669,
    "numObjectsUnprotected": 24824,
    "statsByEnv": [
        {
        "environment": "kIsilon",
        "numObjectsProtected": 11,
        "numObjectsUnprotected": 847,
        "protectedSizeBytes": 41095202159,
        "unprotectedSizeBytes": 3153122783836
        },
        {
        "environment": "kO365",
        "numObjectsProtected": 4,
        "numObjectsUnprotected": 13,
        "protectedSizeBytes": 4096,
        "unprotectedSizeBytes": 13312
        },
        {
        "environment": "kNetapp",
        "numObjectsProtected": 13,
        "numObjectsUnprotected": 16,
        "protectedSizeBytes": 163208757248,
        "unprotectedSizeBytes": 353707618304
        }
    ]
    .....
    "protectedSizeBytes": 4087595722067296,
    "unprotectedSizeBytes": 3368274907751107
    }
    
  • CURL example

    curl -X GET "https://helios.cohesity.com/irisservices/api/v1/public/mcm/stats/protectionSummary" -H "apiKey: xxx-xxx-xxx-xxx-xxx" -H "accept: application/json"
    

Example 2: List Nodes of the cluster

  • A "Request" must be first sent to the API endpoint.

    GET ​/public​/nodes
    
  • The "Request body" has no mandatory fields. Lets leave it empty

  • The header contains apiKey: GENERATED_API_KEY and accessClusterId: CLUSTER_ID

  • A successful "Response" looks like this:

    [
    {
      "capacityByTier": [
        {
          "storageTier": "kPCIeSSD",
          "tierMaxPhysicalCapacityBytes": 0
        }
      ],
      "chassisInfo": {
        "chassisId": 0,
        "chassisName": "string",
        "location": "string",
        "rackId": 0
      },
      "clusterPartitionId": 0,
      "clusterPartitionName": "string",
      "diskCount": 0,
      "diskCountByTier": [
        {
          "diskCount": 0,
          "storageTier": "kPCIeSSD"
        }
      ],
      "id": 0,
      "ip": "string",
      "isMarkedForRemoval": true,
      "maxPhysicalCapacityBytes": 0,
      "nodeHardwareInfo": {
        "cpu": "string",
        "memorySizeBytes": 0,
        "network": "string"
      },
      "nodeIncarnationId": 0,
      "nodeSoftwareVersion": "string",
      "nodeType": "string",
      "offlineMountPathsOfDisks": [
        "string"
      ],
      "removalReason": [
        "kAutoHealthCheck"
      ],
      "removalState": "kDontRemove",
      "slotNumber": 0,
      "stats": {
        "id": 0,
        "usagePerfStats": {
          "dataInBytes": 0,
          "dataInBytesAfterReduction": 0,
          "minUsablePhysicalCapacityBytes": 0,
          "numBytesRead": 0,
          "numBytesWritten": 0,
          "physicalCapacityBytes": 0,
          "readIos": 0,
          "readLatencyMsecs": 0,
          "systemCapacityBytes": 0,
          "systemUsageBytes": 0,
          "totalPhysicalRawUsageBytes": 0,
          "totalPhysicalUsageBytes": 0,
          "writeIos": 0,
          "writeLatencyMsecs": 0
        }
      },
      "systemDisks": [
        {
          "devicePath": "string",
          "id": 0,
          "offline": true
        }
      ]
    }
    ]
    
  • CURL example

    curl -X GET "https://helios.cohesity.com/irisservices/api/v1/public/mcm/stats/protectionSummary" -H "accessClusterId: xxxxxx" -H "apiKey: xxx-xxx-xxx-xxx-xxx" -H "accept: application/json"
    

Making more API calls

  • To get the list of API calls that can be made. Refer this link

Note that you need to have access to Helios to view this link.

Copyright © 2024 Cohesity, Inc. All Rights Reserved.
Privacy Policy | Legal | cohesity.com | 1-855-9COHESITY