cancel
Showing results for 
Search instead for 
Did you mean: 

Semantic URL Example

jsgeronimo
New Contributor II

Hi,

I would like to know how to correctly pass data via Semantic URL (as a Triggered Task via URL)?

Here is what I did:

Edit Pipeline Properties:
26 pm

I created an exampleId variable, if I wanted to pass a value of 1 to the exampleId variable:

https://elastic.snaplogic.com:443/api/1/rest/path/to/my/project/pipelineName/exampleId/1

What I have working is:

https://elastic.snaplogic.com:443/api/1/rest/path/to/my/project/pipelineName/?exampleId=1

18 REPLIES 18

nganapathiraju
Former Employee

exampleId should have been visible in the PATH_INFO parameter.

Anything that you add after the task url before ? is considered as Path_info.

Please test and reconfirm.

normal task url

https://elastic.snaplogic.com:443/api/1/rest/slsched/feed/<org>/Training/NaveenG/exercise1_trg_task

path info in the task url

https://elastic.snaplogic.com:443/api/1/rest/slsched/feed/<org>/Training/NaveenG/exercise1_trg_task/somepath

In the above, somepath should appear in the PATH_INFO if captured!!

del
Contributor III

To further clarify (from my testing), PATH_INFO is not required in the Parameters option of the Pipeline but still must be accessed via snaps using the “_” prefix. (i.e. “_PATH_INFO”)

can you post the screenshot what you are observing?

_PATH_INFO should be available throughout the pipeline.

What I did was POST to my Triggered Task URL

https://elastic.snaplogic.com:443/api/1/rest/slsched/feed/org/myproject/path/exampleData/3

I wanted to catch the key value pair of exampleData: 3 so I placed it on the pipeline parameter as exampleData
14 am

and then I used the mapper to catch and map it to my exampleData field (for my json).
46 am

the output of the PATH_INFO is correct which is “exampleData/3”.
or “examplePath”: “exampleData/3”

but if what I wanted to get was the “exampleData”: “3”. is this possible with semantic URL?

Thank you for responding.