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
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Returns the template definition
    */
    @Api(Description="Returns the template definition")
    @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=TemplateDefinitionDto.class, StatusCode=200)
    public static class GetDeploymentTemplateDefinition implements IGetSingleRequest, IHasTenantName, IGet
    {
        @ApiMember(DataType="string", Format="guid", ParameterType="path")
        public UUID id = null;

        @ApiMember(DataType="string", ParameterType="path")
        public String name = null;

        @ApiMember(DataType="string", ParameterType="path")
        public String version = null;

        @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
        @Validate(Validator="NotEmpty")
        public String tenantName = null;

        @ApiMember(IsRequired=true, ParameterType="query")
        public TemplateLanguages definitionFormat = null;

        /**
        * If true, also soft deleted items will be returned
        */
        @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
        public Boolean includeDeleted = null;

        @ApiMember(ParameterType="query", Verb="GET")
        public Boolean includeReferencedObjects = null;
        
        public UUID getId() { return id; }
        public GetDeploymentTemplateDefinition setId(UUID value) { this.id = value; return this; }
        public String getName() { return name; }
        public GetDeploymentTemplateDefinition setName(String value) { this.name = value; return this; }
        public String getVersion() { return version; }
        public GetDeploymentTemplateDefinition setVersion(String value) { this.version = value; return this; }
        public String getTenantName() { return tenantName; }
        public GetDeploymentTemplateDefinition setTenantName(String value) { this.tenantName = value; return this; }
        public TemplateLanguages getDefinitionFormat() { return definitionFormat; }
        public GetDeploymentTemplateDefinition setDefinitionFormat(TemplateLanguages value) { this.definitionFormat = value; return this; }
        public Boolean isIncludeDeleted() { return includeDeleted; }
        public GetDeploymentTemplateDefinition setIncludeDeleted(Boolean value) { this.includeDeleted = value; return this; }
        public Boolean isIncludeReferencedObjects() { return includeReferencedObjects; }
        public GetDeploymentTemplateDefinition setIncludeReferencedObjects(Boolean value) { this.includeReferencedObjects = value; return this; }
    }

    public static enum TemplateLanguages
    {
        Json,
        Yaml;
    }

    public static class TemplateDefinitionDto
    {
        /**
        * The schema version of the attached definition
        */
        public Integer schemaVersion = null;
        /**
        * The template definition/body either as json or yaml
        */
        public String definition = null;
        
        public Integer getSchemaVersion() { return schemaVersion; }
        public TemplateDefinitionDto setSchemaVersion(Integer value) { this.schemaVersion = value; return this; }
        public String getDefinition() { return definition; }
        public TemplateDefinitionDto setDefinition(String value) { this.definition = value; return this; }
    }

}

Java 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"}