Comment on page
Component - script API
StackState Self-hosted v5.0.x
This page describes StackState version 5.0.
Get access to a component by its ID.
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:idnamedescriptionlastUpdateTimestamptypelayerdomainenvironmentsstaterunStateoutgoingRelationsincomingRelationssynchronizedfailingChecksiconbase64visiblechecks
- Gets a list of component checks each with the following fields:idlastUpdateTimestamp`namedescriptionremediationHintfunctionargumentsstatesyncCreateddomain
- Gets the domain the component belongs to with the following fields:idlastUpdateTimestampnamedescriptionorderidentifierstreams
- Gets a list of component streams each with the following fields:idlastUpdateTimestampnamedescriptionprioritydataTypedataSourcequerytype
- Gets the component type of the given component with the following fields:idlastUpdateTimestampnamedescriptioniconbase64identifierlayer
- Gets the layer for the component with the following fields:idlastUpdateTimestampnamedescriptionorderidentifierenvironments
- Gets a list of environments this component belongs to with following fields:idlastUpdateTimestampnamedescriptionidentifierownedBypropagation
- Get the propagation for the component if any with the following fields:idlastUpdateTimestampfunctionarguments
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.Component.withId(123).layer().then { it.name }
Last modified 1yr ago