Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

REST Request To Update/Modify Quick Launch Nav Node

$
0
0

My HTTP Request sends the following parameters to update the Current Navigation (left-side) link I want modified.

url: https://<my-server>/_api/web/Navigation/GetNodeById(<node id>) method: POST headers: "X-RequestDigest":<digest-value>, "X-HTTP-Method":"MERGE", "IF-MATCH":"*",

"accept": "application/json;odata=verbose", "Content-Type": "application/json;odata=verbose" body/data: { '__metadata': { 'type': 'SP.NavigationNode' }, 'Title':'<display name of nav node/link>', 'Url':'<URL of the nav node/link' }



The HTTP responses have been 204/"nocontent". But I refresh the page where the links are seen, and the link URL has not been changed.  I can change the display name ('Title') property and it does change, but not the URL!

I have tried variations on the header "X-HTTP-Method". "MERGE" and "PUT" are on MS official SharePoint pages, but others have mentioned "PATCH" (not sure why). In some cases, I found 400 returned status code about 'IsVisible' not being specified in the body.

MERGE works at least to change the title.

If I am forced to do a DELETE and CREATE process because an existing URL is immutable using a REST request, how does one position the Quick Launch nav links relative to each other (top to bottom)? I want this in a certain location under the Header node (property URL="/")



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>