Hoping someone might have some insight on an error I am getting in Postman. I am using the "Add, delete, or update the tags of a set of devices" endpoint and have modified it slightly so instead of using parameters in the URL, I am using JSON in the body instead simply because of the amount of MAC addresses involved for the scope of devices caused the URL to be too long. I have populated a bunch of fake MAC's below as an example, but in my real world test I am trying to add a tag to about 2000+ devices at the same time. Keep in mind this same PUT works if I trim it down to like 800 devices so I think I am hitting some sort of hard limit somewhere.
Again in some cases I get a 502 Bad Gateway error, if I bump up the "Request Timeout in MS" setting in postman to around 200000+ I then get a 500 Internal Server error.
Any advice on how to get around this would be appreciated. I know I can splice my data into chunks and just do it that way, but if I can just do it in one dump that would be great. I will have to continually keep doing this in the future.
EDIT: Ignore all the smilies lol
As a matter of interest, what is the total size (in bytes) of the request you are trying to send?
I think you already know the answer and just need someone to confirm you are right - that there is a maximum request size and that will you need to break the request into batches. :-)
I don't know that answer.
There is the action batches API as well you could consider using for this process (of breaking the request up):
I haven't tried it - but does Postman allow you to gzip the request (aka gzip encoding) before sending it?
I took a look at action batches and gzip and both seem like they could have been valid solutions.
My request size was 51.98kb.
I was able to solve actually by updating Postman to V7.0+ and somehow this has allowed my request to process. Not sure what exactly changed there but I appreciate your suggestions @PhilipDAth
So scratch my previous response, I tried a larger batch (62kb) and I am back to 502 bad gateway.
Have been trying to gzip my request and send as binary file in Postman but I keep ending up with "400 bad request: error in JSON you submitted".
I am not doing anything fancy, I am just taking the JSON from the body in Postman and saving it as a JSON file and using gzip to compess it, then adding the gzip file in Postman and sending the PUT request. The gzipped file is 13kb.
It just seems to mangle my JSON when it gets gzipped and Postman can no longer understand it, however I do notice Postman automatically adds some temporary headers when it detects a gzip file.
>using gzip to compess it, then adding the gzip file in Postman and sending the PUT request
You would need to also tell it to add that it is gzip encoded in the HTTP header. This is an example using curl:
If I recall correctly, Postman has an option to export the code in other languages, like Python. Perhaps try doing this in something else, as it sounds like it is Postman imposing the buffer size limit.
@nickydd9 The error was seen on Postman, CURL Terminal and Mac OS Terminal using CURL commands. You can bypass it using a simple script to split the total list of MAC addresses into chunks of 800 and test again.
Also, there is a bug with pending Meraki Support and you can reach out to them if you need more details.