CoreService

<back to all web services

GetDeploymentTemplateDefinition

DeploymentTemplate - CRUD

Returns the template definition

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/deploymenttemplates/{Id}/definitionReturns the template definition
GET/api/deploymenttemplates/{Name}/{Version}/definitionReturns the template definition
GET/deploymenttemplates/{Id}/definitionReturns the template definition
GET/deploymenttemplates/{Name}/{Version}/definitionReturns the template definition
namespace CoreService.ServiceModel.Dtos.Base.Responses

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

    [<AllowNullLiteral>]
    type TemplateDefinitionDto() = 
        ///<summary>
        ///The schema version of the attached definition
        ///</summary>
        member val SchemaVersion:Int32 = new Int32() with get,set

        ///<summary>
        ///The template definition/body either as json or yaml
        ///</summary>
        member val Definition:String = null with get,set

    type TemplateLanguages =
        | Json = 0
        | Yaml = 1

    ///<summary>
    ///Returns the template definition
    ///</summary>
    [<Api(Description="Returns the template definition")>]
    [<ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof<TemplateDefinitionDto>, StatusCode=200)>]
    [<AllowNullLiteral>]
    type GetDeploymentTemplateDefinition() = 
        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", ParameterType="path")>]
        member val Version:String = null with get,set

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

        [<ApiMember(IsRequired=true, ParameterType="query")>]
        member val DefinitionFormat:TemplateLanguages = new TemplateLanguages() 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

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

F# GetDeploymentTemplateDefinition 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 /api/deploymenttemplates/{Id}/definition HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"schemaVersion":0,"definition":"String"}