Google Safe Browsing database generation - safe-browsing

During these days I would investigate about the mod_security integration with Google Safe Browsing but I can't generate the local GSB database with the HTTP call. Firstly I generated an API Key related to my Google user and if I tried to call the URL to retrieve the lists all works.
http://safebrowsing.clients.google.com/safebrowsing/list?client=api&apikey=<myapikey>&appver=1.0&pver=2.2
After that I generated the new MAc KEY over ssl call as reported below:
https://sb-ssl.google.com/safebrowsing/newkey?client=api&apikey=<myapikey>&appver=1.0&pver=2
I received a 200 responde with a clientkey (length 24 chars) and a wrappedkey (length 100 chars). After that I tried to download the list with the call below, but I received a 400 response.
http://safebrowsing.clients.google.com/safebrowsing/downloads?client=api&apikey=<myapikey>&appver=1.0&pver=2.2&wrkey=<mywrappedkey>.
Did someone find the same behavior?

Related

Amazon FEED _GET_XML_RETURNS_DATA_BY_RETURN_DATE_

I try to get return report from amazon, but my request is always cancelled. I have working request report using
'ReportType' => 'GET_MERCHANT_LISTINGS_DATA',
'ReportOptions' => 'ShowSalesChannel=true'
I modify it by changing ReportType and removing ReportOptions. MWS accept request by its always cancelled. I also try to find any working example of it on google but also without success. Meybe somone have working example of it? I can downolad report when I send request from amazon webpage. I suppose it require ReportOptions, but I dont know what to put in this place (I have only info ReportProcessingStatus CANCELLED). Normally I choose Day,Week,Month. I check on amazon docs but there isnt many informations https://docs.developer.amazonservices.com/en_US/reports/Reports_RequestReport.html
Any ideas?

How to validate the RefreshToken programmatically in Google?

We are using Google Ads API and we wanted to validate the Refresh token programmatically, as using a incorrect refresh token or expired refresh token is taking lot of time before giving an exception(60 mins approx or even more) and hence causing a 504 TIMEOUT. Also there is a limitation on number of refresh token that we can create which is at max 50 refresh token at a time and if we create new 51st refresh token then the oldest one will expire. And hence chances of getting into this issue is more likely so we wanted to know if there is some API via which we can validate and then take appropriate actions instead of direct calling Google Ads API and getting into TIMEOUT ISSUE.
We also reached out to Google ads forum for this requirement and suggested to reach out GCP support ref link to Question asked: https://groups.google.com/g/adwords-api/c/tqOdXsnL5NI
We tried calling listaccessiblecustomers .
And we were expecting to get some invalid Exception in some ms or some secs so that we can log it for Error notification to our customers instead, after calling the API the call got stuck for almost 61 mins and then 504 TIMEOUT occurred.
You really need to post your code. You said you tried calling the listaccessiblecustomers service, but how? Are you using the client libraries? If so, what language are you even using?
You need to put in a bit of effort if you need some help. Remember, we can't see what you see on the screen in front of you.

SAS Web services payload size - http 413 error

I have developed a stored process to receive an XML file as a response to a web service call and deployed it as a web service - something similar to the example here.
It is successful and working fine in receiving an XML file which is of ~100KB but failing to receive similar file which is about 3MB. The other system sending the response seems to throw the below error 
HTTP Response Code 413 for 'https://mystoredprocessURL'. I understand that this is related payload too large in size.
Could you suggest me how to configure the length of payload size that has to be received so that the stored process can receive a larger file. Tried to research but could not find anything relevant.
my first idea. I hope this helps, but that's just a hint:
SAS SMC-->plug-ins tab-->Application manager-->configuration manager-->
SAS Application infrastucture-->BI web services for java 9.4-->WebServiceMaker
-->Settings tab-->Attachemnt optimized threshold block.
Maybe the default size is 2048.

System.ServiceModel.FaultException: Server was unable to process request. ---> ... with key 0 was not found

I have a simple service (C# web service) that accepts an integer and returns an integer, i have tested it using Storm it is working properly.
Now i am calling this service in a for loop in a file with around 2000 records approx, this service is failing giving the above error with some records. If i run the error file it goes through as if nothing was wrong, what might be the problem please help.
The error doesn't seem related to it being a web service call: it seems to indicate you either tried to GetEntity and passed in a zero/NullIdentifier() (not a valid Id), or maybe you tried an CreateEntity and that entity has a foreign key that is not filled in (i.e. zero/NullIdentifier() again).
I would start by checking the logic inside the WS method for those action calls and the inputs you are using there.

REST - Get updated resource

I working on a service which scrapes specific links from blogs. The service makes calls to different sites which pulls in and stores the data.
I'm having troubles specifying the url for updating the data on the server where I now use the verb update to pull in the latest links.
I currently use the following endpoints:
GET /user/{ID}/links - gets all previously scraped links (few milliseconds)
GET /user/{ID}/links/update - starts scraping and returned the scraped data (few seconds)
What would be a good option for the second url? some examples I came up with myself.
GET /user/{ID}/links?collection=(all|cached|latest)
GET /user/{ID}/links?update=1
GET /user/{ID}/links/latest
GET /user/{ID}/links/new
Using GET to start a process isn't very RESTful. You aren't really GETting information, you're asking the server to process information. You probably want to POST against /user/{ID]/links (a quick Google for PUT vs POST will give you endless reading if you're curious about the finer points there). You'd then have two options:
POST with background process: If using a background process (or queue) you can return a 202 Accepted, indicating that the service has accepted the request and is about to do something. 202 generally indicates that the client shouldn't wait around, which makes sense when performing time dependent actions like scraping. The client can then issue GET requests on the first link to retrieve updates.
Creative use of Last-Modified headers can tell the client when new updates are available. If you want to be super fancy, you can implement HEAD /user/{ID}/links that will return a Last-Modified header without a response body (saving both bandwidth and processing).
POST with direct processing: If you're doing the processing during the request (not a great plan in the grand scheme of things), you can return a 200 OK with a response body containing the updated links.
Subsequent GETs would perform as normal.
More info here
And here
And here