Recent Discussions
Streamlining API Development with SnapLogic's HTTP Router Snap
Overview I have created a sample pipeline named "HTTP Router Pipeline", which includes the HTTP Router Snap. A Triggered Task is configured to so the API URL can be invoked via Postman to execute pipeline. Configuring the HTTP Router In the HTTP Router Snap, we configure one request method per row, based on the various HTTP methods expected from the Triggered Task. In this demonstration, we have selected the following HTTP methods: GET, POST, PUT, and DELETE. GET Method The pipeline is designed to fetch student data from a table named studentdetails, which includes fields such as: studentid firstname lastname trainerid school email enrollmentdate trainingstatus Courseid Using the GET method, we retrieve student records based on the lastname. The request is sent via Postman, routed by the HTTP Router Snap, and processed to return the relevant records. Extract Query Parameter (lastname) Snap: Mapper Snap Purpose: Extract the lastname parameter from the query parameter. Mapping Expression: _lastName : $lastName Generic JDBC - Select Purpose: Retrieves student details from the database based on the lastName parameter. Where Clause: "lastname = '" + $.lastName + "'" Trigger GET request Trigger the GET request using Postman by passing the last name as a query parameter. POST Method The POST method is used to insert new student records into the studentdetails table. A POST request is sent via Postman to the Triggered Task. The HTTP Router routes the request to the corresponding POST path, where the incoming student data is inserted into the database. Generic JDBC - Insert Purpose: Inserts data into the studentdetails table for POST requests. Configuration: Table Name: studentdetails Trigger POST request Trigger the POST request using Postman by passing the Student details in the body. PUT Method The PUT method is used to update existing student records based on the studentid. A PUT request is sent from Postman and routed by the HTTP Router to the appropriate path. The data is then used to update the corresponding record in the studentdetails table. Generic JDBC - PUT Purpose: Updates student details in the studentdetails table for PUT requests. SQL query: "UPDATE studentdetails SET firstname = '" + $firstName + "', lastname = '" + $lastName + "' WHERE studentid = " + $studentID Trigger PUT request Trigger the PUT request using Postman by passing the Student details like firstName, lastName, studentID in the body. DELETE Method The DELETE method is used to remove a student record from the studentdetails table based on the studentid. A DELETE request is sent via Postman, routed through the HTTP Router Snap, and the targeted record is deleted from the database. Extract Query Parameter (studentid) Snap: Mapper Snap Purpose: Extract the lastname parameter from the query parameter. Mapping Expression: _studentid : $studentid Generic JDBC - Delete Purpose: Executes the DELETE query to remove a record from the studentdetails table. SQL query: "DELETE FROM studentdetails WHERE studentid = " + $studentID" Trigger DELETE request Trigger the DELETE request using Postman by passing the studentid as a query parameter.Vigneshwaran6 days agoNew Contributor15Views1like0CommentsAPI without parameters returns empty JSON
I have a triggered task that pulls data from a database and formats the JSON to be returned by an http request. I added a parameter called 'dataset_name' so users making an api call can select just one record from the database: I pass the value '_dataset_name' to a filter snap and the API returns the record. This works as expected, when a user queries the endpoint and specifies the dataset_name parameter, they get a JSON with one record. https://elastic.snaplogic.com/api/1/rest/slsched/feed/.../my_pipeline%20Task?dataset_name=<my_dataset> However, when a user doesn't specify a parameter, I'd like the API to return all the records in the table. Right now, if you don't specify a "dataset_name" parameter, the http request returns an empty JSON. I'm assuming the issue is with how I've implemented the filtering. Can someone explain what I did wrong?Solvedmaahutch6 months agoNew Contributor815Views0likes1CommentHTTP snap pagination Not Working
Hi Everyone, I hope you're doing well. I need some assistance with implementing pagination in SnapLogic for the Google Search Console API. Currently, there's a row limit of 25,000, making it challenging to load the data on a daily basis. If the data exceeds this limit, we risk losing valuable information. To avoid this, I’m looking for a way to implement a loop within the API calls to handle pagination efficiently. Given the urgency of this task, any guidance or suggestions on how to achieve this would be greatly appreciated. Here is the snap config now we need to update the startRow to +25000 in every execution and it should be end once it is completed api result : Can anyone help me in thisSolvedmohit_jain11 months agoNew Contributor III4.3KViews1like10CommentsPublic API to List all Assets in an Organization / Environment
I checked the Public API page for Snaplogic but I couldn't find any API to get all the assets path in an Organization/Environment. Do we have any such API that I might have missed? If not all assets just an API to list Project Space paths in an Environment and then an API to list all the projects based on Project Space, will also work. Thankyou for your help !satishKumar12 months agoNew Contributor1.1KViews0likes1CommentRequired APIM Migration Steps
Hi Team, Can anyone help on how to do the APIM Migration from one org to another org. We have created few of the API's along with the policies. We need to move these to another org . Please let us know if there is any documentation on this.anilkumar2 years agoEmployee1.9KViews0likes2CommentsPolicy to configure Basic Auth
Dear APIM Community, We have a requirement of source sending the request to Snaplogic APIM via Basic Auth, They are not able to send it via Bearer. What is the Policy that can be used for such scenario. If we pass the values via URL as parameters what should be the policy in APIM. Thanks in advance. Regards, VamsiVamsik2 years agoNew Contributor II1.6KViews0likes1CommentAPI end point not giving a security dialog box
There is an existing API end point where there are existing Ultra tasks along with other assets like pipelines etc. when I browse the API end point URL in a browser it will prompt a dialog box "sign into access this site" as oAuth2clientcrendtial along with Authorize by role added as a policy, I added a new pipeline and associated ultra task under the same API end point but it will not prompt for the security login dialog box which it does for other ultra pipelines tasks, what configuration am i missing?KrishnaKanth2 years agoNew Contributor1.8KViews0likes0CommentsGeneric Oauth2 with ADFS of organization
Hi all, I was wondering if anyone has experience with having MFA or Generic oauth2 https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1246924052/Generic+OAuth2 What I am trying to do is that when consumers want to acces apis they first need to authenticate with MFA and I was wondering how you do this with ADFS I only saw documentation of Okta and PingIdentity. So snaplogic is here the service provider and ADFS (Identity provider) If anyone has experience or some info about I'm all ears. Regards Jens JensJensDeveloper2 years agoContributor II1.6KViews0likes1Commentexpose pipeline as API using APIM
Hi All, We want to expose a pipeline using Snaplogic internal APIM by applying oauth2 policy so that any user without access to snaplogic can also trigger that pipeline using the API url. But its not working. PFB the snapshots of error for your reference error in the API developer portal: when trying to hit the API url from chrome its working & giving the desired result. Can someone please help on this. Thanks in advance.yashasvit742 years agoNew Contributor1.6KViews0likes1Comment