Forum Discussion

ariana's avatar
ariana
New Contributor
4 years ago

How to bring API JSON text into REST Post Snap?

Hi all,

I am trying to use a JSON file to feed in the body of a response that is working in Postman with curl code like this:

In SnapLogic I added the raw body in a JSON generator and want to feed that into a REST Post Snap. My pipeline looks like this:

With no headers nor queries in Postman, only the JSON/raw body and the service URL, I retrieve results with no issues. However, with Snaplogic I am not receiving output. Has anyone done this? I am told I cannot incorporate the credentials into the headers, it must be in the body…but how do I reconcile this with SnapLogic? No one on my team has worked on something externalized that has functioned in this way.

Thanks!

8 Replies

  • dmiller's avatar
    dmiller
    Former Employee

    There is not a specific Snap, but I may have a pipeline that will help. Let me take a look.

  • dmiller's avatar
    dmiller
    Former Employee

    Just to be consistent with our terminology, I’m replacing “folder” with “project”.

    The SnapLogic Metadata Snaps are useful here.

    • To delete an empty project, you would use the SnapLogic Delete Snap.
    • To delete a flat project with files (no child directories), you would use a SnapLogic List set to All Assets, File Delete, possibly a Gate Snap if there are a lot of files to delete, then the SnapLogic Delete Snap set to delete the project once it is empty.

    For projects that contain directories, “Directory” is currently not available as an asset type for these Snaps (there is an open request for it).

    • munish's avatar
      munish
      New Contributor

      thanks Dmiller,
      I understand and know about delete file, but only thing want to know about folder? if there is not direct, is there any indirect way to delete ?

      Thanks

      • AE04282's avatar
        AE04282
        New Contributor

        Good day, did you figure this out? I’m having the same challenge. Thanks.