Summary
The Artifact Selector is a String slot type. Similar to that of a BFormat, it is interpreted when its value is requested. It is used in Http Config to introduce ArtifactDefinition variables.
The Artifact Selector can inject ArtifactDefinition values from the Network in which it exists. A virtual link is automatically created between the Artifact Selector and the ArtifactDefinition. If the state of the ArtifactDefinition is not OK then the value is not interpreted and the RestQuery linked to the Http Config is not triggered.
Care needs to be taken not to create a circular dependency by defining an ArtifactDefinition under an Http Config that uses this same Artifact. This makes the RestQuery inoperative.
Implementation
The Artifact Selector is present in all fields of the Http Config outlined in red. It is used as a text field and interprets the syntax explained below.
Syntax
The Artifact Selector is similar to a BFormat. If a text is entered without the syntax defined here, then the field will not be interpreted and the text will be used as is.
The following syntax is used to inject a value from an ArtifactDefinition:
${<ArtifactDefinitionName>.<JsonKeySelector>}
All text between ${ and } is replaced by the value selected by the Artifact Selector.
The name of the ArtifactDefinition is retrieved before the first point. Note, the name must be unique to the Network.
After the first point, the JSON Key Selector is retrieved to select a final value (String, Numeric or Boolean).
If the value selected by the JSON Key Selector is not final (Object or Array) then the value is not interpretable and the RestQuery will not be executed.
Example
Several selectors can be used in the same field to build a composite text. Here in the palette RTE
example:
The "Authorization" header will then be interpreted as follows at the time of the HTTP request:
Authorization: Bearer jsCfaMnFMnl9ATY8EY8461M5g0HNiNhNZsCLNRrWu3vL3VgJkcAhSy
For a value read by the ArtifactDefinition named "Auth":