creating german api faq

New page

{{API Intro/de}}

{{Draft/de}}

Lesen Sie auch die [[API:Main_page/de|Kurzanleitung]]. Sie beantwortet ein paar Fragen, die hier nicht beantwortet werden und verweist auf andere nützliche Seiten.

==Wie kann ich...==

===Hilfe bekommen?===

# Lesen Sie diese FAQ

# Try to find the answer to your question in the [[API|API documentation here]] or on the [http://en.wikipedia.org/w/api.phpself-documenting API home page]

# If you can't find the answer to your question on the web, you can ask your question on the[https://lists.wikimedia.org/mailman/listinfo/mediawiki-api mediawiki-api mailing list].

===einen Fehler (Bug) oder ein Merkmal (Feature) einreichen?===

If you have found a bug in the API or have a feature request, you can report it on [https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki&component=API Bugzilla]. Be sure to [https://bugzilla.wikimedia.org/query.cgi?format=advanced&product=MediaWiki&component=API search for existing bugs] first (please don't file duplicate bugs) and choose "MediaWiki" for product and "API" for component when reporting a new bug against the API. If the functionality you're requesting or reporting a bug against is offered by an extension (e.g. AbuseFilter, FlaggedRevs), file it in that extension's component in the "MediaWiki extensions" product.

===die API aufrufen?===

The API is called by sending HTTP requests to api.php. For example, on the English Wikipedia, the URL ishttp://en.wikipedia.org/w/api.php ; other wikis have api.php with similar URLs: just use api.php where the usual URL has index.php. If you're trying to access the API on a third-party (non-Wikimedia-operated) wiki and can't figure out the URL of api.php, contact the wiki's owner.

From 1.17 onwards, MediaWiki supports [[w:Really Simple Discovery|RSD]]. An RSD marker is present on every page pointing to an RSD descriptor which indicates where to find the API.

===das Ausgabeformat kontrollieren ?===

Pass <code>&format=someformat</code> in the query string. See the [[API:Data formats#Output|list of output formats]] for more information.

===Fehler entdecken?===

An error response from the API will set the <code>MediaWiki-API-Error</code> HTTP header and return an <code><nowiki><error></nowiki></code>. For an example error response, see http://en.wikipedia.org/w/api.php?action=blah . See also the documentation about[[API:Errors and warnings|errors and warnings]].

===den Inhalt einer Seite erhalten (Wikitext)?===

If you just want the raw wikitext without any other information whatsoever, it's best to use index.php's action=raw mode instead of the API: http://en.wikipedia.org/w/index.php?action=raw&title=Main_Page . Note that this'll just output plain wikitext without any formatting. See also the [[Manual:Parameters to index.php#Raw|action=raw documentation]]

To get more information about the page and its latest version, use the API: http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Main_Page . See also the documentation for the [[API:Query - Properties#revisions / rv|prop=revisions]] module.

You can retrieve 50 pages per API request: http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&titles=Main_Page|Articles This also works with generators.

===den Inhalt einer Seite erhalten (HTML)?===

If you just want the HTML, it's best to use index.php's action=render mode instead of the API: http://en.wikipedia.org/w/index.php?action=render&title=Main_Page . See also the [[Manual:Parameters to index.php#View and render|action=render documentation]].

To get more information distilled from the wikitext at parse time (links, categories, sections, etc.), use the API parse module:http://en.wikipedia.org/w/api.php?action=parse&page=Main_Page . See also the documentation for the [[API:Parsing wikitext#parse|action=parse]] module.

==Warum...==

===bekomme ich HTTP 403 Fehler?===

This could mean you're not passing a <code>User-Agent</code> HTTP header or that your <code>User-Agent</code> is empty or blacklisted[[m:User-Agent policy]]. See [[API:Quick start guide#Identifying your client|the quick start guide]] for more information. Also, it could mean that you're passing <code>&amp;</code> in the query string of a GET request: Wikimedia blocks all such requests, use POST for them instead.

===bekomme ich den Lese-API-Verweigerungs-Fehler? (readapidenied error)===

The wiki you're querying contains private content and requires users to log in in order to be able to read all pages. This means that a client needs to be logged in to query any information at all through the API. See [[API:Quick start guide#Logging in|the quick start guide]] for more information. It's not currently possible to query the contents of whitelisted pages without logging in, even though they're available in the regular user interface.

===bekomme ich schlechte Token-Fehler?===

This is usually because you're either not passing a token at all (read about tokens in the documentation of the module you're using) or because you're having [[API:Login|trouble staying logged in]]. It's also possible you're reusing a type of token that can't be reused (see module documentation for details) or that you're using a token that's associated with an expired session. In general, when using cached tokens, refetch the token and try again before giving up.

===bekomme ich Warnungen anstelle von Tokens (Aktion 'Bearbeiten' ist nicht für den aktuellen Benutzer erlaubt)? ===

You either don't have the right to execute the action you requested, or you're having [[API:Login#Staying logged in|trouble staying logged in]].

===steht X nicht über die API zur Verfügung?===

Not all features available in the user interface are available through the API. Such features weren't implemented either because no one has gotten around to it yet or because no one has requested them. For information about filing feature requests, see [[#file a bug or a feature request?|above]].

===gibt mein API-Aufruf auf Wikimedia Wikis nur ein HTML-Fehler zurück?===

If you use API calls with POST requests make sure that these requests don't use ''Content-Type: multipart/form-data''. This happens for instance if you use CURL to access the API and you pass your POST parameters as an array. The Squid proxy servers which are used at frontend servers at the Wikimedia wiki farm don't handle that correctly, thus an error is returned.

Instead, use the "value1=key1&value2=key2..." notation to pass the parameters as a string, similar to GET requests.

On other wikis which you access directly it doesn't make a difference.

{{languages}}

Show more