Access table outside of BuildShip
How can I do a simple GET request on a rowy table outside of Buildship? Basically what the "Get Document" node is doing, but as a Rest API fetch Request.
3 Replies
AI Support Bot Information
<@112676328783802368> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human!
Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers.
Please note: Team members will review and answer the questions on best efforts basis.
AI Response
To perform a simple GET request on a Rowy table outside of Buildship, similar to what the "Get Document" function does, you can create a REST API endpoint that fetches data from the database. Here is a general approach you can follow to achieve this using a typical fetch request:
1. Set up a Server Endpoint: You need to have a server endpoint that can handle HTTP GET requests. This server will interact with your database.
2. Fetch Data from the Database: The server endpoint should fetch data from your Rowy table based on the specified conditions. This can be done using an appropriate database query.
3. Return Data as JSON: Once you have fetched the data from the database, convert it to a JSON format and return it as the response to the GET request.
Here's a basic example of how you might implement the GET request using JavaScript and Node.js with Express:
Explanation:
- Server Setup: Set up a simple server using Express.js to handle requests.
- GET Endpoint: Create a
/get-document
endpoint that responds to GET requests.
- Query Parameter: Accept a documentId
as a query parameter to identify which document to fetch.
- Database Interaction: Replace the mock function with actual logic to interact with your Rowy table.
- Send Response: Send the fetched document data back as a JSON response.
Make sure to replace the mock database logic with actual code for fetching data from your Rowy table, possibly using a library or SDK that interfaces with your database.
This setup is outside the specific functionalities provided by Buildship's nodes, and it involves programming a server-side script. If you need further integration details, consider referring to the Rowy documentation or support.
BuildShip AI Support
I need to know what the actual GET request looks like. I can't find anything in the rowy docs.
Also asked the question in the in-app support now : #553670