Wikidata:REST API/pt-br

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Wikidata:REST API and the translation is 29% complete.
Outdated translations are marked like this.

Visão geral

A API REST da Wikibase é uma interface baseada em w:OpenAPI que permite aos usuários interagir, recuperar e editar itens e declarações nas instâncias da Wikibase -- incluindo, é claro, o Wikidata. Para mais informações, veja REST (arquitetura de software para a criação de serviços-Web).

Como usar a API

A API REST da Wikibase para Wikidata pode ser acessada usando a URL base https://wikidata.org/w/rest.php/wikibase/v0

  1. Configure autenticação.
  2. Consulte a documentação do OpenAPI Swagger para obter instruções específicas sobre cada função.

Você também pode dar uma olhada na documentação do desenvolvedor Wikibase.

A API REST do Wikibase não é coberta pela [[Special:MyLanguage/Wikidata:Stable Interface Policy|Política de Interface Estável do Wikidata]

Functionality

You'll find all the calls in our new REST API, including examples, in our OpenAPI Swagger documentation.

We're constantly working on improving and adding functionality to the API; check back often to see what we've added since your last visit. A API REST da Wikibase ainda está em desenvolvimento e será expandida com base em seu feedback.

Error messages

A API REST do Wikibase lança mensagens informativas quando há erros. Estes são documentados para cada solicitação em detalhes na documentação OpenAPI, por código de erro HTTP, em uma seção denominada "Respostas".

Um usuário interagindo com a API e tendo definido o bot flag que recebe um erro 403 (rest-write-denied) provavelmente não possui o bot user right. Veja este tíquete do Phabricator para mais info.

Rate limits

Assim como qualquer API pública, a API REST da Wikibase para Wikidata tem certos limites para evitar uso indevido e abuso.

Como a API REST da Wikibase usa as mesmas classes subjacentes da Action API, a limitação de taxa ocorre de acordo com as mesmas regras e usando a mesma configuração, $wgRateLimits . Consulte a documentação de limitação de taxa da Action API para obter mais detalhes.

Why should I use the Wikibase REST API?

Our new REST API is tailored to the Wikibase data model, and it solves a number of existing issues that are easier to solve with REST.

  • For item data, the REST API uses statements instead of claims.
  • Cleaner, flatter structure in response data.
  • A number of improvements in how statement data and metadata are presented.
  • For some examples of issues solved by REST, browse through the REST API workboard on Phabricator.

The REST API conforms to modern industry standards, as opposed to the Wikibase calls in the Action API. Developers familiar with REST APIs will find the Wikibase REST API much easier to use.

Versioning! Instead of shoehorning the Wikibase calls into the forever-v1 Action API, the WB REST API changes using versioned URLs, so functionality stays stable.

Check out our comparison of old and new functionality to get a feel for the contrast between the old and new APIs.

Libraries

  • Wikidatum, uma gem Ruby de terceiros, está disponível para interagir com a API REST da Wikibase.
  • wikibase-patcher, a minimum Wikibase REST API implementation in Python.
  • wikibase-rest-api-client, Wikibase REST API client on pypi generated from the OpenApi Spec

Veja também