autoit / DocuSign eSignature REST API / Deletes a permissions profile within the specified account.
Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
; Use this online tool to generate code from sample JSON: Generate Code to Create JSON
; The following JSON is sent in the request body.
; {}
$oJson = ObjCreate("Chilkat.JsonObject")
; Adds the "Authorization: Bearer {{accessToken}}" header.
$oHttp.AuthToken = "{{accessToken}}"
$oHttp.SetRequestHeader "Accept","application/json"
$oSbRequestBody = ObjCreate("Chilkat.StringBuilder")
$oJson.EmitSb($oSbRequestBody)
Local $oResp = $oHttp.PTextSb("DELETE","https://domain.com/v2.1/accounts/{{accountId}}/permission_profiles/{{permissionProfileId}}?move_users_to={{move_users_to}}",$oSbRequestBody,"utf-8","application/json",False,False)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite($oResp.StatusCode & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)
Curl Command
curl -X DELETE
-H "Accept: application/json"
-H "Authorization: Bearer {{accessToken}}"
-d '{}'
https://domain.com/v2.1/accounts/{{accountId}}/permission_profiles/{{permissionProfileId}}?move_users_to={{move_users_to}}
Postman Collection Item JSON
{
"name": "Deletes a permissions profile within the specified account.",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": {
"mode": "raw",
"raw": "{}"
},
"url": {
"raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/permission_profiles/{{permissionProfileId}}?move_users_to={{move_users_to}}",
"host": [
"{{baseUrl}}"
],
"path": [
"v2.1",
"accounts",
"{{accountId}}",
"permission_profiles",
"{{permissionProfileId}}"
],
"query": [
{
"key": "move_users_to",
"value": "{{move_users_to}}"
}
],
"variable": [
{
"key": "accountId",
"value": "{{accountId}}",
"type": "string"
},
{
"key": "permissionProfileId",
"value": "{{permissionProfileId}}",
"type": "string"
}
]
}
},
"response": [
]
}