MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=wbcheckconstraints
- This module requires read rights.
- Source: WikibaseQualityConstraints
- License: GPL-2.0-or-later
Performs constraint checks on any entity you want and returns the result.
- id
ID list of the entities to get the data from. Separate values with '|' or alternative.
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- claimid
GUID list identifying a claim to check a constraint report. Separate values with '|'.
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- constraintid
Optional filter to return only the constraints that have the specified constraint ID.
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- status
Optional filter to return only check results with the selected statuses.
Note that only results for the 'violation', 'warning', 'suggestion' and 'bad-parameters' statuses are cached, so requests that select any statuses beyond those four do not benefit from caching.
- compliance
- The statement satisfies the constraint.
- violation
- The statement violates the constraint.
- warning
- The statement violates the constraint, but the constraint is not mandatory.
- suggestion
- The statement violates the constraint, but the constraint is just a suggestion.
- exception
- The subject entity of the statement is a known exception to the constraint.
- not-in-scope
- The constraint is not checked on this kind of snak (main snak, qualifier or reference), so the constraint check is skipped.
- deprecated
- The constraint has not been checked because the statement is deprecated.
- bad-parameters
- The constraint parameters are broken.
- todo
- The constraint is not implemented.
- Values (separate with | or alternative): bad-parameters, compliance, deprecated, exception, not-in-scope, suggestion, todo, violation, warning
- To specify all values, use *.
- Default: violation|warning|suggestion|bad-parameters
- Check all constraints on the items Q5 and Q42.
- api.php?action=wbcheckconstraints&id=Q5|Q42 [open in sandbox]
- Check all constraints on a single statement.
- api.php?action=wbcheckconstraints&claimid=q42%248419C20C-8EF8-4EC0-80D6-AF1CA55E7557 [open in sandbox]
- Check one particular constraint on the item Q2.
- api.php?action=wbcheckconstraints&format=json&id=Q2&constraintid=P1082%24DA39C2DA-47DA-48FB-8A9A-DA80200FB2DB [open in sandbox]