Custom Views Meta Data

Purpose

To get the custom views data of a particular module. Specify the module name in your API request whose custom view data you want to retrieve.

Request Details

Request URL

https://www.zohoapis.com/bigin/v1/settings/custom_views

Scope

scope=ZohoBigin.settings.custom_views.READ
(or)
scope=ZohoBigin.settings.custom_views.ALL
(or)
scope=ZohoBigin.settings.ALL

Parameters

  • modulestring, mandatory

    Specify the API name of the required module. For example Contacts, Deals, and so on.

Sample Request

Copiedcurl "https://www.zohoapis.com/bigin/v1/settings/custom_views?module=Contacts"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
CopiedZBiginModule module = ZBiginModule.getInstance("Contacts");// module api name
BulkAPIResponse response = module.getCustomViews();
List<ZBiginCustomView> customViews = (List<ZBiginCustomView>)
response.getData();
Copied$zbiginModuleIns = ZBiginModule::getInstance("Products");
$apiResponse=$zbiginModuleIns->getAllCustomViews();
$zbiginCustomViews=$apiResponse->getData(); // Here $zbiginCustomViews is an array of ZBiginCustomView instances
Copieddef get_all_customviews(self):
        try:
            module_ins = ZBiginModule.get_instance('Accounts')  # module API Name
            resp = module_ins.get_all_customviews()
            print(resp.status_code)
            cv_ins_arr = resp.data
            for customview_ins in cv_ins_arr:
                print(":::CUSTOM VIEW DETAILS:::")
                print(customview_ins.id)
                print(customview_ins.module_api_name)
                print(customview_ins.display_value)
                print(customview_ins.is_default)
                print(customview_ins.name)
                print(customview_ins.system_name)
                print(customview_ins.sort_by)
                print(customview_ins.category)
                fields = customview_ins.fields
                print("\n:::FIELDS:::")
                if fields is not None:
                    for field in fields:
                        print(field)
                print(customview_ins.favorite)
                print(customview_ins.sort_order)
                cv_criteria = customview_ins.criteria
                if cv_criteria is not None:
                    print("\n\n :::CRITERIA::::")

                    for criteria_ins in cv_criteria:
                        print(criteria_ins.field)
                        print(criteria_ins.comparator)
                        print(criteria_ins.value)
                print(customview_ins.criteria_pattern)

            categories = customview_ins.categories
            print("\n\n :::CATEGORIES::::")
            if categories is not None:
                for category in categories:
                    print(category.actual_value)
                    print(category.display_value)
            print(customview_ins.is_off_line)
        except ZBiginException as ex:
            print(ex.status_code)
            print(ex.error_message)
            print(ex.error_code)
            print(ex.error_details)
            print(ex.error_content)
CopiedZBiginModule moduleIns = ZBiginModule.GetInstance("Leads"); //module api name
BulkAPIResponse<ZBiginCustomView> response = moduleIns.GetAllCustomViews();
List<ZBiginCustomView> customViews = response.BulkData; //customViews - list of ZBiginCustomView instance
Copiedresponse = invokeurl
[
	url: "https://www.zohoapis.com/bigin/v1/settings/custom_views?module=Leads"
	type: GET
	connection:"bigin_oauth_connection"
];
info response;

 

Possible Errors

  • INVALID_MODULEHTTP 400

    The module name given seems to be invalid
    Resolution: You have specified an invalid module name or there is no tab permission, or the module could have been removed from the available modules. Specify a valid module API name.

  • INVALID_MODULEHTTP 400

    The given module is not supported in API
    Resolution: The modules such as Documents and Projects are not supported in the current API. (This error will not be shown, once these modules are been supported). Specify a valid module API name.

Sample Response

Copied{
    "custom_views": [
        {
            "display_value": "All Contacts",
            "default": true,
            "system_name": "ALLVIEWS",
            "system_defined": true,
            "name": "All Contacts",
            "id": "529793000000091529",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "Mailing Labels",
            "default": false,
            "system_name": "ALLVIEWS",
            "system_defined": true,
            "name": "Mailing Labels",
            "id": "529793000000091531",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "My Contacts",
            "default": false,
            "system_name": "MYVIEWS",
            "system_defined": true,
            "name": "My Contacts",
            "id": "529793000000091567",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "New Last Week",
            "default": false,
            "system_name": "lastweek",
            "system_defined": true,
            "name": "New Last Week",
            "id": "529793000000091537",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "New This Week",
            "default": false,
            "system_name": "thisweek",
            "system_defined": true,
            "name": "New This Week",
            "id": "529793000000091535",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "Recently Created Contacts",
            "default": false,
            "system_name": "RECENTLYCREATED",
            "system_defined": true,
            "name": "Recently Created Contacts",
            "id": "529793000000091539",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "Recently Modified Contacts",
            "default": false,
            "system_name": "RECENTLYMODIFIED",
            "system_defined": true,
            "name": "Recently Modified Contacts",
            "id": "529793000000091541",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "Unread Contacts",
            "default": false,
            "system_name": "UNREADVIEWS",
            "system_defined": true,
            "name": "Unread Contacts",
            "id": "529793000000091533",
            "category": "shared_with_me",
            "favorite": null
        },
        {
            "display_value": "Unsubscribed Contacts",
            "default": false,
            "system_name": "UNSUBSCRIBED",
            "system_defined": true,
            "name": "Unsubscribed Contacts",
            "id": "529793000000378013",
            "category": "shared_with_me",
            "favorite": null
        }
    ],
    "info": {
        "per_page": 200,
        "default": "529793000000091529",
        "count": 9,
        "page": 1,
        "more_records": false
    }
}