Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

API:REST API/Status codes

From mediawiki.org
<API:REST API
This page is part of theMediaWiki REST API documentation.
MediaWiki REST API

Documentation

Tutorials

See also

  • CORS (Action and REST APIs)
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.

Status codes

[edit]

See theAPI reference for status codes specific to each endpoint.

200Resource found or updated
201Resource created
400Invalid or missing parameter
403Permission denied
404Route not found
412Invalid conditional request
415Unsupported content type
500Server error

Error responses

[edit]

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"}

Error response schema

[edit]
httpCode

required | integer

Status code
httpReason

required | string

Status message
messageTranslations

optional | 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.
message

optional | string

In cases wheremessageTranslations is not available, this property provides an error message in English
content_type

optional | string

In the event of an error due to an unsupported content type, this property indicates the requested content type
actionModuleErrorCode

optional | string

Internal error code
Retrieved from "https://www.mediawiki.org/w/index.php?title=API:REST_API/Status_codes&oldid=7099453"

[8]ページ先頭

©2009-2025 Movatter.jp