| Requires the role: | TenantReader |
| GET | /api/configitems/{Id}/hierarchy | Returns a list with ids of all parent items | |
|---|---|---|---|
| GET | /configitems/{Id}/hierarchy | Returns a list with ids of all parent items |
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
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
///<summary>
///Return the object hierarchy of a configitem
///</summary>
[<Api(Description="Return the object hierarchy of a configitem")>]
[<ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof<0, Culture=neutral, PublicKeyToken=null]]>, StatusCode=200)>]
[<ApiResponse(Description="Check log for more info", StatusCode=500)>]
[<AllowNullLiteral>]
type GetConfigItemHierarchy() =
interface IGet
[<ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")>]
member val Id:Guid = new Guid() with get,set
///<summary>
///objecttype of searched configitem
///</summary>
[<ApiMember(Description="objecttype of searched configitem", IsRequired=true, ParameterType="query")>]
[<Validate(Validator="NotNull")>]
member val ConfigItemType:Nullable<ObjectTypes> = new Nullable<ObjectTypes>() with get,set
[<ApiMember(DataType="string", IsRequired=true, ParameterType="header")>]
[<Validate(Validator="NotEmpty")>]
member val TenantName:String = null with get,set
[<ApiMember(DataType="string", Format="guid", ParameterType="query")>]
member val TxId:Guid = new Guid() with get,set
type ValueDataType =
| String = 0
| Number = 1
| Boolean = 2
| List = 3
type Environments =
| Lab = 0
| Poc = 1
| Dev = 2
| Test = 3
| Int = 4
| Uat = 5
| Prod = 6
[<AllowNullLiteral>]
type VariableDto() =
member val Name:String = null with get,set
///<summary>
///Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false, List = [1,2,3,4]). Note: string values need extra quotes
///</summary>
member val Value:String = null with get,set
///<summary>
///The data type of the value property
///</summary>
member val Type:ValueDataType = new ValueDataType() with get,set
member val Description:String = null with get,set
member val IsInherited:Boolean = new Boolean() with get,set
member val Environment:Nullable<Environments> = new Nullable<Environments>() with get,set
[<AllowNullLiteral>]
type ItemsResponse<T>() =
member val Items:IList<VariableDto> = null with get,set
member val Offset:Int32 = new Int32() with get,set
member val Total:Int32 = new Int32() with get,set
member val IsGrouped:Boolean = new Boolean() with get,set
member val ResponseStatus:ResponseStatus = null with get,set
member val Meta:Dictionary<String, String> = null with get,set
F# GetConfigItemHierarchy 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/configitems/{Id}/hierarchy HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"items":null,"offset":0,"total":0,"isGrouped":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"meta":{"String":"String"}}