- Issue created by @bogdog400
- 🇺🇸United States bogdog400
Hi--
I was able to answer my problem by doing a new installation with Drupal 9.5.3. Perhaps version 10.0.3 was preventing my GET commands from working.
Another help was finding the JSONAPI Explorer which made it a bit easier to dig into the JSON.
https://www.drupal.org/project/jsonapi_explorer →
BTW, my biggest hassle was figuring out that cross origin scripting was blocking the JSON calls from the explorer. When I turned that off, I was able to get it to work.
Thanks very much. I'll leave this as a pointer to others.
- Assigned to rifas-ali-pbi
- Status changed to Needs review
almost 2 years ago 1:07pm 13 February 2023 - 🇮🇳India rifas-ali-pbi Kerala
Hi its actually quite easy to understand. The idea is to first give a GET request. Then you will get the JSON data. Same structure is used to send the POST data too.
Body of your desired fields will look like following, I have added geolocation field, link field and an example body.
{ "data": { "type": "node--article", "attributes": { "title": "Rifas test post from postman POST", "body": { "value": "<p>description</p>\r\n" }, "field_location": { "lat": 90, "lng": 40 }, "field_link": { "uri": "https://www.google.com/", "title": "Link Test here", "options": [] } } } }
- Issue was unassigned.
- 🇺🇸United States bogdog400
Yes. That's how I've solved it in the past. But for some reason my installation of 10.0.3 doesn't respond correctly to GET requests. So I ended up building a test version with 9.5.3 and that's worked.
- Status changed to RTBC
almost 2 years ago 7:08am 14 February 2023 - Status changed to Postponed: needs info
almost 2 years ago 9:16am 14 February 2023 - Status changed to Closed: outdated
over 1 year ago 3:02am 14 July 2023