We are using the Consolibyte QuickBooks Online API PHP Library and are retrieving the raw response that we provide/bounce to a client. The response is currently in XML format, we'd like it to be JSON to make the transaction faster.
Can the Accept header be application/json? Or the library only supports XML?
Currently we only support XML. We don't support JSON quite yet.
Related
I'm trying to create a system for creating and sending emails through the GMail API. I have gotten a receive workflow working (Oauth, retrieves and parses emails). So I have seen the 'Message' JSON objects that Google uses.
Now I want to send out a 'Message' that was created by my system. So I'm looking for information about what is the minimal or basic set of elements needed to create a valid 'Message' object for Google's GMail API.
My platform is using FileMaker Pro... so I can't really use any existing library for their templates and functions. I am looking to build the JSON object directly, with text functions.
I have seen the GMail API documentation. It doesn't really seem to clarify what is required or optional. One side point: Message ID - it doesn't describe the parameters for that. Can I set it to anything I want? Is that something only generated as a PK for Google's own database to store it under? (Apparently it's not required, as it seems it will be defined and returned in the Send response.)
I note that it has the 'Raw' element... maybe it's simpler to build the RFC 2822 text from a template of some sort, doing targeted replacements? It still is a matter of - what's minimally needed in the template? (Would eventually like to be able to send attachments, too.) And it seems that building a JSON object version would be more readable, maintainable, and/or robust.
Thanks,
J
I've been looking at the Bulk 2.0 API for SalesForce for uploading data. All the examples say that in the request body I need to provide the contents of the CSV file. Below is from official salesforce docs:
Request Body:
(Content of your CSV file)
I'd like to know if there is a way to just provide a link/path to the file?
The BulkConnection class provides several methods that provide the ability to pass the batch as a stream, notably createBatchFromStream.
I am trying to insert data into slaesforce using bulk rest api. For this I am first creating a new Job using :-
https://instance_name—api.salesforce.com/services/async/APIversion/job
And then for adding a batch to job I am using :-
https://instance_name—api.salesforce.com/services/async/APIversion/job/jobid/batch
But while making these api calls using curl, it only supports XML content_type. Is there any restriction of content_type while using bulk rest api? If I change content_type to JSON it throws error "
{"exceptionCode":"UnsupportedContentType","exceptionMessage":"JSON
content type is not supported"}"
JSON is supported from Spring '16 onwards. It should work if your API version is newer than that.
Guide for API v38.0:
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_xml_preparing.htm
I want to call the twilio voice API without providing the URL.
Normally you would do it like this using python:
call = client.calls.create(url="http://demo.twilio.com/docs/voice.xml",
to=request.receiver,
from_=sender_number)
Instead of providing the URL I want to provide the XML-String. Is that somehow possible?
Background:
I'm generating the XML via a google cloud endpoints api. The response is in JSON format and a variable contains the XML. I need to parse the JSON to get the XML.
Sounds like you could use the echo Twimlet.
https://www.twilio.com/labs/twimlets/echo
Echo will just output whatever TwiML is passed into it via the URL. It is useful for building stateless, outbound apps, where arbitrarily complex content of the call is pre-generated and just passed into the REST API to initiate a call.
Example: http://twimlets.com/echo?Twiml=%3CResponse%3E%3CSay%3EHi+there.%3C%2FSay%3E%3C%2FResponse%3E
Twilio Evangelist here. I'm afraid you cannot do this, however there are a number of solutions. If your call doesn't require any dynamic XML, you can host it on S3, or a similar service (I use Dropbox public links quite a lot).
If you do need dynamic XML, then we have a whole bunch of tutorials that can help you get setup with a simple web application.
Hope this helps!
Which are libraries available to get the URL response using C/C++ language?At present I am searching for GSOAP library for C/C++ but can not find proper solution.
If you are just going to retrieve a URL response, the curl lib will do the job. If you are specifically dealing with SOAP, then another library will be necessary to parse the response (or a standalone library may be used to do the retrieval + response parsing all at once).