I need to change the name of a subsite when a field is filled into a list item. I found this helpful article about using REST API to update subsite information and have it somewhat working.
I get an 'OK' response code so its going through but it is not actually changing the site title.
Requests:
RequestHeader: {"content-type":"application\/json;odata=verbose","Accept":"application\/json;odata=verbose","X-HTTP-Method":"MERGE"}
Metadata: {"type":"SP.Web"}
RequestContent: {"__metadata":"{\"type\":\"SP.Web\"}","Title":"New Site Title","Description":"Site updated from REST API","ServerRelativeUrl":"\/teams\/'SiteCollName'\/'SiteName'\/Old_Site_Title"}
RESTParameters: {"parameters":{"__metadata":"{\"type\":\"SP.Web\"}","Title":"New Site Title","Description":"Site updated from REST API","ServerRelativeUrl":"\/teams\/'SiteCollName'\/'SiteName'\/Old_Site_Title"}}
Responses:
ResponseContent: {"d":{"Title":"Old Site Title"}}
ResponseHeader: {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"X-SP-SERVERSTATE":["ReadOnly=0"],"DATASERVICEVERSION":["3.0"],"SPClientServiceRequestDuration":["7"],"SPRequestDuration":["40"],"SPRequestGuid":["c4adad15-4f72-6f3c-b764-263d94a83a4a"],"request-id":["c4adad15-4f72-6f3c-b764-263d94a83a4a"],"MS-CV":["Fa2txHJPPG+3ZCY9lKg6Sg.0"],"Strict-Transport-Security":["max-age=31536000"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["16.0.0.7115"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Mon, 27 Nov 2017 18:14:59 GMT"],"P3P":["CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\""],"Server":["Microsoft-IIS\/8.5"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]}
ResponseCode: OK
From the ResponseContent, the workflow is identifying the current Site Title so I'm on the right track as to what I'm changing.
I am using the HTTP Call Service in an App Step to send the request as a POST (also tried as a PUT, didn't make a difference).
What additional information am I missing to get the sub site to update?
If you have an alternative way to do this, I am very much open to that as well.