# Configure Remote Password Reset for Windows Domain Resources **POST** This API configures the remote password reset for Windows Domain resources in PAM360. It allows administrators to define the parameters needed to perform password resets remotely. ## Request URL ``` https://:/restapi/json/v1/resources/configureremotepasswordreset ``` ## Header Parameters ```json { "AUTHTOKEN" : "<>", "orgName" : "<>" } ``` | Parameter | Description | Values | |---|---|---| | **AUTHTOKEN** | Authentication token for the user to authorize the API request.
**Type :** String
**Mandatory :** Yes | **Default Value :** N/A | | **orgName** | Organization name available in PAM360.
**Type :** String
**Mandatory :** No | **Default Value :** The organization to which the user belongs. | ## Body Parameters **Use the following input if you are configuring remote password reset using a Local account:** ```json INPUT_DATA={ "operation": { "Details": { "RESOURCETYPE": "WindowsDomain", "ACCOUNTNAME": "admin", "CONNECTION_MODE": SSL, "ISWINDOMAINLOCAL": "true", "RESOURCEIDS": ["4","5","6"] } } } ``` **Use the following input if you are configuring remote password reset using a Domain account:** ```json INPUT_DATA={ "operation": { "Details": { "RESOURCETYPE": "WindowsDomain", "WDRESOURCEID": "4", "WDACCOUNTID": "4", "ISWINDOMAINLOCAL": "false", "RESOURCEIDS": ["4","5","6"] } } } ``` | Parameters | Description | Values | |---|---|---| | **RESOURCETYPE** | Specifies the type of resource.
**Type :** String
**Mandatory :** Yes | **Default Value :** N/A
**Allowed Values :** WindowsDomain | | **ACCOUNTNAME** | Specifies the name of the account to be configured for password reset.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **CONNECTION_MODE** | Specifies the connection mode used for communication.
**Type :** String
**Mandatory :** No | **Default Value :** Non SSL
**Allowed Values :** SSL, Non SSL | | **ISWINDOMAINLOCAL** | Specifies whether to use a local account or a domain account.
**Type :** Boolean
**Mandatory :** Yes | **Default Value :** N/A | | **WDRESOURCEID** | Specifies the Windows Domain resource ID to be used for performing the password reset.
**Type :** Integer
**Mandatory :** No | **Default Value :** N/A | | **WDACCOUNTID** | Specifies the Windows Domain account ID to be configured for password reset.
**Type :** Integer
**Mandatory :** No | **Default Value :** N/A | | **RESOURCEIDS** | List of resource IDs to be processed.
**Type :** Integer Array
**Mandatory :** Yes | **Default Value :** N/A | ## Sample Request ### cURL ```bash curl -X POST -H "AUTHTOKEN:<>" -H "Content-Type:application/x-www-form-urlencoded" https://:/restapi/json/v1/resources/configureremotepasswordreset --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"RESOURCETYPE\":\"WindowsDomain\",\"ACCOUNTNAME\":\"admin\",\"CONNECTION_MODE\":\"SSL\",\"ISWINDOMAINLOCAL\":\"true\",\"RESOURCEIDS\":[\"4\",\"5\",\"6\"]}}}" ``` ### Python ```python import requests import json # API endpoint url = "https://:/restapi/json/v1/resources/configureremotepasswordreset" # Headers headers = { "AUTHTOKEN": "<>", "Content-Type": "application/x-www-form-urlencoded" } # Payload payload = { "operation": { "Details": { "RESOURCETYPE": "WindowsDomain", "ACCOUNTNAME": "admin", "CONNECTION_MODE": SSL, "ISWINDOMAINLOCAL": "true", "RESOURCEIDS": ["4","5","6"] } } } # Convert payload to JSON string for form-encoded request form_data = { "INPUT_DATA": json.dumps(payload) } # Send POST request response = requests.post(url, headers=headers, data=form_data, verify=True) # Print response print(response.text) ``` ### PowerShell ```powershell #API endpoint $Url = "https://<>/restapi/json/v1/resources/configureremotepasswordreset" #Headers $Headers = @{ "AUTHTOKEN" = "<>" "Content-Type" = "application/x-www-form-urlencoded" } #Single-line INPUT_DATA $Body = @{ INPUT_DATA = "{""operation"": {""Details"": { ""RESOURCETYPE"": ""WindowsDomain"", ""ACCOUNTNAME"": ""admin"", ""CONNECTION_MODE"": SSL, ""ISWINDOMAINLOCAL"": ""true"", ""RESOURCEIDS"": [""4"",""5"",""6""] } } }" } #Send POST request $response = Invoke-RestMethod ` -Uri $Url ` -Method Post ` -Headers $Headers ` -Body $Body #Print response $response | ConvertTo-Json -Depth 5 ``` ## Sample Response ```json { "operation": { "result": { "message": "Password reset details configured for the matching resources.", "status": "Success" }, "Details": { "CONFIGURATION RESULT": [ { "STATUS": "SUCCESS", "RESOURCENAME": "test", "RESOURCEID": "1" } ] }, "name": "CONFIGURE REMOTE PASSWORD RESET" } } ```