Problem/Motivation
I've been successfully creating new content nodes with the JSON API for a while by POSTing a JSON block to this URL:
http://domain.name/jsonapi/node/contentType
In the last few weeks, though, something changed. Before, I would get a data OBJECT in the response with just the new node. Now I'm getting a full ARRAY with all of the contentType nodes. It's yuge.
The code ran fine about a month ago. Now the new array (and all of the data inside it) is crushing the process.
Any ideas where to look? Did I somehow trip something when reconfiguring?
TIA.
Comments
Comment #2
bogdog400 commentedThis is kind of strange. I think the problem is caused by using the full domain name instead of the IP address in the URL. In other words:
http://domain.name/jsonapi/node/contentType
behaves differently than
http://IP.ADD.RE.SS/jsonapi/node/contentType
In the past, I was just using the IP address in the URL because I was building out the site. Last week, I turned off this configuration in the NGINX front end and started using only the full domain name. So literally the only change I made in my code was switching the URL.
When I turn back on that configuration file in NGINX and then use the IP address in the URL, I get the old format response from POSTing a new piece of content. The JSON has field right where I expected them.
Is there something that could be causing this?
TIA!
Comment #3
bbralaThere might be some redirect happening in your application? Can you see if you are being redirected perhaps?
Comment #4
bogdog400 commentedThanks. That could be.
Is there some place I should check? The NGINX configuration files?
Or is this deeper in the network?
Comment #5
bbralaI would first look at console. Also you could look at the nginx log.
Comment #8
quietone commentedI think this can be closed. @bbrala pointed @bogdog400 in the right direction and there have been no further queries.
The Drupal Core issue queue is not the ideal place for support requests. There are several support options listed on our Support page, including the Drupal Forums and Drupal Answers.