| This page is part of theMediaWiki REST API documentation. |
| MediaWiki REST API |
|---|
Documentation Tutorials See also
|
| v · d · e |
The REST API usesHTTP status codes to indicate the success or failure of a request.A successful request returns a status code in the 200 range; a failed request returns a status code in the 400 or 500 range.
See theAPI reference for status codes specific to each endpoint.
| 200 | Resource found or updated |
|---|---|
| 201 | Resource created |
| 400 | Invalid or missing parameter |
| 403 | Permission denied |
| 404 | Route not found |
| 412 | Invalid conditional request |
| 415 | Unsupported content type |
| 500 | Server error |
4xx and 5xx responses include a JSON response object with information about the error.Here's an example of a 404 error response.
{"messageTranslations":{"en":"The specified title (...) does not exist"},"httpCode":404,"httpReason":"Not Found"}
httpCoderequired | integer | Status code |
httpReasonrequired | string | Status message |
messageTranslationsoptional | object | Object containing error messages as key-value pairs where the key is thelanguage code and the value is the error message. Most endpoints return error messages using this property. |
messageoptional | string | In cases wheremessageTranslations is not available, this property provides an error message in English |
content_typeoptional | string | In the event of an error due to an unsupported content type, this property indicates the requested content type |
actionModuleErrorCodeoptional | string | Internal error code |