HTTP Set
PUT /cdna-api/pages/page/1885?properties={id,fullPath,customUrl{id,url}}
Content-Type: application/json
{"customUrl": {"url": "/api-sandbox-custom-url"}}
# 200 {"result":"success","data":{"id":1885,"fullPath":"/api-sandbox-custom-url","customUrl":{"id":4,"url":"/api-sandbox-custom-url"}},"message":"The Page has been saved successfully."}
HTTP Clear
PUT /cdna-api/pages/page/1885?properties={id,fullPath,customUrl{id,url}}
Content-Type: application/json
{"customUrl": {"url": ""}}
# 200 {"result":"success","data":{"id":1885,"fullPath":"/api-sandbox","customUrl":null},"message":"The Page has been saved successfully."}
Both are real answers on this site's sandbox page. The failures it gave on the way:
| Request | Answer |
{"customUrl": null} | Not the way to clear it, even though null clears other relations: refused with a 500, "Cannot use object of type …FillValue as array" |
| A URL another record already has, of any type | 422, "This value is already used." on customUrl.url |
{"customUrl": {"url": "api-sandbox-no-slash"}} | 200, saved as written: fullPath came back as api-sandbox-no-slash, with no slash, which breaks every link built from it |