CoreService

<back to all web services

CreateTimeSeriesDefinition

TimeSeries - CRUD

Creates a new time series definition

Requires Authentication
Required roles:TenantReader, TenantAdmin
The following routes are available for this service:
POST/api/timeseries/Creates a new time series definition
POST/timeseries/Creates a new time series definition
CreateTimeSeriesDefinition Parameters:
NameParameterData TypeRequiredDescription
TenantNameheaderstringYes
NamebodystringYesThe unique name of the time series
DisplayNamebodystringNoThe time series display name
DescriptionbodystringNoA more detailed description for the series
SourceTypebodystringNoThe source type of the time series. Only used when AutoCollection is true
AutoCollectionQuerybodystringNoThe query used to extract datapoints from source table. Only used when AutoCollection is true
AutoCollectionIntervalbodyintNoHow often a datapoint will be collected, Only used when AutoCollection is true
AutoCollectionIntervalUnitbodyintNoThe interval unit for auto collection, Only used when AutoCollection is true
AutoCollectionTimebodystringNoThe time (UTC), when the query will be executed to collect the datapoints, Only used when AutoCollection is true
AutoCollectionbodyboolNoHow often a datapoint will be collected, Only used when AutoCollection is true
RetentionTimeMonthsbodydoubleNoHow many months to keep data in the time series before deleting them
ObjectTypes Enum:
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
IntervalUnits Enum:
Second
Minute
Hour
Day
Week
Month
Year
TimeSeriesDefinitionDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringYes
DescriptionformstringNo
SourceTypeformObjectTypesNo
AutoCollectionQueryformstringNo
AutoCollectionIntervalformdouble?No
AutoCollectionIntervalUnitformIntervalUnits?No
AutoCollectionTimeformTimeOnly?No
LastAutoCollectedformDateTime?No
AutoCollectionformboolNo
RetentionTimeMonthsformint?No

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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/timeseries/ HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"tenantName":"String","name":"String","displayName":"String","description":"String","sourceType":"None","autoCollectionQuery":"String","autoCollectionInterval":0,"autoCollectionIntervalUnit":"Second","autoCollectionTime":"00:00","autoCollection":false,"retentionTimeMonths":0,"txId":"00000000-0000-0000-0000-000000000000"}
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}