WMDE-leszek added a comment.

  Thanks for the report @connorshea. We'll have a detailed look on possible 
bugs there. Error reporting is something we'll be gradually improving. Same 
goes for more example on how to use the REST API with various properties. Stay 
tuned.
  I have just made a successful POST statement creation requests using the 
following request JSON "bodies" (even simpler payloads, in case you were 
looking for interim examples)
  
  quantity
  
    {
        "statement": {
                "type": "statement",
                "mainsnak": {
                        "snaktype": "value",
                        "property": "P937",
                        "datavalue": {
                                "value": {
                                        "amount": "420",
                                        "unit": "1"
                                },
                                "type": "quantity"
                        }
                }
        }
    }
  
  time
  I think I can confirm the `rest-write-denied` on Beta Wikidata with a valid 
request "payload".  Seems to be a similar issue happening with the Action API 
on Beta (e.g. when trying to add a time statement via item page UI) and somehow 
related to the Abuse Filter configuration there? We'll look into it.
  The following payload does add an expected statement on a Wikibase instance I 
run locally, which does not have Beta's config.
  
    {
        "statement": {
                "type": "statement",
                "mainsnak": {
                        "snaktype": "value",
                        "property": "P476",
                        "datavalue": {
                                "value": {
                                        "calendarmodel": 
"http://www.wikidata.org/entity/Q1985727";,
                                        "precision": 11,
                                        "time": "+2022-08-22T00:00:00Z",
                                        "timezone": 0,
                                        "after": 0,
                                        "before": 0
                                },
                                "type": "time"
                        }
                }
        }
    }
  
  coordinate property
  Similar issue with the abusefilter or some other misconfiguration for Beta 
Wikidata.
  The valid payload looks of the following kind (works on other Wikibase 
instance than Beta wikidata)
  
    {
        "statement": {
                "type": "statement",
                "mainsnak": {
                        "snaktype": "value",
                        "property": "P477",
                        "datavalue": {
                                "value": {
                                        "latitude": 52.25,
                                        "longitude": 15.533333333333333,
                                        "globe": 
"http://www.wikidata.org/entity/Q2";,
                                        "precision": 0.016666666666666666
                                },
                                "type": "globecoordinate"
                        }
                }
        }
    }
  
  We'll look into further combinations and less "obvious" cases still to verify 
whether there are some bugs.

TASK DETAIL
  https://phabricator.wikimedia.org/T315158

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: WMDE-leszek
Cc: WMDE-leszek, Addshore, Ollie.Shotton_WMDE, connorshea, Aklapper, 
Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, 
Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, 
rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to