View Usage Details Report

Details

API Details
NameView Usage Details Report
Description

Displays the usage details report for my tenant or for a specific sub-tenant.

MethodGET
URI

v2/tenants/tenantId/reports?reportType=reportType&includeSubTenantSummary=boolean&mySummary=boolean&startDate=start_date&endDate=end_date&page=page&size=size&sort=sort&order=order

CloudCenter Release
  • Introduced in CloudCenter 4.6.
  • Enhanced in CloudCenter 4.8.1 to include the userGroups attribute. Additionally, you can use userGroupId as a query parameter in this API.
Notes
  • General Notes:
    • For additional context on <PORT> usage in the following example(s), see Base URI Format.
    • The CloudCenter GET APIs display up to 20 entities in the listing by default. If you have more than 20 entities in your resource listing, use the pagination query parameters to view them beyond the first 20 entities returned by default. See the CloudCenter API Overview  > Pagination  section for additional context.
  • API Notes:
    • Default response: My tenant.
    • This API supports the CSV format for the response. See Response Schema > CSV (Only for Reports).
    • Access Control:

      • This API is only available to admin users.
      • Admin users can access data to their managed tenant or sub-tenants by changing the tenantId path attribute in the request as displayed in the examples below.
ESB Headeraction: get.tenants.tenantId.reports
actionparam: reportType&includeSubTenantSummary=boolean&mySummary=boolean&startDate=start_date&endDate=end_date&page=page&size=size&sort=sort&order=order

Example 1 – My Tenant (Default)

curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v2/tenants/1/reports?reportType=USAGE_DETAILS_REPORT&startDate=1467227418116&endDate=1469819418117&page=0&size=50&sort=jobId-&order=asc"

Response

{
    "summary": {
        "tenantId": "1",
        "totalCloudCost": 290.22,
        "totalNodeHours": 2766.868,
        "totalNumberOfRunningVMs": 4,
        "totalNumberOfDeployments": 3
    },
    "details": {
        "resource": null,
        "size": 4,
        "pageNumber": 0,
        "totalElements": 4,
        "totalPages": 1,
        "jobUsageDetails": [{
            "tenantId": "1",
            "userId": "20035",
            "firstName": "User",
            "lastName": "1",
            "email": "appstoreadmin@test.com",
            "jobId": "14065",
            "jobName": "Confluence_Docs_SG_AWS_1027_2",
            "jobStatus": "JobCanceling",
            "jobStartTime": 1445968113000,
            "jobEndTime": 1449527517000,
            "cloudId": "1",
            "cloudGroupName": "Amazon",
            "cloudFamily": "Amazon",
            "regionName": "Amazon-us-west-2",
            "regionDisplayName": "US West (Oregon)",
            "cloudAccountName ": "CloudCenter SaaS ",
            "cloudName ": "US West(Oregon)(CloudCenter SaaS)",
            "tags ": null,
            "appId ": "3963 ",
            "appName": "DR_CloudCenter_Confluence_Docs_S3_Repo",
            "appVersion": "1.5",
            "depEnvId": "27",
            "depEnvName": "Default",
            "projectId": null,
            "projectName": null,
            "ccId": null,
            "cloudCost": 0.0,
            "nodeHours": 0.0,
            "numberOfRunningVMs": 0,
            "recordTimestamp": 1467331200000
        }, {
            "tenantId": "1",
            "userId": "20035",
            "firstName": "Sam",
            "lastName": "Goan",
            "email": "appstoreadmin@test.com",
            "jobId": "14075",
            "jobName": "Confluence_Docs_SG_AWS_1027_3",
            "jobStatus": "JobSuspended",
            "jobStartTime": 1446006398000,
            "jobEndTime": 0,
            "cloudId": "1",
            "cloudGroupName": "Amazon",
            "cloudFamily": "Amazon",
            "regionName": "Amazon-us-west-2",
            "regionDisplayName": "US West (Oregon)",
            "cloudAccountName ": "CloudCenter SaaS ",
            "cloudName ": "US West(Oregon)(CloudCenter SaaS)",
            "tags ": null,
            "appId ": "3963 ",
            "appName": "DR_CloudCenter_Confluence_Docs_S3_Repo",
            "appVersion": "1.5",
            "depEnvId": "27",
            "depEnvName": "Default",
            "projectId": null,
            "projectName": null,
            "ccId": null,
            "cloudCost": 0.0,
            "nodeHours": 0.0,
            "numberOfRunningVMs": 0,
            "recordTimestamp": 1467331200000
        }, {
            "tenantId": "1",
            "userId": "20035",
            "firstName": "Sam",
            "lastName": "Goan",
            "email": "appstoreadmin@test.com",
            "jobId": "16733",
            "jobName": "Digium_1116_Azure_SG_1",
            "jobStatus": "JobCanceling",
            "jobStartTime": 1447697984000,
            "jobEndTime": 1447699055000,
            "cloudId": "4",
            "cloudGroupName": "Azure",
            "cloudFamily": "Azure",
            "regionName": "Azure-us-east",
            "regionDisplayName": "US East (Virginia)",
            "cloudAccountName": "CloudCenter SaaS",
            "cloudName": "US East (Virginia) (CloudCenter SaaS)",
            "tags": null,
            "appId": "4528",
            "appName": "Digium_Asterisk",
            "appVersion": "11.17.1",
            "depEnvId": "27",
            "depEnvName": "Default",
            "projectId": null,
            "projectName": null,
            "ccId": null,
            "cloudCost": 0.0,
            "nodeHours": 0.0,
            "numberOfRunningVMs": 0,
            "recordTimestamp": 1467331200000
        }, {
            "tenantId": "1",
            "userId": "20035",
            "firstName": "Sam",
            "lastName": "Goan",
            "email": "appstoreadmin@test.com ",
            "jobId ": "22559 ",
            "jobName ": "Cloudera_Hbase_011316_SG_1 ",
            "jobStatus ": "JobStarting ",
            "jobStartTime ": 1452708127000,
            "jobEndTime": 0,
            "cloudId": "1",
            "cloudGroupName": "Amazon",
            "cloudFamily": "Amazon",
            "regionName": "Amazon-us-west-2",
            "regionDisplayName": "US West (Oregon)",
            "cloudAccountName": "CloudCenter SaaS",
            "cloudName": "US West (Oregon) (CloudCenter SaaS)",
            "tags": null,
            "appId": "6161",
            "appName": "Cloudera Hadoop HBASE",
            "appVersion": "2.6",
            "depEnvId": "27",
            "depEnvName": "Default",
            "projectId": null,
            "projectName": null,
            "ccId": null,
            "cloudCost": 290.22,
            "nodeHours": 2766.868,
            "numberOfRunningVMs": 4,
            "recordTimestamp": 1467331200000
        }]
    },
    "filters": {
        "userNames": [{
            "displayName": "User 1",
            "field": "userId",
            "value": "20035"
        }],
        "userGroups":[  
         {  
            "displayName":"G1",
            "field":"userGroupId",
            "value":"6"
         },
         {  
            "displayName":"G2",
            "field":"userGroupId",
            "value":"7"
        }],
        "appNames": [{
            "displayName": "Cloudera Hadoop HBASE ",
            "field ": "appId ",
            "value ": "6161 "
        }, {
            "displayName ": "DR_CloudCenter_Confluence_Docs_S3_Repo ",
            "field ": "appId ",
            "value": "3963"
        }, {
            "displayName": "Digium_Asterisk",
            "field": "appId",
            "value": "4528"
        }],
        "deploymentEnvironments": [{
            "displayName": "Default",
            "field": "deploymentEnvironmentId",
            "value": "27"
        }],
        "cloudNames": [{
            "displayName": "US East (Virginia) (CloudCenter SaaS)",
            "field": "cloudName",
            "value": "US East (Virginia) (CloudCenter SaaS)"
        }, {
            "displayName": "US West (Oregon) (CloudCenter SaaS)",
            "field": "cloudName",
            "value": "US West (Oregon) (CloudCenter SaaS)"
        }],
        "tags": [],
        "ccIds": [],
        "projectNames": [],
        "cloudFamilies": [{
            "displayName": "Amazon",
            "field": "cloudFamily",
            "value": "Amazon"
        }, {
            "displayName": "Azure",
            "field": "cloudFamily",
            "value": "Azure"
        }]
    }
}

Example 2 – Specific Tenant

curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v2/tenants/1/reports?reportType=USAGE_SUMMARY_REPORT&startDate=1467228953652&endDate=1469820953653&page=0&size=50&total_pages=0&total_entries=0&sort=jobId-&order=asc

Response

{
    "summary": {
        "tenantId": "32",
        "totalCloudCost": 168.604,
        "totalNodeHours": 2074.814,
        "totalNumberOfRunningVMs": 3,
        "totalNumberOfDeployments": 4
    },
    "details": {
        "resource": null,
        "size": 4,
        "pageNumber": 0,
        "totalElements": 4,
        "totalPages": 1,
        "jobUsageDetails": [{
            "tenantId": "32",
            "userId": "20203",
            "firstName": "Mo",
            "lastName": "Vas",
            "email": "mo@test.com",
            "jobId": "17179",
            "jobName": "petclinic_PetClinic_5",
            "jobStatus": "JobCanceling",
            "jobStartTime": 1447866393000,
            "jobEndTime": 1447951940000,
            "cloudId": "1",
            "cloudGroupName": "Amazon",
            "cloudFamily": "Amazon",
            "regionName": "Amazon-us-east-1",
            "regionDisplayName": "US East (Virginia)",
            "cloudAccountName": "AWS Amazon",
            "cloudName": "US East (Virginia) (AWS Amazon)",
            "tags": null,
            "appId": "4707",
            "appName": "petclinic_singletier",
            "appVersion": "1",
            "depEnvId": "115",
            "depEnvName": "Test",
            "projectId": null,
            "projectName": null,
            "ccId": null,
            "cloudCost": 0.0,
            "nodeHours": 0.0,
            "numberOfRunningVMs": 0,
            "recordTimestamp": 1467331200000
        }, {
            "tenantId": "32",
            "userId": "20203",
            "firstName": "Mo",
            "lastName": "Vas",
            "email": "mo@test.com",
            "jobId": "17389",
            "jobName": "jenkins004",
            "jobStatus": "JobCanceling",
            "jobStartTime": 1447959031000,
            "jobEndTime": 1447959480000,
            "cloudId": "1",
            "cloudGroupName": "Amazon",
            "cloudFamily": "Amazon",
            "regionName": "Amazon-us-east-1",
            "regionDisplayName": "US East (Virginia)",
            "cloudAccountName": "AWS Amazon",
            "cloudName": "US East (Virginia) (AWS Amazon)",
            "tags": null,
            "appId": "4709",
            "appName": "Jenkins",
            "appVersion": "1.638",
            "depEnvId": "115",
            "depEnvName": "Test",
            "projectId": null,
            "projectName": null,
            "ccId": null,
            "cloudCost": 0.0,
            "nodeHours": 0.0,
            "numberOfRunningVMs": 0,
            "recordTimestamp": 1467331200000
        }, {
            "tenantId": "32",
            "userId": "20203",
            "firstName": "Mo",
            "lastName": "Vas",
            "email": "mo@test.com ",
            "jobId ": "23135 ",
            "jobName ": "cicd002 ",
            "jobStatus ": "JobRunning ",
            "jobStartTime ": 1454016950000,
            "jobEndTime": 0,
            "cloudId": "1",
            "cloudGroupName": "Amazon",
            "cloudFamily": "Amazon",
            "regionName": "Amazon-us-east-1",
            "regionDisplayName": "US East (Virginia)",
            "cloudAccountName": "AWS Amazon",
            "cloudName": "US East (Virginia)(AWS Amazon)",
            "tags ": null,
            "appId ": "5052 ",
            "appName ": "CICD - Artifactory and Jenkins ",
            "appVersion ": "1.0 ",
            "depEnvId ": "113 ",
            "depEnvName ": "Test - AZR - West ",
            "projectId ": null,
            "projectName ": null,
            "ccId ": null,
            "cloudCost ": 96.74,
            "nodeHours ": 691.6412,
            "numberOfRunningVMs ": 1,
            "recordTimestamp ": 1467331200000
        }, {
            "tenantId": "32",
            "userId": "20203",
            "firstName": "Mo",
            "lastName": "Vas",
            "email": "mo@test.com",
            "jobId": "23185",
            "jobName": "PetClinic_Deploy_PetClinic_8",
            "jobStatus": "JobRunning",
            "jobStartTime": 1454027997000,
            "jobEndTime": 0,
            "cloudId": "1",
            "cloudGroupName": "Amazon",
            "cloudFamily": "Amazon",
            "regionName": "Amazon-us-east-1",
            "regionDisplayName": "US East (Virginia)",
            "cloudAccountName": "AWS Amazon",
            "cloudName": "US East (Virginia) (AWS Amazon)",
            "tags": null,
            "appId": "5054",
            "appName": "PetClinic",
            "appVersion": "1.0.2",
            "depEnvId": "113",
            "depEnvName": "Test-AZR-West",
            "projectId": "29",
            "projectName": "MyNewProject",
            "ccId": null,
            "cloudCost": 71.864,
            "nodeHours": 1383.1729,
            "numberOfRunningVMs": 2,
            "recordTimestamp": 1467331200000
        }]
    },
    "filters": {
        "userNames": [{
            "displayName": "Mo Vas",
            "field": "userId",
            "value": "20203"
        }],
        "appNames": [{
            "displayName": "CICD - Artifactory and Jenkins",
            "field": "appId",
            "value": "5052"
        }, {
            "displayName": "Jenkins",
            "field": "appId",
            "value": "4709"
        }, {
            "displayName": "PetClinic",
            "field": "appId",
            "value": "5054"
        }, {
            "displayName": "petclinic_singletier",
            "field": "appId",
            "value": "4707"
        }],
        "deploymentEnvironments": [{
            "displayName": "Test",
            "field": "deploymentEnvironmentId",
            "value": "115"
        }, {
            "displayName": "Test-AZR-West",
            "field": "deploymentEnvironmentId",
            "value": "113"
        }],
        "cloudNames": [{
            "displayName": "US East (Virginia) (AWS Amazon)",
            "field": "cloudName",
            "value": "US East (Virginia) (AWS Amazon)"
        }],
        "tags": [],
        "ccIds": [],
        "projectNames": [{
            "displayName": "MyNewProject",
            "field": "projectId",
            "value": "29"
        }],
        "cloudFamilies": [{
            "displayName": "Amazon",
            "field": "cloudFamily",
            "value": "Amazon"
        }]
    }
}

Request Attributes

tenantId
  • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.

  • Type: String

Required

reportType

Required

includeSubTenantSummary 
  • Description: Identifies if the summary must be included for each sub-tenant within this tenant.

    The mySummary and includeSubTenantSummary attributes cannot both be true in one call

  • Type: Boolean:
    • true = The sub-tenant summary is included.
    • false = Default. The sub-tenant summary is not included.

Optional query parameter

mySummary
  • Description: Identifies if the summary must be included for your tenant.

    The mySummary and includeSubTenantSummary attributes cannot both be true in one call.

    This attribute is the same as the mySummaryOnly attribute.

  • Type: Boolean:
    • true = The tenant summary is included for your tenant.
    • false = Default. The summary is not included for your tenant.

Optional query parameter

startDate

Optional query parameter

endDate

Optional query parameter

tenantId
  • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.

  • Type: String

Optional query parameter 

userGroupId
  • DescriptionUnique, system-generated identifier for the user group
  • Type: String

Optional query parameter effective CloudCenter 4.8.1

Response Attributes

summary
  • Description: Identifies the total usage summary information for your tenant (default) or sub-tenant.
  • Type: Sequence of usage details

    tenantId
    • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.

    • Type: String
     totalCloudCost 
     totalNodeHours  
    • Type: Float
     totalNumberOfRunningVMs   
    • Type: Integer
    totalNumberOfDeployments
details
  • Description: Identifies the usage details for all jobs within a tenant or sub-tenant.
  • Type: Sequence of job details

    resource
    • Description: Unique URL to access this resource.
    • Type: String
    size
    • Description: Total number of records that any list page should contain. The default is: 

      • v1 APIs = 20 records

      • v2 APIs:

        • Prior to 4.8.0: All elements are returned and the page value is ignored.

        • Effective 4.8.0: 50 records
    • Type: Integer
    pageNumber
    • Description: The page number that the client wants to fetch. Page numbers start with 0 (default).
    • Type: Integer
    totalElements
    • Description: The number resources that an API call returns
    • Type: Long
    totalPages
    • Description: The number of pages in a response 
    • Type: Integer
    jobUsageDetails
    • Description: Identifies the job usage details for each job in the tenant or sub-tenant.

    • Type: Sequence of job usage details

      tenantId
      • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.

      • Type: String
      userId
      • Description: Unique, system-generated identifier for a user
      • Type: String
      firstName
      • DescriptionCloudCenter user's first name. Defaults to empty string if not set.
      • Type: String
      lastName
      • DescriptionCloudCenter user's last name. Defaults to empty string if not set.
      • Type: String
      emailAddr
      • Description: Unique (in the system) email address for this resource and must match the regular expression
      • Type: String
      jobId
      • DescriptionUnique, system-generated identifier for the job
      • Type: String
      jobName
      • Description: The name of this job
      • Type: String
      jobStatus
      jobStartTime
      • Description: Unix time in milliseconds (see CloudCenter API Overview > Date Format) to identify the exact time that this job started.
      • Type: Long
      jobEndTime
      • Description: Unix time in milliseconds (see CloudCenter API Overview > Date Format) to identify the exact time that this job ended.
      • Type: Long
      cloudId
      • Description: Unique, system-generated identifier for a cloud representation (see View Deployment Environments for additional details)

      • Type: String
       cloudGroupName 
      cloudFamily                                                                                                                                                                                
      • Description: The cloud provider name.                     
      • Type: String
      regionName
      • DescriptionThe name of this cloud region as listed in Public Clouds.
      • Type: String
      regionDisplayName
      • DescriptionA descriptive name for this region
      • Type: String
      cloudAccountName
      • Description:The account name associated with this  cloud
      • Type: String
      cloudName
      tags
      • DescriptionTags associated with this resource. Each string represents a System Tag.

        If you filter reports based on tags that you applied to VMs or jobs, then the report displays all the VMs or jobs that have this exact combination of tags.

      • Type: Array of strings

      appId
      • Description: Unique, system-generated identifier for the application profile. You can provide multiple application profile IDs as input parameters.

      • Type: String
      appName
      • Description: The name of the application in use.
      • Type: String
      appVersion
      • Description: The application build version with which a new job is started. If the appVersion is not specified, the latest application build version is used.

      • Type: String
      depEnvId
      • DescriptionUnique, system-generated identifier for the deployment environment. See Deployment Environments for additional details. This attribute is the same as the environmentId attribute.
      • Type: String
      depEnvName
      projectId
      • DescriptionUnique, system-generated identifier for the project
      • Type: Long (path variable in the URL)
      projectName
      • DescriptionThe name assigned for a project (see Projects and Phases for additional context). Valid characters are letters, numbers, underscores, and spaces.
      • Type: String
      ccId
      • Description: Unique, system-generated identifier for the CCM's CloudCenter ID (CCID). This ID is auto-generated by the CloudCenter platform. See Certificate Authentication for additional context.
      • Type: String
      cloudCost
      • Description: The cost of using the cloud (see Cost and Fees) for this resource.
      • Type: Float
      nodeHours
      • Description: The number of VM hours (see Financial Overview) for this resource.
      • Type: Float
       numberOfRunningVMs 
      • Description: The number of VMs running concurrently at any point for this tenant organization and included in the runningVMs count.
      • Type: Integer
       recordTimestamp 
      • Description: Unix time in milliseconds (see CloudCenter API Overview > Date Format) to identify the exact time that this job record was created.
      • Type: Long
filters
  • Description: Identifies the filters for the usage summary report for your tenant (default) or sub-tenant. Each filter contains the following details:
    • displayName: The descriptive name configured for a CloudCenter resource.
    • field: The attribute corresponding to this CloudCenter resource.
    • value: The value for this CloudCenter resource.
  • Type: Sequence of filters based on the field-value

    FieldValue
    userNames
    The JSON string for the configured value for username
    userGroupsThe JSON string for the configured value for userGroup
    appNames The JSON string for the configured value for appName
    deploymentEnvironmentsThe JSON string for the configured value for depEnvName
    cloudNamesThe JSON string for the configured value for cloudName
    tagsThe JSON string for the configured value for tags
    ccIdsThe JSON string for the configured value for ccId
    projectNamesThe JSON string for the configured value for projectName