Sending attachment file via json - rest

I am new in REST so just wondering is it possible to send PDF document(attachment) via json through rest API. I know SOAP protocol supports attachment but does REST also support attachment.If yes then how we can send it through Json?

Related

Reg:Secure soap using karate dsl

I need to test secure soap using karate framework. Does any one know if its possible using karate. how to send an encrypted soap file and then decrypt the message later

Is it possible to send a SOAP request to a REST endpoint?

I'm working with an old ERP system that is capable of sending SOAP requests.
Unfortunately the endpoints I would like to send my requests to uses REST.
Is it possible to send a SOAP request to a REST endpoint?
BR Kresten
You can send whatever you want to a REST endpoint.
You could have a "gatekeeper" REST endpoint that accepted SOAP in a POST payload and converted it to whatever representation the other endpoints required and returned that representation. e.g. JSON. So in effect it becomes a SOAP to JSON converter.
If you can only send SOAP direct from an ERP system to your endpoint, your endpoint could accept the SOAP in a POST request and do whatever it wanted with it. SOAP is just XML, so the endpoint could just parse it to get the info it would "normally" get via "traditional" REST such as JSON.
You could combine the two approaches. Your ERP system could send SOAP to the "gatekeeper" endpoint which converts the SOAP to JSON and sends the converted content to the intended endpoint.

Is it possible to send a SOAP API Call via a custom HTML tag in Google Tag Manager

I'm looking to send a SOAP API call to fetch some data to include in another tag. I could not find any working examples of a basic SOAP request made via custom HTML in Google Tag Manager, so I was wondering if this is possible or if someone has even tried to do this.

SalesForce Oauth BULK API using REST & JSON instead of CSV & SOAP

I am trying to connect SalesForce via ConnectedAPP. I am successful to authorize and get the access and refresh tokens for the REST API operations.
I can able to post one lead into SF via API end points. I found that in the below URL's
I found bulk API documentation also.
But in that, Soap API and csv are being used to to the operations of bulk inserts.But i am trying to do using bearer token and JSON as the payload to push data.
Please provide me some samples or a approach to achieve this via REST API bulk inserts.
The Bulk API is not a SOAP API. Its endpoints accept payloads in XML and JSON format, and accepts batch data files in XML, JSON, and CSV formats.
You can use the access token supplied from your OAuth flow to authenticate to the Bulk API. You can choose to submit job details in either JSON or XML. See Prepare XML and JSON Files for details of the data file format when using JSON input.
There are multiple example implementations of the Bulk API available in open source projects, such as salesforce-bulk.

REST client - How to send data with PUT request?

I've created a REST API using Codeigniter and I'm testing it with wiztools.org REST client https://code.google.com/p/rest-client/
How can and should I send data for a PUT request? I've seen some PHP examples where JSON is sent in the headers but I'm not sure how to do this in the client I'm testing with or how to read this data from the request.
You can use cURL to send PUT requests.