Wikidata/Berlin summit 2012/API overview

Short walktrough of background and limitations, present structure, known problems (cross domain requests, session failures)

Slides: http://commons.wikimedia.org/wiki/File:Wikidata_API_-_Berlin_Hackathon.pdf

J.E.B. background and limitations

  • API supports wikibase extension, UI but no bots
  • no real alternative to existing query / generator modules
  • not made for large bulk uploads, but *could* be done

Present structure

  • each core functionality has it's own modules (e.g. build items, get item IDs, get site links, update link / description etc.)

Known problems

  • call methods are inconsistent -> leads to confusion
  • large result sets (very many "sites" and "languages")
  • rights unavailable before saving
  • tokens do not use salting by page ID
  • errors due to non-normalized db
  • messages: still a mixture of English and localized messages

Cross domain requests (write)

  • browsers are connected to different sites in- and outside of WM
  • scripts: additional security needed
  • Document.domain works within WM
  • CORS still lacks support
  • trusted proxy in clients with forwarding of user credentials will work

Problem: keeping user logged in doesn't always work

  • user get logged out, they don't reload the page, API keeps using invalid token
  • user then gets error messages
  • solution?