Record Count
GET {{_endpoint}}/services/data/v{{version}}/limits/recordCount?sObjects=Account,Contact,Lead
Lists information about object record counts in your organization. This resource is available in REST API version 40.0 and later for API users with the “View Setup and Configuration” permission. The returned record count is approximate, and does not include the following types of records:
Deleted records in the recycle bin. Archived records. https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_record_count.htm
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
sObjects | string | A comma-delimited list of object names. If a listed object is not found in the org, it is ignored and not returned in the response. | |
This parameter is optional. If this parameter is not provided, the resource returns record counts for all objects in the org. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"sObjects":[{"count":12,"name":"Account"},{"count":20,"name":"Contact"},{"count":22,"name":"Lead"}]}