As I understand it the batching endpoint for Google APIs is being discontinued. Do we have plans for removing it from the library as started.
Discontinuing support for JSON-RPC and Global HTTP Batch Endpoints
Google API Client Libraries have been regenerated to no longer make requests to the global HTTP batch endpoint. Clients using these libraries must upgrade to the latest version. Clients not using the Google API Client Libraries and/or making custom calls to the JSON-RPC endpoint or HTTP batch endpoint will need to make the changes outlined below.
May I suggest that we dont do what is stated and that wait until the deprecation limit has expired. Its documented as working until March 25, 2019 developers have a right to expect that it will continue to work with the libraries until then. Just removing it from the library before that is pointless and unfair to developers not giving them enough warning and time to change their code. Its going to cause panic. I have already spotted one question on stack with this
This may be premature on my part but if anyone is interested in future proofing their application it's quit simple to pass the new endpoint when instantiating new batch requests:
$batch = new Google_Http_Batch($this->client, false, null, 'batch/drive/v3');
I would love more information about the new endpoint will it work with all APIs?
I was not aware there would be a new endpoint the documentation seams to emply its being removed not replaced
Reading through this blog post: https://developers.googleblog.com/2018/03/discontinuing-support-for-json-rpc-and.html batch requests are still going to be supported but only for homogenous requests. Not sure if their official documentation has been updated to reflect this.
I supposed the issue could be with my understanding of the word homogeneous which I don't understand in this context.
Took me a minute to understand what they meant as well. Simply means you
can only make batch requests to one API at a time. So for instance you
could group requests going to drive but if some of them were for calendar
those requests would have to be in a separate batch request.
Let me know if that makes sense.
OK now I think i understand that part.
However lets consider this now
To identify whether you use JSON-RPC, you can check whether you send requests to https://www.googleapis.com/rpc or https://content.googleapis.com/rpc. If you do, you should migrate.
As I understand it the document says that batching should work with the new endpoint and shows an example of the JS library using the new endpont. However my understanding which may be wrong was that not all of the Google APIs apis supported using this rpc endpoint. Which is why the discovery doc says
"batchPath": "batch/calendar/v3",
So am I to understand that the Client libraries will all be regenerated to support this new endpoint and not completely remove the batching ability from the libraries. _(with the exception of heterogeneous requests)_ There by adding JSON_RPC support.
If you are currently forming homogeneous batch requests
And you are using Google API Client Libraries, then simply update to the latest versions.
If you are using non-Google API client libraries or no client library (i.e making raw HTTP requests), then:
- Change the endpoint from www.googleapis.com/batch to www.googleapis.com/batch/
/ . - Or, simply read the value of 'batchPath' from the API's discovery doc and use that value.
We are currently using that end point so what exactly are they discontinuing? is the HTTP www.googleapis.com/batch still going to work or not
Looks like this library uses the global batch path batch.php Its probably going to have to be changed to build the batch path with in each api which means a change to the script building each api from the discovery service.
As far as I know JSON_RPC will be completely removed in a year, the blog post says to switch over to regular http api calls. As for the api specific batch calls they'll probably add a batch class to each api service.
I think we are all on the same page. Any change will not go into this client library until the API change happens next year.
Most helpful comment
This may be premature on my part but if anyone is interested in future proofing their application it's quit simple to pass the new endpoint when instantiating new batch requests:
$batch = new Google_Http_Batch($this->client, false, null, 'batch/drive/v3');