Export item data via API to PostgreSQL
API toolRecipe ToolsDeveloper ToolMarketingDatabase
What it does
When someone makes an API request to this endpoint, this automation queries the items table in PostgreSQL. The response returns all matching records from the database in real time.
Who it's for
Engineering and Data and analytics teams who need to retrieve item data through an API without direct database access.
How teams use this
Retrieve items for a mobile app
A mobile application calls this API endpoint to fetch item data and display it to users. The endpoint returns results in real time without exposing the database directly.
Sync items into an external system
A third-party service queries this API to sync item records into its own database. The endpoint provides a consistent interface for external integrations.
Filter results by item category
Add a category parameter to the API request so callers can filter items by type. The query would only return rows matching the selected category.
Add pagination to large result sets
Include limit and offset parameters in the API request so callers can retrieve items in smaller batches. The endpoint would only return the specified number of rows per call.
How it works
- Receive the API request. Define the request and response parameters for this API endpoint so callers can search for items in real time.
- Execute the search delay. Run a Ruby code snippet in Workato Custom Code that pauses the request for one second before querying the database.
- Query the items table. Select rows from the public.items table in PostgreSQL based on the search parameters passed in the API request.
- Return the results. Send a 200 response back to the caller with the matching item records from the PostgreSQL database.