CoreService

<back to all web services

GetDeploymentStructure

Deployment - CRUD

Returns the structure of a deployment (deployment → resource groups → resources)

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/deployments/{Id}/structureReturns the structure of a deployment
GET/deployments/{Id}/structureReturns the structure of a deployment
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Returns the structure of a deployment (deployment → resource groups → resources)
    */
    @Api(Description="Returns the structure of a deployment (deployment → resource groups → resources)")
    @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=NestedHierarchyItemDto.class, StatusCode=200)
    public static class GetDeploymentStructure implements IBaseRequest, IHasTenantName, IGet
    {
        @ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
        public UUID id = null;

        @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
        @Validate(Validator="NotEmpty")
        public String tenantName = null;
        
        public UUID getId() { return id; }
        public GetDeploymentStructure setId(UUID value) { this.id = value; return this; }
        public String getTenantName() { return tenantName; }
        public GetDeploymentStructure setTenantName(String value) { this.tenantName = value; return this; }
    }

    public static class NestedHierarchyItemDto extends HierarchyItemDto
    {
        public ArrayList<NestedHierarchyItemDto> children = new ArrayList<NestedHierarchyItemDto>();
        
        public ArrayList<NestedHierarchyItemDto> getChildren() { return children; }
        public NestedHierarchyItemDto setChildren(ArrayList<NestedHierarchyItemDto> value) { this.children = value; return this; }
    }

    public static class HierarchyItemDto
    {
        public UUID id = null;
        public ObjectTypes configItemType = null;
        public String name = null;
        public String displayName = null;
        public String description = null;
        
        public UUID getId() { return id; }
        public HierarchyItemDto setId(UUID value) { this.id = value; return this; }
        public ObjectTypes getConfigItemType() { return configItemType; }
        public HierarchyItemDto setConfigItemType(ObjectTypes value) { this.configItemType = value; return this; }
        public String getName() { return name; }
        public HierarchyItemDto setName(String value) { this.name = value; return this; }
        public String getDisplayName() { return displayName; }
        public HierarchyItemDto setDisplayName(String value) { this.displayName = value; return this; }
        public String getDescription() { return description; }
        public HierarchyItemDto setDescription(String value) { this.description = value; return this; }
    }

    public static enum 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;
    }

}

Java GetDeploymentStructure 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/deployments/{Id}/structure HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"children":[{"children":[{"children":[{"children":null,"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}],"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}],"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}],"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}