Jump to content
  • 0

Inserting a record into a view using Postman


Mrk7777

Question

Hi Guys,

I am new to Caspio and working on an integration to send Files to Caspio.

They seem to be in favour of sending the contents of the files record by record into a view into caspio.

from an integration point of view this is less than ideal because it would have been better to send files or at least bulk insert the records instead of inserting the records one by one.

In PostMan am unable to insert records into the view its coming back blank.

It would be very usuful if anyone has a working example of postman inserting a record into a view.

Kind regards,

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello @Mrk7777,

Sorry for the late reply, so I don't know if this is still relevant for you. 

First, there can be only one editable table in the View. This means it is only possible to insert(POST)/update(PUT)/delete(DELETE) records in the editable table. 

For example, I have a View that joins 2 tables: the 'Orders__' table and the 'Customers_' table. The editable table is the 'Orders'.

swMx8kO.png

The 'request URL' is the following: https://account_ID.caspio.com/rest/v2/views/{view_name}/records

You can always check the available methods in Swagger UI https://howto.caspio.com/integration/web-services-api/swagger-ui/

As this article says https://howto.caspio.com/integration/web-services-api/important-header-parameters/

All POST, PUT, and DELETE methods must contain Content-Type header below or 415 Unsupported Media Type will be returned.

Parameter name:  Content-Type
Parameter value: application/json

Every request to REST API Resources URLs must contain an authorization header:

Parameter name:  Authorization
Parameter value: Bearer <access token value>

So, in Postman it looks like this:

  • Headers

2euIdAO.png

  •  Authorization 

HjEG4US.png

  • Body (use field names from the View):

tZBnFun.png

 

These articles can be helpful as well:

https://howto.caspio.com/integration/web-services-api/creating-a-web-services-api-profile-2/

https://howto.caspio.com/integration/web-services-api/authenticating-rest/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...