Mailchimp API Issue with Batch Requests using 'skip_merge_validation=true' for add list Operations? - mailchimp

Have any others had a problem adding Contacts to a list via Batch Request in Mailchimp API v3?
It appears that there may be a bug in the Mailchimp Marketing API, version 3.0.
This issue occurs when executing a Batch Request.
When the Operations contained in the Batch Request are for adding members to a list: https://mailchimp.com/developer/marketing/api/list-members/add-member-to-list/
If the available Query Parameter, 'skip_merge_validation' is set as "?skip_merge_validation=true" for each Operation within the Batch, then each of these Operations will fail.
If the 'skip_merge_validation' parameter is not used, the Batch executes successfully.
If these same add list transactions are submitted one at a time...not inside a Batch Request, they execute successfully.
The following is typical text of the response error-->
"status_code": 404, "operation_id": "72df952af8795581869d7dedb620c329", "response": "{\"type\":\"https:\/\/mailchimp.com\/developer\/marketing\/docs\/errors\/\",\"title\":\"Resource Not Found\",\"status\":404,\"detail\":\"The requested resource could not be found.\",\"instance\":\"\"}" }
Below is a typical add list Operation that would be wrapped within the Batch Request:
body={"id":"","email_address":"webmaster#lalala.com","status":"subscribed","merge_fields":{"FNAME":"Harry","LNAME":"Smith","BIRTHDAY":"","ADDRESS":{"addr1":"","addr2":"","city":"","state":"OR","zip":"","country":""},"VNCUSTNBR":"5190"},"MD5_hashed_email_address":"24fda9bd05aa2039600ae060ef41f779"}
method=POST
operation_id=24fda9bd05aa2039600ae060ef41f779
path=/lists/QWERTY/members?skip_merge_validation=true
update_existing=False

Related

How to get the response time of calls made within an API with Jmeter

I'm using J-meter to get response time for an API via HTTP request but this API internally few more api services. Now, i need the response time taken by these internal calls too.
Pls could anyone assist to get this one sorted via J-meter
Below is what I can think of:-
Check on "Follow Redirect" and then use listener like "View Result tree" or "Simple Data Writer" to write the output in an XML format instead of CSV. There you can find the redirected URLs and response time.
But, XML creation will consumer a lot of resource and should be avoided.
Second, use post processor and fetch the response time from the sampler results along with redirected URL and write it in a csv. This requires some coding.

Running samplers in sequential Manner Jmeter

I am creating a script on a simple web application which includes following:
1)Login
2)Some API call(which requires token from login response)
I successfully created the script and executed for one thread which worked fine. Now I am trying increase the load upto 100 threads wherein i got some errors on few API request which got executed before Login sampler(authorization error). Then I put if controller for all API calls(if login success then request API), in this case login will always run first before any API request($JMeterThread.last_sample_ok==true).
My manager has told me not to use if controllers in the script because it will consume some time to execute which in turn will affect the final response time.
What is the alternate method to achieve this in term of performance aspect.

My Application allows one user opeartion one at a time but jmeter is able to process the same request multiple time simultaneously withoutany error

My Application allows only one user to login/perform any operation at a time but jmeter is able to do the same process/request multiple times without throwing any error using same user credential simultaneously. I've used record and play function of Jmeter and it is able to do the same request multiple times without throwing any error. I have used multiple users in my thread group that's why it is doing same request multiple time but this should be shown in red or fail as my application support that one user can be used only once to perform any operation.
JMeter doesn't perform any checks of the response content, it automatically considers HTTP Response codes below 400 as successful.
If your application displays an error message - JMeter won't automatically check for it, it just measures response time. You can add i.e. Response Assertion to add a check that response contains what it should contain or vice versa, that it doesn't contain patterns like "Error" or "Exception" or whatever.
See How to Use JMeter Assertions in Three Easy Steps for more information on how you can conditionally set pass or fail criteria in your JMeter test.

Are database calls in cloud functions counted as regular request?

As per FAQs of parse.com,
How are requests made from Cloud Code treated under the request limit?
Calling a Cloud function will count itself as a single request. Save and delete triggers in Cloud Code are considered part of the original object save/delete request, and they will not be counted as an additional request. However, if your function or save/delete trigger uses the Parse JavaScript SDK to perform additional operations, these will be treated in the same way they would as if they were made by a regular client.
What does using JS sdk in cloud code exactly mean? If i make simple database call like query.find from a cloud function or trigger then will that be counted as regular client request?
Yes query.find will be a database request. Any query execution wil be.

Google API and batch requests for different APIs and limites

The google calendar API and the google drive API allows batch requests.
To do so, you need execute a POST on www.googleapis.com/batch
And the body of the request contain the list of GET/POST/DELETE of your differents requests.
According to https://developers.google.com/google-apps/calendar/batch and https://developers.google.com/drive/web/batch
You can even group requests for multiple users or multiple Google APIs.
Does it mean I can send a request for the calendar API and a request for the drive API in the SAME batch ?
If so, https://developers.google.com/google-apps/calendar/batch says :
You're limited to 50 calls in a single batch request. If you need to make more calls than that, use multiple batch requests.
And https://developers.google.com/drive/web/batch says :
You're limited to 1000 calls in a single batch request. If you need to make more calls than that, use multiple batch requests.
Which value is the correct one ?
More about others APIs :
For https://developers.google.com/webmaster-tools/v3/how-tos/batch
They forgot to give the host name ( www.googleapis.com ? ). In the example they just put :
Host: host
They say the limit is 1000 but didn't say if you can call others APIs in the same batch
For https://developers.google.com/admin-sdk/reseller/v1/how-tos/batch
They show in the example :
POST https://www.googleapis.com/batch
They say the limit is 1000 and specify :
You can even group requests for multiple users or multiple Google APIs.
After experiments, It is not possible to mix differents API (calendar, drive, ...) in the same batch. So each API has its own limit.
And, for google calendar, there is another limitation :
Cannot perform operations on different calendars in the same batch request.
(error "400 Bad Request", reason "cannotOperateOnDifferentCalendarsInBatch")

Resources