Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
(Blocked / Solved through #2293697: EntityResource POST routes all use the confusing default: use entity types' https://www.drupal.org/link-relations/create link template if available. See comment #2800097-8: Confusing UI: POST URL differs from GET/PATCH/DELETE URL, but UI doesn't indicate this!)
REST UI is a great tool for quickly setting up settings but isn't accurate in it's display of endpoints.
GET Node is /node/{node} but POST node is /entity/node however this is not shown on the UI as seen in the screenshot.
Can this be updated?
Comment | File | Size | Author |
---|---|---|---|
#18 | Screen Shot 2017-06-08 at 15.19.15.png | 283.31 KB | Wim Leers |
#14 | interdiff-2800097-12-14.txt | 906 bytes | clemens.tolboom |
#14 | confusing_ui_post_url-2800097-14.patch | 3.7 KB | clemens.tolboom |
#12 | 2800097-12.patch | 3.86 KB | Wim Leers |
#12 | REST UI — improved path column — user registration.png | 4.21 KB | Wim Leers |
Comments
Comment #2
Andy_D CreditAttribution: Andy_D at Investis Digital commentedComment #3
Andy_D CreditAttribution: Andy_D at Investis Digital commentedComment #4
Wim LeersMajor at least I think.
Comment #5
clemens.tolboomAccording to https://www.drupal.org/docs/8/core/modules/rest/3-post-for-creating-cont... aka https://www.drupal.org/node/2098511
The issue is #2293697: EntityResource POST routes all use the confusing default: use entity types' https://www.drupal.org/link-relations/create link template if available
@Andy_D can you confirm this POST @ /node works on Drupal 8.2.0 then please close the issue as Works as designed.
Comment #6
Wim LeersWell, that was tantalizingly close to being committed, but then eventually didn't make it into Drupal 8.3.
Fixed the docs: https://www.drupal.org/node/2098511/revisions/view/10162711/10216654 (sadly that diff is completely wrong because of the docs migration — the right change is in there, but lots of irrelevant changes are attributed to this new revision too…)
IMO this cannot be closed as working as designed. For the entire Drupal 8.2 cycle, this will continue to confuse end users. It should be fixed.
Comment #7
gvsoNow that we have 1.13 version which works for Drupal >=8.2, could this change be done in versions <= 1.12?
Comment #8
Wim Leers#7: you need to update from Drupal <8.2 to 8.2 anyway: 8.0 and 8.1 are no longer supported. So that doesn't make sense.
Let's just mark this blocked on #2293697: EntityResource POST routes all use the confusing default: use entity types' https://www.drupal.org/link-relations/create link template if available, then this problem will disappear automatically.
Comment #9
clemens.tolboomComment #10
Wim Leers#2800097: Confusing UI: POST URL differs from GET/PATCH/DELETE URL, but UI doesn't indicate this! is in! This is now unblocked!
On this now.
Comment #11
Wim LeersSorry, lost track of this. Will finish it today.
Comment #12
Wim LeersDone.
Changes:
POST
path (i.e. thecreate
link relation type URI path).canonical
(GET/PATCH/DELETE) or onlycreate
(POST), it's shown on a single line. Otherwise, we use a<dl>
to make it visually clear.DELETE
method is disabled for .POST
are disabled for .Comment #13
Wim LeersComment #14
clemens.tolboomI don't like the DL and here doc. Changed and commit shortly.
Comment #17
clemens.tolboomI was quicker with commit then testbot
Comment #18
Wim Leers-
-
$create_uri_path
-
-
-HTML;
+ $uri_paths = "
$canonical_uri_path
: $canonical_methods";+ $uri_paths.= "
$create_uri_path
: POST";This negatively impacted legibility IMHO. OTOH, it does make for higher information density. See screenshot:
Compare this to the screenshots in #12.
You're the maintainer, your call :)
Thanks for getting this committed and tagging a release: https://www.drupal.org/project/restui/releases/8.x-1.15 :)
Comment #19
clemens.tolboomThanks for your work!!
Comment #20
Wim Leers:)
Thank Acquia for sponsoring my time on the API-first Initiative! That's why I'm able to work on these issues :)
Comment #21
clemens.tolboomI'm currently projectless so can spend time on my d.o projects finally
Comment #22
Wim LeersCool :) (Well, not cool if it lasts too long of course!)
P.S.: I wouldn't mind to see Acquia being added to the list of supporting organizations on the project page. I think that's fair? (Acquia didn't ask me to ask this, you just made me think of that!)
Comment #24
Andy_D CreditAttribution: Andy_D at Investis Digital commentedThanks to everyone for their work on this issue!
Comment #25
Wim LeersYou're welcome :)