Component - script API
Functions to get access to specific component data.
This page describes StackState version 4.3.

Function withId

Get access to a component by its id.
Args:
  • id - id of the component we are querying for. Each component has a unique randomly assigned id number.
Builder methods
Each of the methods below give you a Async result with a set of properties
get - Gets components details in full with following fields
1
id
2
name
3
description
4
lastUpdateTimestamp
5
type
6
layer
7
domain
8
environments
9
state
10
runState
11
outgoingRelations
12
incomingRelations
13
synchronized
14
failingChecks
15
iconbase64
16
visible
Copied!
checks - Gets a list of component checks each with the following fields
1
id
2
lastUpdateTimestamp`
3
name
4
description
5
remediationHint
6
function
7
arguments
8
state
9
syncCreated
Copied!
domain - Gets the domain the component belongs to with the following fields
1
id
2
lastUpdateTimestamp
3
name
4
description
5
order
6
identifier
Copied!
streams - Gets a list of component streams each with the following fields
1
id
2
lastUpdateTimestamp
3
name
4
description
5
priority
6
dataType
7
dataSource
8
query
Copied!
type - Gets the component type of the given component with the following fields
1
id
2
lastUpdateTimestamp
3
name
4
description
5
iconbase64
6
identifier
Copied!
layer - Gets the layer for the component with the following fields
1
id
2
lastUpdateTimestamp
3
name
4
description
5
order
6
identifier
Copied!
environments - Gets a list of environments this component belongs to with following fields
1
id
2
lastUpdateTimestamp
3
name
4
description
5
identifier
6
ownedBy
Copied!
propagation - Get the propagation for the component if any with the following fields
1
id
2
lastUpdateTimestamp
3
function
4
arguments
Copied!
Examples:
This example returns the name of the layer for the component with id 123. After getting the layer the AsyncScriptResult then function is used to get the name of the layer.
1
Component.withId(123).layer().then { it.name }
Copied!
Last modified 4mo ago
Copy link