cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Programmatically get SLPROPZ contents and write to a file

ForbinCSD
Contributor

Within a pipeline, how can I programmatically access the SLPROPZ file for a snaplex, and write the contents of the file out to the local hard drive?

We have over 500 snaplexes that we need to do this for, so manually downloading them all is not a good solution.

Also, for various reasons I wonโ€™t go into, we cannot employ an outside task that just pings each download endpoint. This HAS to be done from within a set of pipelines.

The SnapLogic Metadata snaps give me the ability to list Snaplexes and to read them as a set of JSON attributes. But there seems no way to obtain (or reconstruct) the SLPROPZ file.

Any help that can be provided will be much appreciated!

4 REPLIES 4

koryknick
Employee
Employee

Hi @ForbinCSD - have you looked at the Snaplex API?

I believe that will give you the information you need. And this could be called from a pipeline with the HTTP Client or REST Get snap using org admin account credentials.

Hi, Kory:

A couple of questions:\\\\ actually just the 1 questionโ€ฆ I found the Basic Auth in the documenttion!

  • Iโ€™m an org admin, but Iโ€™d assume I donโ€™t put my cleartext password in, right? Where do I get the password hash that Iโ€™d (presumably) use?

ForbinCSD
Contributor

Aha! Iโ€™ve finally cleared the Auth hurdle and getting a response from a REST GET snap.

Now I just need to figure out how to transform the Base64-encoded $entity contents into binary before writing it to a file.

Many thanks!!

koryknick
Employee
Employee

@ForbinCSD - glad youโ€™re clearing the hurdles! Check your โ€œacceptโ€ HTTP header settings. You may want to set that as โ€œapplication/jsonโ€ and set the Response Entity Type in the REST Get snap as TEXT. If that doesnโ€™t work, Iโ€™ll try to put together a sample pipeline for you.