Query Metadata Examples
To retrieve metadata using the Zoho CRM GraphQL API, you need to specify the field name within the _Meta type in your request. Different _Meta sub types provide specific fields for filtering and retrieving relevant information. Refer to Meta Filters page for details. Here are some examples to help you get familiar with querying Metadata.
Querying InvoicesModules Metadata
This query returns metadata about InvoicesModules along with its child_relationships and parent_module.
Copiedquery {
Meta {
Modules(filter: { api_name: "Invoices" }) {
_data {
plural_label
presence_sub_menu
id
visibility
on_demand_properties
web_link
api_name
module_name
description
modified_time
show_as_tab
sequence_number
singular_label
api_supported
generated_type
feeds_required
business_card_field_limit
status
child_relationships {
_data {
display_label
api_name
id
}
}
parent_module {
plural_label
presence_sub_menu
id
properties
visibility
on_demand_properties
web_link
api_name
module_name
description
modified_time
show_as_tab
sequence_number
singular_label
api_supported
generated_type
feeds_required
business_card_field_limit
status
}
}
}
}
}
Response
Copied{
"data": {
"Meta": {
"Modules": {
"_data": [
{
"plural_label": "Invoices",
"presence_sub_menu": true,
"id": "2484261000000000175",
"visibility": 1,
"on_demand_properties": [
"$blocked_reason",
"$client_portal_permission"
],
"web_link": null,
"api_name": "Invoices",
"module_name": "Invoices",
"description": null,
"modified_time": null,
"show_as_tab": true,
"sequence_number": 13,
"singular_label": "Invoice",
"api_supported": true,
"generated_type": "default",
"feeds_required": false,
"business_card_field_limit": 5,
"status": "visible",
"child_relationships": {
"_data": [
{
"display_label": "Review Process-Review Summary",
"api_name": "Review_Processes__r",
"id": "2484261000000267077"
},
{
"display_label": "Review Process-Field History",
"api_name": "Review_Logs__r",
"id": "2484261000000267107"
},
{
"display_label": "Invoiced Items",
"api_name": "Invoiced_Items__r",
"id": "2484261000000271701"
},
{
"display_label": "Notes",
"api_name": "Notes__r",
"id": "2484261000000282540"
},
{
"display_label": "Attachments",
"api_name": "Attachments__r",
"id": "2484261000000282606"
},
{
"display_label": "Emails",
"api_name": "Emails__r",
"id": "2484261000000284049"
},
{
"display_label": "Meetings",
"api_name": "Events__r",
"id": "2484261000000284053"
},
{
"display_label": "Tasks",
"api_name": "Tasks__r",
"id": "2484261000000284055"
},
{
"display_label": "Calls",
"api_name": "Calls__r",
"id": "2484261000000284057"
},
{
"display_label": "Locking Information",
"api_name": "Locking_Information__s__r",
"id": "2484261000000419066"
},
{
"display_label": "ww_1 > Current Record Name",
"api_name": "ww_1_Current_Record_Name__s__r",
"id": "2484261000000597403"
}
]
},
"parent_module": null
}
]
}
}
}
}
Querying Users Metadata
This query returns metadata about Users Module.
Copiedquery {
Meta {
Users {
_data {
id
zuid
country
city
email
phone
mobile
website
fax
confirm
date_format
time_zone
sort_order_preference
country_locale
created_time
Modified_Time
offset
signature
status
first_name
last_name
full_name
name_format
language
locale
microsoft
personal_account
default_tab_group
street
alias
sandboxDeveloper
dob
Currency
zip
decimal_separator
state
time_format
customize_info {
show_right_panel
unpin_recent_item
bc_view
notes_desc
show_home
show_detail_view
}
theme {
new_background
background
screen
type
selected_tab {
font_color
background
}
normal_tab {
font_color
background
}
}
role {
id
display_label
share_with_peers
api_name
name
description
admin_user
}
profile {
id
display_label
created_time
modified_time
api_name
custom
name
description
}
}
_info {
next_offset
previous_offset
more_records
}
}
}
}
Response
Copied{
"data": {
"Meta": {
"Users": {
"_data": [
{
"id": "2484261000000485001",
"zuid": "80964884",
"country": "IN",
"city": null,
"email": "pat@zohotest.com",
"phone": "2323232",
"mobile": "2323232",
"website": null,
"fax": null,
"confirm": true,
"date_format": "dd/MM/yyyy",
"time_zone": "Asia/Kolkata",
"sort_order_preference": "First Name,Last Name",
"country_locale": "US",
"created_time": "2023-11-30T15:25:20+05:30",
"Modified_Time": "2023-11-30T15:25:36+05:30",
"offset": 19800000,
"signature": null,
"status": "active",
"first_name": "m",
"last_name": null,
"full_name": "m",
"name_format": "Salutation,First Name,Last Name",
"language": "en_US",
"locale": "en_US",
"microsoft": false,
"personal_account": true,
"default_tab_group": "0",
"street": null,
"alias": null,
"sandboxDeveloper": false,
"dob": null,
"Currency": null,
"zip": null,
"decimal_separator": "en_US",
"state": null,
"time_format": "hh:mm a",
"customize_info": {
"show_right_panel": null,
"unpin_recent_item": null,
"bc_view": null,
"notes_desc": null,
"show_home": false,
"show_detail_view": true
},
"theme": {
"new_background": null,
"background": "#F3F0EB",
"screen": "fixed",
"type": "default",
"selected_tab": {
"font_color": "#FFFFFF",
"background": "#222222"
},
"normal_tab": {
"font_color": "#FFFFFF",
"background": "#222222"
}
},
"role": {
"id": "2484261000000015966",
"display_label": "CEO",
"share_with_peers": true,
"api_name": "CEO",
"name": "CEO",
"description": "Users with this role have access to the data owned by all other users.",
"admin_user": true
},
"profile": {
"id": "2484261000000015972",
"display_label": "Administrator",
"created_time": "null",
"modified_time": "null",
"api_name": "Administrator",
"custom": false,
"name": "Administrator",
"description": "This profile will have all the permissions. Users with Administrator profile will be able to view and manage all the data within the organization account by default."
}
}
],
"_info": {
"next_offset": null,
"previous_offset": null,
"more_records": false
}
}
}
}
}
Querying Users Metadata using limit and offset
This query returns Users Metadata, limit is set to 2 so that only two records get fetched. For retrieving the next page pass the value of next_offset from the response in the offset of the second query.
First query
Copiedquery {
Meta {
Users(limit: 2) {
_data {
id
zuid
country
city
}
_info {
next_offset
previous_offset
more_records
}
}
}
}
Response
Copied{
"data": {
"Meta": {
"Users": {
"_data": [
{
"id": "5843104000000424001",
"zuid": "818608778",
"country": "US",
"city": null
},
{
"id": "5843104000000424672",
"zuid": "818607910",
"country": null,
"city": null
}
],
"_info": {
"next_offset": "93f4972bd2f324cda6936b8cecf83ad2e0125599606c6f433d89225679c33bfa954901363a012167d430aaf25e7fff5454e5a7671540981f6dab0dffab35a0f643e5456dca960c4490cc4f7d72360c5bd59943821df63f21baae81ed40351cd7",
"previous_offset": null,
"more_records": true
}
}
}
}
}
Second query : offset obtained from the response of the first query is used here to get the next set.
Copiedquery {
Meta {
Users(
limit: 10
offset: "93f4972bd2f324cda6936b8cecf83ad2e0125599606c6f433d89225679c33bfa954901363a012167d430aaf25e7fff5454e5a7671540981f6dab0dffab35a0f643e5456dca960c4490cc4f7d72360c5bd59943821df63f21baae81ed40351cd7"
) {
_data {
id
zuid
country
city
}
_info {
next_offset
previous_offset
more_records
}
}
}
}
Response
Copied{
"data": {
"Meta": {
"Users": {
"_data": [
{
"id": "5843104000000424686",
"zuid": "818612175",
"country": null,
"city": null
},
{
"id": "5843104000000424696",
"zuid": "818617096",
"country": null,
"city": null
},
{
"id": "5843104000000424707",
"zuid": null,
"country": null,
"city": null
},
{
"id": "5843104000000424718",
"zuid": "818616680",
"country": null,
"city": null
},
{
"id": "5843104000000424729",
"zuid": "818617005",
"country": null,
"city": null
}
],
"_info": {
"next_offset": null,
"previous_offset": "f2b2330cb56a8a860bbc399703235a75bf6703e1489ad32fffca4e40f9e697156918e8541586b80b120b2f652d9885e93553234cf2ec65f03a5d28098d2c9027ab16030be1aa47cc04f6a2f2f269c43f82c6300aaa5638d6cbd2364747aecb17",
"more_records": false
}
}
}
}
}
Querying CustomViews Metadata using limit and offset
This query returns CustomViews Metadata, limit is set to 10 so that only ten records get fetched. For retrieving the next page pass the value of next_offset from the response in the offset of the second query.
Copiedquery Meta {
Meta {
Modules(filter: { api_name: "Leads" }) {
_data {
api_name
id
custom_view(limit: 10) {
_data {
id
api_name
display_value
access_type
system_name
default
modified_time
name
system_defined
category
last_accessed_time
favorite
locked
}
_info {
next_offset
previous_offset
more_records
}
}
}
}
}
}
Response
Copied{
"data": {
"Meta": {
"Modules": {
"_data": [
{
"api_name": "Leads",
"id": "5843104000000002175",
"custom_view": {
"_data": [
{
"id": "5843104000000425031",
"api_name": "All_Locked_Leads__s",
"display_value": "All Locked Leads",
"access_type": "public",
"system_name": "ALLLOCKEDLEADS",
"default": false,
"modified_time": null,
"name": "All Locked Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000087501",
"api_name": "All_Open_Leads",
"display_value": "All Leads",
"access_type": "public",
"system_name": "ALLVIEWS",
"default": false,
"modified_time": "2023-12-01T14:46:06+05:30",
"name": "All Open Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": "2024-01-25T18:37:06+05:30",
"favorite": null,
"locked": false
},
{
"id": "5843104000000089005",
"api_name": "Converted_Leads",
"display_value": "Converted Leads",
"access_type": "public",
"system_name": "CONVERTEDVIEWS",
"default": false,
"modified_time": null,
"name": "Converted Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000149020",
"api_name": "Junk_Leads",
"display_value": "Junk Leads",
"access_type": "public",
"system_name": "JUNKLEADVIEWS",
"default": false,
"modified_time": null,
"name": "Junk Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000087503",
"api_name": "Mailing_Labels",
"display_value": "Mailing Labels",
"access_type": "public",
"system_name": "ALLVIEWS",
"default": false,
"modified_time": null,
"name": "Mailing Labels",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000691003",
"api_name": "Untitled_View",
"display_value": "MView",
"access_type": "only_to_me",
"system_name": null,
"default": true,
"modified_time": "2023-08-11T10:51:05+05:30",
"name": "MView",
"system_defined": false,
"category": "created_by_me",
"last_accessed_time": "2024-02-17T13:54:22+05:30",
"favorite": null,
"locked": false
},
{
"id": "5843104000000089007",
"api_name": "My_Converted_Leads",
"display_value": "My Converted Leads",
"access_type": "public",
"system_name": "MYCONVERTEDVIEWS",
"default": false,
"modified_time": null,
"name": "My Converted Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000087563",
"api_name": "My_Leads",
"display_value": "My Leads",
"access_type": "public",
"system_name": "MYVIEWS",
"default": false,
"modified_time": null,
"name": "My Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000149031",
"api_name": "Not_Qualified_Leads",
"display_value": "Not Qualified Leads",
"access_type": "public",
"system_name": "NOTQUALIFIEDLEADVIEWS",
"default": false,
"modified_time": null,
"name": "Not Qualified Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000149042",
"api_name": "Open_Leads",
"display_value": "Open Leads",
"access_type": "public",
"system_name": "OPENLEADVIEWS",
"default": false,
"modified_time": null,
"name": "Open Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
}
],
"_info": {
"next_offset": "77c89a8fa8c5ee432ba3dcca07891a4afd9c4570f74bef8dc18554736167a51a7ffd63cd697c6a889acd3e3cec3bcdb2b8abe8f7b3b961759fa3a278d9ed6cb7298ef92259d1981f90e2fe59fc9d16fd7bd4c57f8671ebfdd480139ffb816653dc97b6b9e5c7d46a8041e9de8a5865fc1ea8725a29f8aca180d6956b246f3ea8f9ca20d1b38b8a29e00e93a0f4d9acfa",
"previous_offset": null,
"more_records": true
}
}
}
]
}
}
}
}
Second query : offset obtained from the response of the first query is used here to get the next set.
Copiedquery Meta {
Meta {
Modules(filter: { api_name: "Leads" }) {
_data {
api_name
id
custom_view(
limit: 10
offset: "77c89a8fa8c5ee432ba3dcca07891a4afd9c4570f74bef8dc18554736167a51a7ffd63cd697c6a889acd3e3cec3bcdb2b8abe8f7b3b961759fa3a278d9ed6cb7298ef92259d1981f90e2fe59fc9d16fd7bd4c57f8671ebfdd480139ffb816653dc97b6b9e5c7d46a8041e9de8a5865fc1ea8725a29f8aca180d6956b246f3ea8f9ca20d1b38b8a29e00e93a0f4d9acfa"
) {
_data {
id
api_name
display_value
access_type
system_name
default
modified_time
name
system_defined
category
last_accessed_time
favorite
locked
}
_info {
next_offset
previous_offset
more_records
}
}
}
}
}
}
Response
Copied{
"data": {
"Meta": {
"Modules": {
"_data": [
{
"api_name": "Leads",
"id": "5843104000000002175",
"custom_view": {
"_data": [
{
"id": "5843104000000149042",
"api_name": "Open_Leads",
"display_value": "Open Leads",
"access_type": "public",
"system_name": "OPENLEADVIEWS",
"default": false,
"modified_time": null,
"name": "Open Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000087509",
"api_name": "Recently_Created_Leads",
"display_value": "Recently Created Leads",
"access_type": "public",
"system_name": "RECENTLYCREATED",
"default": false,
"modified_time": null,
"name": "Recently Created Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000087511",
"api_name": "Recently_Modified_Leads",
"display_value": "Recently Modified Leads",
"access_type": "public",
"system_name": "RECENTLYMODIFIED",
"default": false,
"modified_time": null,
"name": "Recently Modified Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000087507",
"api_name": "Todays_Leads",
"display_value": "Today's Leads",
"access_type": "public",
"system_name": "today",
"default": false,
"modified_time": null,
"name": "Todays Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000087505",
"api_name": "Unread_Leads",
"display_value": "Unread Leads",
"access_type": "public",
"system_name": "UNREADVIEWS",
"default": false,
"modified_time": null,
"name": "Unread Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
},
{
"id": "5843104000000283003",
"api_name": "Unsubscribed_Leads",
"display_value": "Unsubscribed Leads",
"access_type": "public",
"system_name": "UNSUBSCRIBED",
"default": false,
"modified_time": null,
"name": "Unsubscribed Leads",
"system_defined": true,
"category": "public_views",
"last_accessed_time": null,
"favorite": null,
"locked": false
}
],
"_info": {
"next_offset": null,
"previous_offset": "293f9ac6e3a9d7ff7dbb0c6fa1e260bfacdd3e1a20e428b9076e1d4026745e7d3d81f1c372a8acf5018a9058c8e6f13d33d0793938ab44ad37808439df16dd78b18e158485ce13147e5fbeffbf39ae0c3c464a5944418bee9b085fece4934295e7beda586fe805e44ad49527d6c6cc3251131bd2c5e9bc467b762d0a0fbdf874ce95d128893ce930562ba38e6c12c44d",
"more_records": false
}
}
}
]
}
}
}
}