Component - script API
StackState Self-hosted v5.1.x
Function: Component.withId(id: Long)
Component.withId(id: Long)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 an Async result with a set of properties
at(time: Instant or Timeslice)- specifes a time for which the query should be executed.get- gets components details in full, with the following fields:id name description lastUpdateTimestamp type layer domain environments state runState outgoingRelations incomingRelations synchronized failingChecks iconbase64 visiblechecks- Gets a list of component checks each with the following fields:id lastUpdateTimestamp` name description remediationHint function arguments state syncCreateddomain- Gets the domain the component belongs to with the following fields:id lastUpdateTimestamp name description order identifierstreams- Gets a list of component streams each with the following fields:id lastUpdateTimestamp name description priority dataType dataSource querytype- Gets the component type of the given component with the following fields:id lastUpdateTimestamp name description iconbase64 identifierlayer- Gets the layer for the component with the following fields:id lastUpdateTimestamp name description order identifierenvironments- Gets a list of environments this component belongs to with following fields:id lastUpdateTimestamp name description identifier ownedBypropagation- Get the propagation for the component if any with the following fields:id lastUpdateTimestamp function arguments
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.
Last updated