Skip to content

mw wiki ext wikibase property statement update

Releasev0.35.0 · cfeceb67

mw wiki ext wikibase property statement update ID STATEMENT_ID [PROPERTY] [flags]

Read the entity revision before editing one statement. Use update ID STATEMENT_ID –rank preferred for a rank-only edit preserving all other native fields. Scalar edits preserve existing qualifiers/references and rank; –input supplies a complete native statement replacement. Statement IDs are opaque and checked against this entity. Supported typed datatypes are listed under –datatype; –raw-json with –input skips datatype-specific validation for other native types. Property/datatype compatibility is finally checked by the wiki. Dry-run reads state but fetches no CSRF token and writes nothing. Failed writes are never retried automatically.

--baserevid <int>
Expected revision for an existing entity (default: read current revision before editing)
--bot
Mark the edit as a bot edit
--datatype <string>
Typed datatype: string, external-id, url, commonsMedia, wikibase-item, wikibase-property, monolingualtext, quantity, time, globe-coordinate
--dry-run
Show the proposed edit without fetching a CSRF token or writing
--format <string>
Format the specified output
--input <string>
Complete native statement JSON file, or - for stdin
-o, --output <string>
Output format (jq|json) Default: json.
--rank <string>
Statement rank: normal, preferred or deprecated (default: normal for add; preserve for typed update)
--raw
Print response bytes unchanged
--raw-json
Allow native JSON datatypes outside the typed subset (does not bypass revision/ownership checks)
--snaktype <string>
Snak type: value, somevalue or novalue Default: value.
--summary <string>
Edit summary Default: a Wikimedia CLI: update Wikibase entity.
--value <string>
Scalar string/entity-id/quantity value
--value-json <string>
Native datavalue.value JSON file, or - for stdin (complex typed values)
--anon
Use anonymous access instead of saved credentials
--help
Help for this command
--no-interaction
Do not ask any interactive questions
--password <string>
Wiki login password (or bot password)
--password-file <string>
Read the login password from a file
--profile <string>
Saved profile name or REALM/NAME
--realm <string>
Shared-login realm (wikimedia and wikibase-world are built in)
--username <string>
Wiki login username (use Name@bot for a bot password)
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
--wiki <string>
Wiki URL or API endpoint
Terminal window
mw wiki ext wikibase property statement update P31 STATEMENT_ID P31 --datatype wikibase-item --value Q5 --dry-run
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.