public async Task <IHttpActionResult> MoveAsync(string portalUri, string pageUri, [FromBody] string uri, CancellationToken cancellationToken) { if (!ModelState.IsValid) { return(BadRequest()); } var portal = await _portalManager.FindByUriAsync(portalUri, cancellationToken); await ApiSecurity.AuthorizeAsync(portal, AccessPermission.CanEdit, cancellationToken); var page = await _portalManager.GetPageByUriAsync(portal, pageUri, cancellationToken); if (page == null) { return(NotFound()); } var referencePage = (uri == null) ? null : await _portalManager.GetPageByUriAsync(portal, uri, cancellationToken); var validationResult = await _portalManager.MovePageAsync(portal, page, referencePage, cancellationToken); if (!validationResult.Succeeded) { return(this.ValidationContent(validationResult)); } return(Ok()); }