# Create a New Resource POST This API is used to create a new resource in PAM360. The response confirms the successful creation of the resource and provides its unique resource ID. ## Request URL ```text https://:/restapi/json/v1/resources ``` ## Header Parameters ```json { "AUTHTOKEN": "<>" } ``` | Parameter | Description | Values | |---|---|---| | **AUTHTOKEN** | Authentication token for the user to authorize the API request.
**Type :** String
**Mandatory :** Yes | **Default Value :** N/A | ## Body Parameters ```json INPUT_DATA={ "operation": { "Details": { "RESOURCENAME": "Windows Server", "ACCOUNTNAME": "Administrator", "RESOURCETYPE": "Windows", "PASSWORD": "Test123#@!", "NOTES": "Testing API", "RESOURCEURL": "http://windowsserver/adminconsole", "LOCATION": "India", "DNSNAME": "localhost", "DEPARTMENT": "IT", "RESOURCEDESCRIPTION": "Resource", "DOMAINNAME": "localhost", "RESOURCEGROUPNAME": "group", "ENABLEPRIVATEKEY": true, "RESOURCEPASSWORDPOLICY": "Strong", "ACCOUNTPASSWORDPOLICY": "Strong", "OWNERNAME": "admin", "RECORD_CONFIGURED_RESOURCE_URL": "https://localhost", "DISABLE_TAB_DUPLICATION": true, "WEBSITE_SESSION_RECORDING": true, "GATEWAY_SESSION_RECORDING": true, "SAP_USER_TYPE": "A", "RESOURCECUSTOMFIELD": [ { "CUSTOMLABEL": "Secure Resource", "CUSTOMVALUE": "YES" } ], "ACCOUNTCUSTOMFIELD": [ { "CUSTOMLABEL": "Secure Account", "CUSTOMVALUE": "YES" } ] } } } ``` | Parameters | Description | Values | |---|---|---| | **RESOURCENAME** | Name of the resource to be added.
**Type :** String
**Mandatory :** Yes | **Default Value :** N/A | | **ACCOUNTNAME** | Name of the account associated with the resource.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **RESOURCETYPE** | Type of the resource being created.
**Type :** String
**Mandatory :** No | **Default Value :** The default resource type configured in PAM360. | | **PASSWORD** | Password for the associated account.
**Type :** String
**Mandatory :** No | **Default Value :** A password is automatically generated based on the configured password policy. | | **NOTES** | Additional details of the account.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **RESOURCEURL** | The URL linked to the resource.
**Type :** URL
**Mandatory :** No | **Default Value :** N/A | | **LOCATION** | Location of the resource.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **DNSNAME** | DNS name of the resource.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **DEPARTMENT** | Department to which the resource belongs.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **RESOURCEDESCRIPTION** | Description of the resource.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **DOMAINNAME** | Domain associated with the resource.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **RESOURCEGROUPNAME** | Name of the resource group where the resource will be added.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **ENABLEPRIVATEKEY** | Specifies whether private key usage is enabled for the resource.
**Type :** Boolean
**Mandatory :** No | **Default Value :** N/A | | **RESOURCEPASSWORDPOLICY** | Password policy to be assigned to the resource.
**Type :** String
**Mandatory :** No | **Default Value :** The resource will use the password policy configured as default in PAM360.
**Allowed Value :** The password policies available in PAM360. | | **ACCOUNTPASSWORDPOLICY** | Password policy to be assigned to the account.
**Type :** String
**Mandatory :** No | **Default Value :** The account will use the password policy configured as default in PAM360.
**Allowed Value :** The password policies available in PAM360. | | **OWNERNAME** | Name of the resource owner.
**Type :** String
**Mandatory :** No | **Default Value :** N/A | | **RECORD_CONFIGURED_RESOURCE_URL** | Enables session recording for the configured resource URL. When enabled, recording starts as soon as the resource URL is launched, including the login window, for sessions initiated through the PAM360 interface.
**Type :** Boolean
**Mandatory :** No
**Supported Version :** 7500 | **Default Value :** False | | **DISABLE_TAB_DUPLICATION** | Specifies whether duplicate tabs for the resource are disabled.
**Type :** Boolean
**Mandatory :** No
**Supported Version :** 7500 | **Default Value :** False | | **WEBSITE_SESSION_RECORDING** | Specifies whether website session recording is enabled.
**Type :** Boolean
**Mandatory :** No
**Supported Version :** 7500 | **Default Value :** False | | **GATEWAY_SESSION_RECORDING** | Specifies whether gateway session recording is enabled.
**Type :** Boolean
**Mandatory :** No
**Supported Version :** 7500 | **Default Value :** False | | **SAP_USER_TYPE** | Specifies the type of SAP user account to be created.
**Type :** String
**Mandatory :** No
**Supported Version :** 8500 | **Default Value :** N/A
**Allowed Value :** A (Dialog User), B (System User), C (Communication User), S (Service User), L (Reference User) | | **RESOURCECUSTOMFIELD** | Custom fields for the resource. Each object should have a **CUSTOMLABEL** and **CUSTOMVALUE**.
**Type :** JSON
**Mandatory :** No | **Default Value :** N/A | | **ACCOUNTCUSTOMFIELD** | Custom fields for the account. Each object should have a **CUSTOMLABEL** and **CUSTOMVALUE**.
**Type :** JSON
**Mandatory :** No | **Default Value :** N/A | ## Sample Request ```bash curl -X POST -H "AUTHTOKEN: <>" -H "Content-Type: application/x-www-form-urlencoded" "https://:/restapi/json/v1/resources" --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"RESOURCENAME\":\"Windows Server1\",\"ACCOUNTNAME\":\"Administrator\",\"RESOURCETYPE\":\"Windows\",\"PASSWORD\":\"Test@123\",\"RESOURCEPASSWORDPOLICY\":\"Strong\",\"ACCOUNTPASSWORDPOLICY\":\"Strong\",\"RESOURCECUSTOMFIELD\":[{\"CUSTOMLABEL\":\"Secure Resource\",\"CUSTOMVALUE\":\"YES\"}],\"ACCOUNTCUSTOMFIELD\":[{\"CUSTOMLABEL\":\"Secure Account\",\"CUSTOMVALUE\":\"YES\"}]}}}" ``` ## Sample Response ```json { "operation": { "result": { "message": "Resource pmp-centos6-ptuser1 has been added successfully", "status": "Success" }, "Details": { "RESOURCEID": "304" }, "name": "CREATE RESOURCE" } } ```