Docusign REST API,USER删除

时间:2017-09-22 17:55:48

标签: docusignapi

我想从docuSign删除用户,我已经尝试了以下几个步骤,

返回Docusign的所有用户信息: 1.GET https:// {{hostenv}} / restapi / {{apiVersion}} / accounts / 1119416 / users?additional_info = true

这将返回单个用户信息:

2.GET https:// {{hostenv}} / restapi / {{apiVersion}} /accounts/1119416/users?email=ravieej.sfdc@gmail.com

回应:

{
"users": [
    {
        "userName": "Ravi -DocuSign API test",
        "userId": "2a441d45-ffc6-4f66-9383-816d0c11fda6",
        "userType": "CompanyUser",
        "isAdmin": "False",
        "userStatus": "Active",
        "uri": "/users/2a441d45-ffc6-4f66-9383-816d0c11fda6",
        "email": "ravieej.sfdc@gmail.com",
        "createdDateTime": "2017-09-22T17:16:54.0670000Z",
        "permissionProfileId": "869172",
        "permissionProfileName": "DocuSign Sender"
    }
],
"resultSetSize": "1",
"totalSetSize": "1",
"startPosition": "0",
"endPosition": "0"

}

我的挑战是使用REST API CALL删除此用户?

我正在尝试使用:

DELETE https:// {{hostenv}} / restapi / {{apiVersion}} / accounts / 1119416 / users / 2a441d45-ffc6-4f66-9383-816d0c11fda6

但我得到的答复为:

404提供的URL无法解析为资源。

请帮我解决这个问题。

1 个答案:

答案 0 :(得分:1)

根据API文档:https://docs.docusign.com/esign/restapi/Users/Users/delete/

您需要以不同方式格式化您的通话。您需要定位DELETE https://{{hostenv}}/restapi/{{apiVersion}}/accounts/{{account}}/users并在呼叫正文中包含用户ID,而不是直接通过网址定位用户。

我能够通过此次通话关闭用户: DELETE {{vx}}/accounts/{{accountid}}/users

{
"users":[
    {
        "userId": "25bc029d-xxxx-xxxx-xxxx-407676d57bfb"
    }
    ]
}