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.