MediaWiki API súgó
Ez egy automatikusan generált MediaWiki API-dokumentációs lap.
Dokumentáció és példák: https://www.mediawiki.org/wiki/API
action=wbsetreference
- Ez a modul olvasási jogot igényel.
- Ez a modul írási jogot igényel.
- Ez a modul csak POST kéréseket fogad el.
- Forrás: WikibaseClient
- Licenc: GPL-2.0-or-later
Creates a reference or sets the value of an existing one.
- statement
A GUID identifying the statement for which a reference is being set
- Ez a paraméter kötelező.
- snaks
The snaks to set the reference to. JSON object with property IDs pointing to arrays containing the snaks for that property
- Ez a paraméter kötelező.
- snaks-order
The order of the snaks. JSON array of property ID strings
- reference
A hash of the reference that should be updated. Optional. When not provided, a new reference is created
- index
The index within the statement's list of references where to move the reference to. Optional. When not provided, an existing reference will stay in place while a new reference will be appended.
- Típus: egész
- summary
A szerkesztési összefoglaló. Elé kerül egy automatikusan generált megjegyzés. Az automatikus megjegyzés és az összefoglaló együttes hossza legfeljebb 260 bájt (az ékezetes karakterek két bájtot foglalnak el). A limitet túllépő összefoglaló vége le lesz vágva.
- token
A "csrf" token retrieved from action=query&meta=tokens
- Ez a paraméter kötelező.
- baserevid
A módosítás alapjául szolgáló lapváltozat azonosítója (oldid-je). A szerkesztési ütközések felismerésére szolgál.
- Típus: egész
- bot
A szerkesztés botszerkesztésnek jelölése. Csak akkor van hatása, ha a felhasználó tagja a „botok” csoportnak.
- Típus: logikai (részletek)
- Create a new reference for claim with GUID Q76$D4FDE516-F20C-4154-ADCE-7C5B609DFDFF
- api.php?action=wbsetreference&statement=Q76$D4FDE516-F20C-4154-ADCE-7C5B609DFDFF&snaks={"P212":[{"snaktype":"value","property":"P212","datavalue":{"type":"string","value":"foo"}}]}&baserevid=7201010&token=foobar [open in sandbox]
- Set reference for claim with GUID Q76$D4FDE516-F20C-4154-ADCE-7C5B609DFDFF which has hash of 1eb8793c002b1d9820c833d234a1b54c8e94187e
- api.php?action=wbsetreference&statement=Q76$D4FDE516-F20C-4154-ADCE-7C5B609DFDFF&reference=1eb8793c002b1d9820c833d234a1b54c8e94187e&snaks={"P212":[{"snaktype":"value","property":"P212","datavalue":{"type":"string","value":"bar"}}]}&baserevid=7201010&token=foobar [open in sandbox]
- Creates a new reference for the claim with GUID Q76$D4FDE516-F20C-4154-ADCE-7C5B609DFDFF and inserts the new reference at the top of the list of references instead of appending it to the bottom.
- api.php?action=wbsetreference&statement=Q76$D4FDE516-F20C-4154-ADCE-7C5B609DFDFF&snaks={"P212":[{"snaktype":"novalue","property":"P212"}]}&index=0&baserevid=7201010&token=foobar [open in sandbox]