repo/rest-api/specs/global/responses.json
{
"StatementDeleted": {
"description": "The resource was deleted",
"headers": {
"Content-Language": {
"description": "Language code of the language in which response is provided",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "string"
},
"example": "Statement deleted"
}
}
},
"ItemRedirected": {
"description": "The specified Item was redirected",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"redirected-item": { "$ref": "./examples.json#/RedirectedItemExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": {
"type": "string"
},
"description": "Language code of the language in which error message is provided"
}
}
},
"DataPolicyViolation": {
"description": "The edit request violates data policy",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"data-policy-violation": { "$ref": "./examples.json#/DataPolicyViolationExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": {
"type": "string"
},
"description": "Language code of the language in which error message is provided"
}
}
},
"PermissionDenied": {
"description": "The access to resource was denied",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"permission-denied": { "$ref": "./examples.json#/PermissionDeniedExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": {
"type": "string"
},
"description": "Language code of the language in which error message is provided"
}
}
},
"RequestLimitReached": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"request-limit-reached": {
"value": {
"code": "request-limit-reached",
"message": "Exceeded the limit of actions that can be performed in a given span of time",
"context": { "reason": "{reason_code}" }
}
}
}
}
},
"headers": {
"Content-Language": {
"schema": {
"type": "string"
},
"description": "Language code of the language in which error message is provided"
}
}
},
"ResourceNotFound": {
"description": "The specified resource was not found",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"resource-not-found": {
"$ref": "./examples.json#/ResourceNotFoundExample"
}
}
}
},
"headers": {
"Content-Language": {
"schema": {
"type": "string"
},
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidEntityIdInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidRetrieveStatementsInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"invalid-query-parameter": { "$ref": "./examples.json#/InvalidQueryParameterExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidNewStatementInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"invalid-value": { "$ref": "./examples.json#/InvalidValueExample" },
"missing-field": { "$ref": "./examples.json#/MissingFieldExample" },
"value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" },
"resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" },
"referenced-resource-not-found": { "$ref": "./examples.json#/ReferencedResourceNotFoundExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidSetLabelInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" },
"invalid-value": { "$ref": "./examples.json#/InvalidValueExample" },
"missing-field": { "$ref": "./examples.json#/MissingFieldExample" },
"resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidSetDescriptionInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"invalid-value": { "$ref": "./examples.json#/InvalidValueExample" },
"missing-field": { "$ref": "./examples.json#/MissingFieldExample" },
"value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" },
"resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidRemoveLabelInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"invalid-value": { "$ref": "./examples.json#/InvalidValueExample" },
"value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidRemoveDescriptionInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"invalid-value": { "$ref": "./examples.json#/InvalidValueExample" },
"value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidAddAliasesInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"invalid-value": { "$ref": "./examples.json#/InvalidValueExample" },
"missing-field": { "$ref": "./examples.json#/MissingFieldExample" },
"value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" },
"resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidTermByLanguageInput": {
"description": "The request cannot be processed",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatch": {
"description": "The provided JSON Patch request is invalid",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" },
"invalid-value": { "$ref": "./examples.json#/InvalidValueExample" },
"missing-field": { "$ref": "./examples.json#/MissingFieldExample" },
"value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" },
"resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"CannotApplyItemPatch": {
"description": "The provided JSON Patch cannot be applied",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"redirected-item": { "$ref": "./examples.json#/RedirectedItemExample" },
"patch-test-failed": { "$ref": "./examples.json#/PatchTestFailedExample" },
"patch-target-not-found": { "$ref": "./examples.json#/PatchTargetNotFoundExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"CannotApplyPropertyPatch": {
"description": "The provided JSON Patch cannot be applied",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"patch-test-failed": { "$ref": "./examples.json#/PatchTestFailedExample" },
"patch-target-not-found": { "$ref": "./examples.json#/PatchTargetNotFoundExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatchedItem": {
"description": "Applying the provided JSON Patch results in an invalid Property",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"patch-result-invalid-value": { "$ref": "./examples.json#/PatchResultInvalidValueExample" },
"patched-statement-group-property-id-mismatch": {
"$ref": "./examples.json#/PatchedStatementGroupPropertyIdMismatchExample"
},
"patch-result-referenced-resource-not-found": { "$ref": "./examples.json#/PatchResultResourceNotFoundExample" },
"patch-result-missing-field": { "$ref": "./examples.json#/PatchResultMissingFieldExample" },
"patch-result-invalid-key": { "$ref": "./examples.json#/PatchResultInvalidKeyExample" },
"patch-result-value-too-long": { "$ref": "./examples.json#/PatchResultValueTooLongExample" },
"patch-result-modified-read-only-value": {
"$ref": "./examples.json#/PatchResultModifiedReadOnlyValue"
},
"data-policy-violation": { "$ref": "./examples.json#/DataPolicyViolationExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatchedProperty": {
"description": "Applying the provided JSON Patch results in an invalid Property",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"patch-result-missing-field": { "$ref": "./examples.json#/PatchResultMissingFieldExample" },
"patched-statement-group-property-id-mismatch": {
"$ref": "./examples.json#/PatchedStatementGroupPropertyIdMismatchExample"
},
"patch-result-invalid-key": { "$ref": "./examples.json#/PatchResultInvalidKeyExample" },
"patch-result-invalid-value": { "$ref": "./examples.json#/PatchResultInvalidValueExample" },
"patch-result-referenced-resource-not-found": { "$ref": "./examples.json#/PatchResultResourceNotFoundExample" },
"patch-result-value-too-long": { "$ref": "./examples.json#/PatchResultValueTooLongExample" },
"patch-result-modified-read-only-value": {
"$ref": "./examples.json#/PatchResultModifiedReadOnlyValue"
},
"data-policy-violation": { "$ref": "./examples.json#/DataPolicyViolationExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatchedLabels": {
"description": "Applying the provided JSON Patch results in invalid Labels",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"patch-result-invalid-key": { "$ref": "./examples.json#/PatchResultInvalidKeyExample" },
"patch-result-invalid-value": { "$ref": "./examples.json#/PatchResultInvalidValueExample" },
"patch-result-value-too-long": { "$ref": "./examples.json#/PatchResultValueTooLongExample" },
"data-policy-violation": { "$ref": "./examples.json#/DataPolicyViolationExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatchedDescriptions": {
"description": "Applying the provided JSON Patch results in invalid descriptions",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"patch-result-invalid-key": { "$ref": "./examples.json#/PatchResultInvalidKeyExample" },
"patch-result-invalid-value": { "$ref": "./examples.json#/PatchResultInvalidValueExample" },
"patch-result-value-too-long": { "$ref": "./examples.json#/PatchResultValueTooLongExample" },
"data-policy-violation": { "$ref": "./examples.json#/DataPolicyViolationExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatchedAliases": {
"description": "Applying the provided JSON Patch results in invalid Aliases",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"patch-result-invalid-value": { "$ref": "./examples.json#/PatchResultInvalidValueExample" },
"patch-result-invalid-key": { "$ref": "./examples.json#/PatchResultInvalidKeyExample" },
"patch-result-value-too-long": { "$ref": "./examples.json#/PatchResultValueTooLongExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"CannotApplyStatementPatch": {
"description": "The provided JSON Patch cannot be applied",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"examples": {
"patch-test-failed": { "$ref": "./examples.json#/PatchTestFailedExample" },
"patch-target-not-found": { "$ref": "./examples.json#/PatchTargetNotFoundExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatchedStatement": {
"description": "Applying the provided JSON Patch results in an invalid Statement",
"content": {
"application/json": {
"schema": {
"$ref": "./response-parts.json#/Error"
},
"examples": {
"patch-result-missing-field": { "$ref": "./examples.json#/PatchResultMissingFieldExample" },
"patch-result-invalid-value": { "$ref": "./examples.json#/PatchResultInvalidValueExample" },
"patch-result-modified-read-only-value": {
"$ref": "./examples.json#/PatchResultModifiedReadOnlyValue"
},
"patch-result-referenced-resource-not-found": { "$ref": "./examples.json#/PatchResultResourceNotFoundExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"PreconditionFailedError": {
"description": "The condition defined by a conditional request header is not fulfilled"
},
"UnexpectedError": {
"description": "An unexpected error has occurred",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/Error" },
"example": {
"code": "unexpected-error",
"message": "Unexpected Error"
}
}
},
"headers": {
"Content-Language": {
"schema": {
"type": "string"
},
"description": "Language code of the language in which error message is provided"
}
}
},
"Item": {
"description": "A single Wikibase Item",
"headers": {
"Last-Modified": {
"schema": {
"type": "string"
},
"description": "Last modified date"
},
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
},
"X-Authenticated-User": {
"schema": {
"type": "string"
},
"description": "Optional username of the user making the request"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "./response-parts.json#/ItemResponse"
},
"example": {
"id": "Q24",
"type": "item",
"labels": {
"en": "Jane Doe",
"ru": "Джейн Доу"
},
"descriptions": {
"en": "famous person",
"ru": "известная личность"
},
"aliases": {
"en": [
"Jane M. Doe",
"JD"
],
"ru": [
"Джейн М. Доу"
]
},
"statements": {
"P694": [
{
"id": "Q24$BB728546-A400-4116-A772-16D54B62AC2B",
"rank": "normal",
"qualifiers": [],
"references": [],
"property": {
"id": "P694",
"data_type": "wikibase-item"
},
"value": {
"type": "value",
"content": "Q626683"
}
}
],
"P476": [
{
"id": "Q24$F3B2F956-B6AB-4984-8D89-BEE0FFFA3385",
"rank": "normal",
"qualifiers": [],
"references": [],
"property": {
"id": "P476",
"data_type": "time"
},
"value": {
"type": "value",
"content": {
"time": "+1986-01-27T00:00:00Z",
"precision": 11,
"calendarmodel": "http://www.wikidata.org/entity/Q1985727"
}
}
}
],
"P17": [
{
"id": "Q24$9966A1CA-F3F5-4B1D-A534-7CD5953169DA",
"rank": "normal",
"qualifiers": [
{
"property": {
"id": "P706",
"data_type": "time"
},
"value": {
"type": "value",
"content": {
"time": "+2023-06-13T00:00:00Z",
"precision": 11,
"calendarmodel": "http://www.wikidata.org/entity/Q1985727"
}
}
}
],
"references": [
{
"hash": "7ccd777f870b71a4c5056c7fd2a83a22cc39be6d",
"parts": [
{
"property": {
"id": "P709",
"data_type": "url"
},
"value": {
"type": "value",
"content": "https://news.example.org"
}
}
]
}
],
"property": {
"id": "P17",
"data_type": "string"
},
"value": {
"type": "value",
"content": "Senior Team Supervisor"
}
}
]
},
"sitelinks": {
"enwiki": {
"title": "Jane Doe",
"badges": [],
"url": "https://enwiki.example.org/wiki/Jane_Doe"
},
"ruwiki": {
"title": "Джейн Доу",
"badges": [],
"url": "https://ruwiki.example.org/wiki/Джейн_Доу"
}
}
}
}
}
},
"Sitelinks": {
"description": "A list of Sitelinks by Item id",
"headers": {
"Last-Modified": {
"schema": {
"type": "string"
},
"description": "Last modified date"
},
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
},
"X-Authenticated-User": {
"schema": {
"type": "string"
},
"description": "Optional username of the user making the request"
}
},
"content": {
"application/json": {
"schema": { "$ref": "./schema-parts.json#/Sitelinks" },
"example": {
"sitelinks": {
"enwiki": {
"title": "Jane Doe",
"badges": [],
"url": "https://enwiki.example.org/wiki/Jane_Doe"
},
"ruwiki": {
"title": "Джейн Доу",
"badges": [],
"url": "https://ruwiki.example.org/wiki/Джейн_Доу"
}
}
}
}
}
},
"Sitelink": {
"description": "A Sitelink by Item id",
"headers": {
"Last-Modified": {
"schema": {
"type": "string"
},
"description": "Last modified date"
},
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
},
"X-Authenticated-User": {
"schema": {
"type": "string"
},
"description": "Optional username of the user making the request"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "./schemas.json#/Sitelink"
},
"example": {
"title": "Jane Doe",
"badges": [],
"url": "https://enwiki.example.org/wiki/Jane_Doe"
}
}
}
},
"Property": {
"description": "A single Wikibase Property",
"headers": {
"Last-Modified": {
"schema": {
"type": "string"
},
"description": "Last modified date"
},
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
},
"X-Authenticated-User": {
"schema": {
"type": "string"
},
"description": "Optional username of the user making the request"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "./response-parts.json#/PropertyResponse"
},
"example": {
"id": "P694",
"type": "property",
"data_type": "wikibase-item",
"labels": {
"en": "instance of",
"ru": "это частный случай понятия"
},
"descriptions": {
"en": "this item is a concrete object (instance) of this class, category or object group",
"ru": "данный элемент представляет собой конкретный объект (экземпляр / частный случай) класса, категории."
},
"aliases": {
"en": [
"is a",
"is an"
],
"ru": [
"представляет собой",
"является"
]
},
"statements": {
"P1628": [
{
"id": "P694$b4c349a2-c504-4fc5-b7d5-8b781c719d71",
"rank": "normal",
"property": {
"id":"P1628",
"data_type": "url"
},
"value": {
"type": "value",
"content": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
},
"qualifiers": [],
"references": []
}
]
}
}
}
}
},
"Statement": {
"description": "A single Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.",
"headers": {
"Last-Modified": {
"schema": {
"type": "string"
},
"description": "Last modified date"
},
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
},
"X-Authenticated-User": {
"schema": {
"type": "string"
},
"description": "Optional username of the user making the request"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "./response-parts.json#/StatementResponse"
},
"examples": {
"Statement on an Item": { "$ref": "./examples.json#/ItemStatementResponseExample" },
"Statement on a Property": { "$ref": "./examples.json#/PropertyStatementResponseExample" }
}
}
}
},
"ItemStatement": {
"description": "A single Wikibase Statement. Please note that the value of the `ETag` header field refers to the Item's revision ID.",
"headers": {
"Last-Modified": {
"schema": {
"type": "string"
},
"description": "Last modified date"
},
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
},
"X-Authenticated-User": {
"schema": {
"type": "string"
},
"description": "Optional username of the user making the request"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "./response-parts.json#/StatementResponse"
},
"example": { "$ref": "./examples.json#/ItemStatementResponseExample/value" }
}
}
},
"PropertyStatement": {
"description": "A single Wikibase Statement. Please note that the value of the `ETag` header field refers to the Property's Revision ID.",
"headers": {
"Last-Modified": {
"schema": {
"type": "string"
},
"description": "Last modified date"
},
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
},
"X-Authenticated-User": {
"schema": {
"type": "string"
},
"description": "Optional username of the user making the request"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "./response-parts.json#/StatementResponse"
},
"example": { "$ref": "./examples.json#/PropertyStatementResponseExample/value" }
}
}
},
"NotModified": {
"description": "The specified resource has not been modified since last provided revision number or date",
"headers": {
"ETag": {
"schema": {
"type": "string"
},
"description": "Last entity revision number"
}
}
},
"MovedPermanently": {
"description": "The specified resource has permanently moved to the indicated location",
"headers": {
"Location": {
"schema": {
"type": "string"
},
"description": "The URL to which the requested resource has been moved"
}
}
},
"MovedTemporarily": {
"description": "The specified resource has temporarily moved to the indicated location",
"headers": {
"Location": {
"schema": {
"type": "string"
},
"description": "The URL to which the requested resource has been moved"
}
}
}
}