Describe entities
Use this REST resource to describe a list of entities. Provide a list of entity names or IDs in your request data and use GET HTTP method to get the metadata of the entities requested.
curl GET 'https://{domain}/api/3.0/entity/metadata?entities={entity_names}'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
Request
entity_names string Required
A comma-separated list of entity names or IDs to get their metadata. This parameter should be URL encoded.
Note: The response may vary based on the permission of the requesting user. If a user does not have access to an entity or some of its fields, that information will not appear in the response.
Example
curl GET 'https://{domain}/api/3.0/entity/metadata?entities=Account%2CContact'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
Successful Response
HTTP 200 OK
[
{
"Id": "7NS0000000000bg0001",
"Name": "Account",
"Label": "Account",
"PluralLabel": "Accounts",
"StartsWithVowel": false,
"KeyPrefix": "002",
"DbSchema": "standard",
"EntityType": "Object",
"TrackFeeds": true,
"AllowReports": true,
"TrackActivities": true,
"Triggerable": true,
"Automationable": true,
"IsHidden": false,
"IsCustom": true,
"IsPermissionable": true,
"Fields": [ ... ],
"Relationships": [ ... ]
},
{
"Id": "7NS0000000000bf0001",
"Name": "Contact",
"Label": "Contact",
"PluralLabel": "Contacts",
"StartsWithVowel": false,
"KeyPrefix": "001",
"DbSchema": "standard",
"EntityType": "Person",
"TrackFeeds": true,
"AllowReports": true,
"TrackActivities": true,
"Triggerable": true,
"Automationable": true,
"IsHidden": false,
"IsCustom": true,
"IsPermissionable": true,
"Fields": [ ... ],
"Relationships": [ ... ]
}
]
Metadata provided for fields:
{
"Id": "7NX0000000001P50001",
"Name": "SupportType",
"Label": "SLA Level",
"FieldType": "Picklist",
"IsKey": false,
"IsSearchable": false,
"IsReadable": true,
"IsReference": false,
"IsAuditField": false,
"IsReadOnly": false,
"IsRequired": false,
"IsExternalId": false,
"IsCalculated": false,
"IsNameField": false,
"IsSystemField": false,
"IsCustomField": true,
"ReferenceType": "None",
"IsFilterable": true,
"IsAuditable": false,
"IsAudited": false,
"IsSortable": true,
"IsUnique": false,
"IsHtml": false,
"Length": 0,
"Precision": 0,
"IsMapped": true,
"TimeDisplayOption": "Minutes",
"IsDepedentPicklist": false,
"PicklistEntries":[
{
"Id": "7O00000000001P00001",
"IsDefaultValue": true,
"Label": "Standard",
"Value": "Standard",
"IsDecision": false,
"IsDecision2": false
},
{
"Id": "7O00000000001P10001",
"IsDefaultValue": false,
"Label": "Premium",
"Value": "Premium",
"IsDecision": false,
"IsDecision2": false
}
],
"DependentPicklists": {},
"Validations":[]
}
Relationships Metadata Field
[
{
"Name": "Owner",
"Entity": "Person",
"ReferenceField": "OwnerId"
},
{
"Name": "ParentId",
"Entity": "Account",
"ReferenceField": "Parent"
},
{
"Name": "CreatedBy",
"Entity": "Person",
"ReferenceField": "CreatedById"
},
{
"Name": "ModifiedBy",
"Entity": "Person",
"ReferenceField": "ModifiedById"
}
]
Failed Response
HTTP 400 - Bad Request
{
"message": "entity names are missing.",
"success": false
}