| Required role: | TenantReader |
| GET | /api/statistics/billableresources | Returns billable resource counts | |
|---|---|---|---|
| GET | /statistics/billableresources | Returns billable resource counts |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CoreService.ServiceModel.Dtos.Statistics.Crud
Imports CoreService.ServiceModel.Dtos.Statistics.Responses
Imports YCO.Dune.Models.Enums
Imports CoreService.ServiceModel.Dtos.Base.Responses
Namespace Global
Namespace CoreService.ServiceModel.Dtos.Base.Responses
Public Partial Class HeaderDto
Implements IHasIdName
Implements IHasObjectType
Public Overridable Property Id As Guid
Public Overridable Property Name As String Implements IHasIdName.Name
Public Overridable Property DisplayName As String
Public Overridable Property ObjectType As ObjectTypes Implements IHasObjectType.ObjectType
End Class
End Namespace
Namespace CoreService.ServiceModel.Dtos.Statistics.Crud
'''<Summary>
'''Returns billable resource counts
'''</Summary>
<Api(Description:="Returns billable resource counts")>
<ApiResponse(Description:="Success", IsDefaultResponse:=true, ResponseType:=GetType(BillableResourceSummaryDto), StatusCode:=200)>
Public Partial Class GetBillableResources
Implements IBaseRequest
Implements IHasTenantName
Implements IGet
<ApiMember(DataType:="string", IsRequired:=true, ParameterType:="header")>
<Validate(Validator:="NotEmpty")>
Public Overridable Property TenantName As String Implements IHasTenantName.TenantName
End Class
End Namespace
Namespace CoreService.ServiceModel.Dtos.Statistics.Responses
Public Partial Class BillableResourceDto
Public Overridable Property Type As ObjectTypes
Public Overridable Property TotalCount As Long
Public Overridable Property BillableCount As Long
Public Overridable Property BillableResources As List(Of HeaderDto) = New List(Of HeaderDto)
End Class
Public Partial Class BillableResourceSummaryDto
Public Overridable Property GeneratedOn As Date
Public Overridable Property BillableResources As Dictionary(Of String, BillableResourceDto) = New Dictionary(Of String, BillableResourceDto)
End Class
End Namespace
Namespace YCO.Dune.Models.Enums
Public Enum ObjectTypes
None
ConfigItem
Tenant
Collection
Resource
ComputeNode
VirtualMachine
PhysicalMachine
Disk
Subnet
IPAddress
Job
JobEvent
FreezePeriod
ResourceGroup
Deployment
ResourceGroupTemplate
DeploymentTemplate
ResourceProvider
GenericResource
Role
Permission
User
PatchingWindow
Update
ReportDefinition
TimeSeries
DataPoint
Action
ActionAssignment
UserNote
End Enum
End Namespace
End Namespace
VB.NET GetBillableResources DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/statistics/billableresources HTTP/1.1 Host: core.starburst.svc Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"generatedOn":"0001-01-01T00:00:00.0000000Z","billableResources":{"String":{"type":"None","totalCount":0,"billableCount":0,"billableResources":[{"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","objectType":"None"}]}}}