Rest API - Metadata

  • 32Views
  • Last Post 17 October 2018
  • Topic Is Solved
0
votes
Ubaid B posted this 16 October 2018

Hi,

I want to export salesforce data to our database through rest-api connecter.

How to pass body parameters to the API? Is there any metadata format available?

Order By: Standard | Newest | Votes
0
votes
Ubaid B posted this 16 October 2018

Found sample metadata here: https://support.skyvia.com/thread/import-csv-to-http-target-post/?order=all#comment-a9ca2d70-72a4-4f35-9bc9-a847011b8868

But it passes values to query params.

1
votes
Mariia Zaharova posted this 16 October 2018

REST connector can be used for data sources which are not included in the list of supported connectors in Skyvia (https://skyvia.com/connectors/) and which can be accessed via REST API. First, we study API of the requested data sources and, if possible, prepare all the necessary information for creating REST connection (provider configuration, metadata for all objects, supported methods, etc.).

Please tell us for what exactly data source you want to create REST connection?

  • Supported by
  • Ubaid B
0
votes
Ubaid B posted this 16 October 2018

Thanks for quick response @Mariia.

Our source is Salesforce and target is our custom JSON based REST API that supports POST calls.

Skyvia is able to call our API successfully via POST however, it is sending data in query parameter example log on our server:

POST /api/v1/webhook/sync-candidate-data?email=user%40example.com

{"method":"POST","url":"/api/v1/webhook/sync-data?email=user%40example.com","headers":{"host":"waqas.serveo.net","user-agent":"Devart","content-length":"0","accept":"application/json","accept-encoding":"gzip","content-type":"application/json;charset=UTF-8","x-forwarded-for":"40.118.246.204"}

How can we configure Skyvia so that it can send parameters like "email" in the Request body?

 

0
votes
Ubaid B posted this 17 October 2018

Answer from Mariia solves the problem:

Thank you for the details. Please use this code (you have similar code for objects where POST is supported, you need to replace InputType):

"InsertOperation" : {
"UrlSuffix" : "",
"Method" : "POST",
"ReturningStrategy" : {
"Type":"Row"
},
"InputType" : "JsonBody"

 

}

 

Close