CoreService

<back to all web services

GetTimeSeriesDefinition

TimeSeries - CRUD

Returns a timeseries definition by its ID

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/timeseries/{Id}Returns a timeseries definition
GET/api/timeseries/{Id}Returns a timeseries definition
GET/timeseries/{Name}/bynameReturns a timeseries definition
GET/api/timeseries/{Name}/bynameReturns a timeseries definition
namespace CoreService.ServiceModel.Dtos.TimeSeries.Crud

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type ObjectTypes =
        | None = 0
        | ConfigItem = 1
        | Tenant = 2
        | Collection = 3
        | Resource = 4
        | ComputeNode = 5
        | VirtualMachine = 6
        | PhysicalMachine = 7
        | Disk = 8
        | Subnet = 9
        | IPAddress = 10
        | Job = 11
        | JobEvent = 12
        | FreezePeriod = 13
        | ResourceGroup = 14
        | Deployment = 15
        | ResourceGroupTemplate = 16
        | DeploymentTemplate = 17
        | ResourceProvider = 18
        | GenericResource = 19
        | Role = 20
        | Permission = 21
        | User = 22
        | PatchingWindow = 23
        | Update = 24
        | ReportDefinition = 25
        | TimeSeries = 26
        | DataPoint = 27
        | Action = 28
        | ActionAssignment = 29
        | UserNote = 30

    type IntervalUnits =
        | Second = 0
        | Minute = 1
        | Hour = 2
        | Day = 3
        | Week = 4
        | Month = 5
        | Year = 6

    [<AllowNullLiteral>]
    type TimeSeriesDefinitionDto() = 
        member val Id:Guid = new Guid() with get,set
        member val Name:String = null with get,set
        member val Description:String = null with get,set
        member val SourceType:ObjectTypes = new ObjectTypes() with get,set
        member val AutoCollectionQuery:String = null with get,set
        member val AutoCollectionInterval:Nullable<Double> = new Nullable<Double>() with get,set
        member val AutoCollectionIntervalUnit:Nullable<IntervalUnits> = new Nullable<IntervalUnits>() with get,set
        member val AutoCollectionTime:Nullable<TimeOnly> = new Nullable<TimeOnly>() with get,set
        member val LastAutoCollected:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val AutoCollection:Boolean = new Boolean() with get,set
        member val RetentionTimeMonths:Nullable<Int32> = new Nullable<Int32>() with get,set

    ///<summary>
    ///Returns a timeseries definition by its ID
    ///</summary>
    [<Api(Description="Returns a timeseries definition by its ID")>]
    [<ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof<TimeSeriesDefinitionDto>, StatusCode=200)>]
    [<AllowNullLiteral>]
    type GetTimeSeriesDefinition() = 
        interface IGet
        [<ApiMember(DataType="string", Format="guid", ParameterType="path")>]
        member val Id:Nullable<Guid> = new Nullable<Guid>() with get,set

        [<ApiMember(DataType="string", ParameterType="path")>]
        member val Name:String = null with get,set

        [<ApiMember(DataType="string", IsRequired=true, ParameterType="header")>]
        [<Validate(Validator="NotEmpty")>]
        member val TenantName:String = null with get,set

        [<ApiMember(ParameterType="query", Verb="GET")>]
        member val IncludeReferencedObjects:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///If true, also soft deleted items will be returned
        ///</summary>
        [<ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")>]
        member val IncludeDeleted:Nullable<Boolean> = new Nullable<Boolean>() with get,set

F# 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

HTTP + JSON

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}