...
URI | Description | ||
---|---|---|---|
| Loads a file from the | ||
| Loads a property | ||
| Loads only the value of a property from the property store. |
| Executes the persisted pipeline at given location and returns the final body content as result. |
| Executes the persisted pipeline at given location, passes the given parameters | ||
| Returns the information object of the given user with given username. | ||
|
|
...
Code Block | ||
---|---|---|
| ||
{ "checksum": "sha-256=38334e50687bc68125e3b66121311a0bd1b848b8fa36c85dfe189d84313c5582", "path": "/pipeforce/ns/global/app/myapp/config/app", "uuid": "cc059f6e-fa6a-4ad8-bc51-04a85e33b965", "locked": false, "trashed": false, "value": "{ \"title\": \"My App\", ...}", "defaultValue": null, "type": "application/json", "created": 1669907722095, "updated": 1671171893712, "timeToLive": null } |
In order to return only the value of a property, you can use the $uri:property-value
scheme instead:
Code Block | ||
---|---|---|
| ||
pipeline:
- resolve:
uri: $uri:property-value:gloabl/app/myapp/config/app |
This will return only the value part of the property as JSON:
Code Block | ||
---|---|---|
| ||
{
"title": "My App",
"description": "This is my app",
"icon": "assignment",
"tags": [
"myapp"
],
...
} |
And if you would like return only the title
text of the JSON property value, you can use the #
symbol which let you query the content of the returned JSON value by applying a PEL on it. For example:
...
Code Block |
---|
pipeline:
- body.set:
value: "Content is: ${@resolve.uri('$uri:property-value:gloabl/app/myapp/config/app')}" |
...
Code Block | ||
---|---|---|
| ||
{
"checksum": "sha-256=38334e50687bc68125e3b66121311a0bd1b848b8fa36c85dfe189d84313c5582",
"path": "/pipeforce/ns/global/app/myapp/config/app",
"uuid": "cc059f6e-fa6a-4ad8-bc51-04a85e33b965",
"locked": false,
"trashed": false,
"value": "{ \"title\": \"My App\", ...}",
"defaultValue": null,
"type": "application/json",
"created": 1669907722095,
"updated": 1671171893712,
"timeToLive": null
} |
$uri:property-value
This custom URI points to the value of a property in the property store:
Code Block |
---|
$uri:property-value:<PATH_OF_PROPERTY_IN_PROPERTY_STORE> |
Example:
Code Block |
---|
pipeline:
- resolve: $uri:property-value:global/app/myapp/config |
Will return the value of the property as JSON:
Code Block |
---|
{ "title": "My App", "description": "This is my app", "icon": "assignment", "tags": [ "myapp" ], ... } |
Value Filter (JSON)
In case the value of a property is of type application/json
, you can apply an expression filter on the value in order to return just a subset from the JSON:
Code Block |
---|
$uri:property-value:<PATH>#<VALUE_FILTER> |
Info |
---|
This filter only works in case the value of the property is of the type: |
Let's assume we have a property in the property store like this:
Code Block | ||
---|---|---|
| ||
{
"path": "path/to/person",
"type": "application/json",
"value": {
"name": "Max Master",
"age": 35,
"hobbies": [
"swimming",
"hiking"
]
}
} |
We can use a value filter in the property URI in order to directly return the name of the person, like this:
Code Block |
---|
pipeline:
- resolve: $uri:property-value:path/to/person#name |
Which will return a value like this:
Code Block |
---|
Max Master |
It's possible to use the full power of the PEL to filter, for example:
Code Block |
---|
pipeline:
- resolve: $uri:property-value:path/to/person#@list.size(hobbies) |
Which will return a value like this:
Code Block |
---|
3 |
The value filter will be applied on the fully loaded property value attribute: It will be converted to JSON and then the expression will be applied, then the resulting value is returned.
Info |
---|
In case you have a huge JSON and you have to avoid fully loading this JSON into memory first, consider to use deep JSON querying instead in order to filter out the required value directly in the database. For more details see: JSON Property Querying. |
$uri:user
This uri is handy to load a user object given by a username or uuid.
...