# Fetch Resources Owned and Shared to a User **GET** This API retrieves the complete list of resources associated with the user. The response includes both resources that the user directly owns and those that have been shared with the user by other owners. ## Request URL ```text https://:/restapi/json/v1/resources ``` ## Header Parameters ```json { "AUTHTOKEN": "<>" } ``` | Parameter | Description | Values | |---|---|---| | **AUTHTOKEN** | Authentication token of the user to authorize the API request.
**Type:** String
**Mandatory:** Yes | **Default Value:** N/A | ## Query Parameters ```json INPUT_DATA = { "operation" : { "Details" : { "VIEWTYPE" : "ALLMYPASSWORD", "STARTINDEX" : 0, "LIMIT" : 10, "SEARCHTYPE" : "RESOURCE", "SEARCHVALUE" : "CNS-E01", "SEARCHCOLUMN": "RESOURCENAME" } } } ``` | Parameters | Description | Values | |---|---|---| | **VIEWTYPE** | Specifies the category of passwords to be retrieved.
**Type:** String
**Mandatory:** No | **Default Value:** ALLMYPASSWORD
**Allowed Values:** ALLMYPASSWORD, FAVOURITEPASSWORD, RECENTLYACCESSEDPASSWORD, LINUXSSHPASSWORD, WINDOWSRDPPASSWORD | | **STARTINDEX** | Indicates the starting point or index of the result set.
**Type:** Integer
**Mandatory:** No | **Default Value:** 0 | | **LIMIT** | Specifies the number of records to be fetched.
**Type:** Integer
**Mandatory:** No | **Default Value:** 100
**Maximum Value:** 100 | | **SEARCHTYPE** | Defines whether the search should be performed on resources or accounts.
**Type:** String
**Mandatory:** No | **Default Value:** N/A
**Allowed Values:** RESOURCE, ACCOUNT | | **SEARCHVALUE** | The keyword used for the search.
**Type:** String
**Mandatory:** No | **Default Value:** N/A | | **SEARCHCOLUMN** | Specifies the columns where the search should be applied.
**Type:** String
**Mandatory:** No | **Default Value:** N/A
**Allowed Values:** ALL, RESOURCE_TYPE, RESOURCENAME, RESOURCEDESC, IPADDRESS, LOGINNAME, OPERATINGSYSTEM, DEPARTMENT, LOCATION, DOMAINNAME, RESOURCEURL, COLUMN_CHAR[0-9]*, COLUMN_LONG[0-9]*, COLUMN_SCHAR[0-9]*, COLUMN_DATE[0-9]*, COLUMN_FILE[0-9]* | ## Sample Request ### cURL ```bash curl GET -G -H "Content-Type: application/x-www-form-urlencoded" -H "AUTHTOKEN: " https://:/restapi/json/v1/resources --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"VIEWTYPE\":\"ALLMYPASSWORD\",\"STARTINDEX\":\"1\",\"LIMIT\":\"10\",\"SEARCHTYPE\":\"RESOURCE\",\"SEARCHVALUE\":\"CNS-E01\",\"SEARCHCOLUMN\":\"ALL\"}}}" ``` ## Sample Response ```json { "operation": { "result": { "message": "Resources fetched successfully", "status": "Success" }, "Details": [ { "RESOURCE DESCRIPTION": "", "RESOURCE TYPE": "Windows", "RESOURCE ID": "1", "RESOURCE NAME": "CNS-E01", "NOOFACCOUNTS": "2", "DNS NAME": "" } ], "name": "GET RESOURCES", "totalRows": 1 } } ```