8

I got notified that Googles JSON-RPC and Global HTTP Batch Endpoints are deprecated. The affected api is "storage@v1" and "Global Batch Endpoints" in my case.

I tried to find, where the depricated api call comes from. But I'm using 24 buckets with several tools accessing it. So is there a way to log depricated calls? I enabled logging for buckets. I could not find any difference in the access log when doing batch request and when doing single requests.

tback
  • 9,418
  • 5
  • 38
  • 67
anon6789
  • 173
  • 1
  • 6

2 Answers2

5

Yes "Batching across multiple APIs in a single request" is being discontinued Discontinuing support for JSON-RPC and Global HTTP Batch Endpoints

But what its hard to understand is exactly what is being discontinued.

There are two batching endpoints. The Global one www.googleapis.com/batch And the API specific one www.googleapis.com/batch/<api>/<version>.

So whats changing?

The global batching endpoing is going down. This means you wont be able to make calls to www.googleapis.com/batch anymore. What does that really mean in the worse case if you were making batch requests mixing two apis at the same time for example Drive and Gmail you wont be able to do that anymore.

In the future you are going to have to split batch requests up by API.

Will this effect you?

Code wise this depends on which client library you are currrently using. Some of them have already been updated to use the single api endpoint (JavaScript and .net) there are a few which have not been updated yet (php and java last i checked)

Now as for your buckets if i understand them correctly they all insert into the same place so your using the same api this probably inst going to effect you. You are also using Googles SDK and they are going to keep that updated.

Note

The blog post is very confusing and there is some internal emails going around Google right now in attempt to get things cleared up as far as what this means for developers.

DaImTo
  • 72,534
  • 21
  • 122
  • 346
1

You have to find where you are doing heterogeneous batch requests either directly or through libraries in your code. In any case batch requests are not reflected in your bucket logs because no API or API method per se was deprecated just a way to call send them.

In detail

You can bundle many requests to different APIs into one batch request. This batch will be sent to a one magical Google server that splits the batch and routes all the API requests in it into their respective service.

This Google server is going to be removed so everything has to be sent directly to the service.

What should you do?

I looks like you are making heterogeneous batch requests because only one service is mentioned, Storage. Probably you should do one of these options.

  • if you are using Cloud Libraries -> update them.

  • find if you are accessing the URL below

www.googleapis.com/batch

and replace it with the appropriate homogeneous batch API, which in your case is

www.googleapis.com/batch/storage/v1
  • in case you use batchPath, this seems to be a relevant article

Otherwise, if you make heterogeneous calls with gapi, which doesn't seem to be your case, split something like this:

 request1 = gapi.client.urlshortener(...)
 request2 = gapi.client.storage.buckets.update(...)
 request3 = gapi.client.storage.buckets.update(...)

 heterogeneousBatchRequest = gapi.client.newBatch();
 heterogeneousBatchRequest.add(request1);
 heterogeneousBatchRequest.add(request2);  
 heterogeneousBatchRequest.add(request3);  

into something like this

 request1 = gapi.client.urlshortener(...)
 urlshortnerbatch = gapi.client.newBatch();
 urlshortnerbatch.add(request1);

 request2 = gapi.client.storage.buckets.update(...)
 request3 = gapi.client.storage.buckets.update(...)
 storagebatch.add(request2);  
 storagebatch.add(request3);  

Official Documentation

Here it's described how to make batch request specifically with Storage API.

A.Queue
  • 1,463
  • 4
  • 20