【问题标题】:Delete office 365 sharepoint site using rest api使用rest api删除office 365 sharepoint站点
【发布时间】:2020-01-07 17:03:54
【问题描述】:

我正在尝试使用 REST API 删除 Office 365 SharePoint 网站,但我不知道该怎么做。有什么方法可以使用 rest APi 删除 Office 365 SharePoint 网站。

注意:我正在使用 Graph Explorer 在 SharePoint 上创建网站,现在我想完全删除它。

【问题讨论】:

    标签: sharepoint office365 azure-web-app-service office365api


    【解决方案1】:

    试试这个:

    var restAPIURL = "siteurl/_api/web"  
    $.ajax  
    ({    
        url: restAPIURL,    
        type: "POST",  
        async: false,  
        headers: {  
             "accept": "application/json;odata=verbose",  
            "content-type": "application/json;odata=verbose",  
            "X-RequestDigest": $('#__REQUESTDIGEST').val(),    
            "X-HTTP-Method": "DELETE"  
        },   
        success: function(data){    
             console.log('site deleted');  
        },    
        error: function(data){   
            console.log('Error deleting site');   
        }    
    }); 
    

    参考:

    https://social.technet.microsoft.com/wiki/contents/articles/37462.sharepoint-online-office-365-delete-sharepoint-site-using-rest-api.aspx

    https://www.c-sharpcorner.com/article/create-retrieve-update-or-delete-sites-on-sharepoint-using-rest-api/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-11
      • 2015-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-26
      相关资源
      最近更新 更多