Skip to main content

Count the records that hold each value of a List Manager list.

GET/api/v1/list-value-usagelookup_lists:read

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.

Scopelookup_lists:read
AsynchronousNo
MCP toollist_list_value_usage
Pagingsnapshot
Default ordervalue
Sort fieldsvalue, count

Parameters​

NameInTypeRequiredDescription
listquerystringRequiredThe 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.
limitqueryintegerOptionalDefault: 50; ≥ 1
cursorquerystringOptional
sortquerystringOptionalComma-separated sort fields, - for descending.
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json object
304Not modified (If-None-Match matched the ETag).
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
410cursor_expiredapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422invalid_cursor, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

200 body​

FieldTypeRequiredDescription
itemsarray of ListValueUsageRequired
next_cursorstring or nullRequired
warningsarray of objectRequired

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

ListValueUsage​

FieldTypeRequiredDescription
countintegerRequiredHow 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
holdersstringRequiredWhat 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.
valuestring or nullRequiredThe 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.