Count the records that hold each value of a List Manager list.
The List Manager's count column for one list (list, required: document_prefix, document_type, document_status, post_review_status, cross_reference_reason, contact, contact_designation, business_type, contact_category, contact_category_status, country, project_type, project_status): one row per value with how many records hold it, as the Portal counts them. Documents and projects are counted only if the caller can read them (through document security and project access, the records search_list_value_holders finds; the Portal's own screen counts every one), and an entry that no record holds appears, with a count of 0, only for document_type (types and sub types) and the contact lists. Needs the permissions the Portal asks for the list: View Document Metadata with the list's own View permission for a document list (View Document Prefixes, View Document Types, View Document Statuses, View Document Priority Statuses for post_review_status, View Cross Reference Reasons, or View Contacts for contact), View Contacts with View Contact Designations, View Business Types, View Contact Categories, View Contact Category Statuses or View Countries for a contact list, View Projects with View Project Types or View Project Statuses for a project list. A client matches a row to its entry by value, the text the records hold. Use it to see which entries are unused before delete_document_status and its siblings, and to see what a move-documents would touch.
| |
|---|
| Scope | lookup_lists:read |
| Asynchronous | No |
| MCP tool | list_list_value_usage |
| Paging | snapshot |
| Default order | value |
| Sort fields | value, count |
Parameters
| Name | In | Type | Required | Description |
|---|
list | query | string | Required | The list to count: document_prefix, document_type, document_status, post_review_status, cross_reference_reason, contact, contact_designation, business_type, contact_category, contact_category_status, country, project_type or project_status. |
limit | query | integer | Optional | Default: 50; ≥ 1 |
cursor | query | string | Optional | |
sort | query | string | Optional | Comma-separated sort fields, - for descending. |
Docwize-Version | header | string (date) | Optional | |
If-None-Match | header | string | Optional | Answers 304 when the representation is unchanged (resources that publish an ETag). |
Responses
200 body
| Field | Type | Required | Description |
|---|
items | array of ListValueUsage | Required | |
next_cursor | string or null | Required | |
warnings | array of object | Required | |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
ListValueUsage
| Field | Type | Required | Description |
|---|
count | integer | Required | How many records hold the value. For documents and projects this counts only the ones the caller can read (the Portal's own screen counts every record). For cross_reference_reason it is cross-reference links, and for document_type a type's own row counts only documents with no sub type. ≥ -2147483648; ≤ 2147483647 |
holders | string | Required | What count counts: documents, contacts or projects. A contact is a row of the Portal's contact table: an organisation's own row counts as one. |
value | string or null | Required | The text the records hold, as the Portal's List Manager keys it: the entry's name; for document_type a sub type reads 'Type > Sub type'; for contact 'Organisation > Contact' or 'Organisation'; for cross_reference_reason the reason's ID as text. null counts the records that hold no value. |