Whenever you need to load data from some internal or external location, you can use a URI to point to such a location. You do so already by using such URIs in your web browser, for example. Common URI types you might be familiar with, are:
Besides such commonly known URI types, PIPEFORCE also supports custom URI types to simplify access to common resources used internally in PIPEFORCE. Such a custom URI is called a PIPEFORCE URI.
Custom PIPEFORCE URIs typically start with prefix $uri: followed by the concrete uri type.
They typically have a format like this:
<name> must be replaced by the type name of the URI to be used such as drive, property, pipeline or similar for example (see below). It is the implementation type of the URI.
<path> must be replaced by the path or value which will be passed as input value to the URI implementation. This can also contain parameters in the standard URI format for example ?foo=bar.
In most locations where a URI is accepted as an argument, for example in commands or utils, you can apply such a PIPEFORCE URI. Here are some examples of such PIPEFORCE URIs:
$uri:drive:/someFolder/myFile.txt Loads a file from the drive data room.
$uri:property:global/app/myapp/template/text Loads a property from the property store.
$uri:property:global/app/myapp/template/text@value Loads the value of a property from the property store.
$uri:pipeline:global/app/myapp/pipeline/hello Executes the persisted pipeline at given location and returns the final body content as result.
$uri:user:admin Returns the information object of the given user with given username.
$uri:user:uuid=260e8400-e29b-11d4-a716-443655440000 Returns the information object of the given user with given uuid.
Here is an example to apply a custom URI on a command:
This will the return only the value part of the property as JSON:
"title": "My App",
"description": "This is my app",
And if you would like return only the title text of the property value, you can use the # symbol which filters the value of a property, in case it is a JSON document (more about this in the description for Property URI below). For example:
In case you use the # symbol or any other reserved symbol as request parameter, you need to decode it before sending. Alternatively, you can send the URI in a POST request, form-data encoded in the body. In this case, no encoding is required.
Here is an example how to use this command with curl on the terminal with URI encoded parameter (the symbol # is encoded to %23):
curl -X GET -u username:password 'https://hub-ns.pipeforce.net/api/v3/command/resolve?uri=$uri:property:gloabl/app/myapp/config/app%23title'
It is also possible to further filter the property using a PE, which gets applied to the property before its result will be returned.
As you might already know, a property has a structure like this (envelope + value):
"uuid": "unique id",
"type": "mime type of this property",
"value": "The payload of the property",
"uuid": "unique id",
"name": "file name of the attachment",
"contentType": "content type of this attachment",