| Required role: | TenantReader |
| GET | /timeseries/{Id} | Returns a timeseries definition | |
|---|---|---|---|
| GET | /api/timeseries/{Id} | Returns a timeseries definition | |
| GET | /timeseries/{Name}/byname | Returns a timeseries definition | |
| GET | /api/timeseries/{Name}/byname | Returns a timeseries definition |
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
/**
* Returns a timeseries definition by its ID
*/
@Api(Description="Returns a timeseries definition by its ID")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=TimeSeriesDefinitionDto::class, StatusCode=200)
open class GetTimeSeriesDefinition : IGetSingleRequest, IHasTenantName, IGet
{
@ApiMember(DataType="string", Format="guid", ParameterType="path")
open var id:UUID? = null
@ApiMember(DataType="string", ParameterType="path")
open var name:String? = null
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
override var tenantName:String? = null
@ApiMember(ParameterType="query", Verb="GET")
override var includeReferencedObjects:Boolean? = null
/**
* If true, also soft deleted items will be returned
*/
@ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
override var includeDeleted:Boolean? = null
}
open class TimeSeriesDefinitionDto
{
open var id:UUID? = null
open var name:String? = null
open var description:String? = null
open var sourceType:ObjectTypes? = null
open var autoCollectionQuery:String? = null
open var autoCollectionInterval:Double? = null
open var autoCollectionIntervalUnit:IntervalUnits? = null
open var autoCollectionTime:TimeSpan? = null
open var lastAutoCollected:Date? = null
open var autoCollection:Boolean? = null
open var retentionTimeMonths:Int? = null
}
enum class 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,
}
enum class IntervalUnits
{
Second,
Minute,
Hour,
Day,
Week,
Month,
Year,
}
Kotlin GetTimeSeriesDefinition 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 /timeseries/{Id} HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"00000000-0000-0000-0000-000000000000","name":"String","description":"String","sourceType":"None","autoCollectionQuery":"String","autoCollectionInterval":0,"autoCollectionIntervalUnit":"Second","autoCollectionTime":"00:00","lastAutoCollected":"0001-01-01T00:00:00.0000000Z","autoCollection":false,"retentionTimeMonths":0}