View Usage Details Report

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameView Usage Details Report
Description

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

Allowed Role(s)WM_USER
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-ccm-backend/api/v2/tenants/tenantId/reports?reportType=reportType&includeSubTenantSummary=boolean& \
mySummary=boolean&startDate=start_date&endDate=end_date&page=page&size=size& \
sort=sort&order=order

Sample Request
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"
curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v2/tenants/1/reports?reportType=USAGE_DETAILS_REPORT&startDate=1467227418116&endDate=1469819418117&page=0&size=50&sort=jobId-&order=asc"
Release

Introduced in CloudCenter 4.6

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.
  • Call this API by issuing either the mySummary attribute or the includeSubTenantSummary attributes as false. Both attributes cannot both be true in the same API call. 
  • Default response:
    • First four resource details (can be changed using the limit attribute)
    • By cloud

    • All tenants (mySummary or mySummaryOnly=false or includeSubTenantSummary=true)

      The mySummaryOnly attribute is available as a:

      • Response parameter in CloudCenter 4.8.0 and later releases.

      • Query parameter in CloudCenter 4.8.1 and later releases.

  • This API does not support sorting.

  • This API supports the CSV format for the response.
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

action: get.tenants.tenantId.reports
actionparam: reportType&includeSubTenantSummary=boolean&mySummary=boolean& \
startDate
=start_date&endDate=end_date&page=page&size=size&sort=sort&order=order

See the Enterprise Service Bus (ESB) section for additional context.

Not applicable

Sample Response 1 – My Tenant (Default)

{
    "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 the Tenant ID and Tenant Name Dependency section for the relevant release for additional context.

  • 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 the Tenant ID and Tenant Name Dependency section for the relevant release for additional context.

  • 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 the Tenant ID and Tenant Name Dependency section for the relevant release for additional context.

    • Type: String
     totalCloudCost 
    • Description: The cloud infrastructure costs charged by the cloud provider. See the Supported Public Clouds or the Supported Datacenters and Private Clouds section for the relevant release for all deployments, runs, users, VMs, instance types, and so forth. See the CloudCenter Cost and Fees section for the relevant release for additional context.
    • Type: Float
     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 the Tenant ID and Tenant Name Dependency section for the relevant release for additional context.

      • 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 the Supported Public Clouds section for the relevant release.
      • Type: String
      regionDisplayName
      • DescriptionA descriptive name for this region
      • Type: String
      cloudAccountName
      • Description:The account name associated with this  cloud
      • Type: String
      cloudName
      • Description: The cloud family name as referenced in the Public Clouds section or the Datacenters and Private Clouds section or the Container Clouds section for the relevant release for a complete list.
      • Type: String
      tags
      • DescriptionTags associated with this resource. Each string represents a system tag. See the System Tags section for the relevant release for additional context.

        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 the Deployment Environments section for the relevant release for additional details. This attribute is the same as the environmentId attribute.

      • Type: String

      depEnvName
      • Description: The name of the deployment environment. See the Deployment Environments section for the relevant release for additional details.
      • Type: String
      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 for this resource. See the Financial Overview section for the relevant release to view additional details.

      • 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

 

 


© 2017-2019 Cisco Systems, Inc. All rights reserved