wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/rest-api/specs/resources/aliases/list-for-item.json

Summary

Maintainability
Test Coverage
{
    "get": {
        "operationId": "getItemAliases",
        "tags": [ "aliases" ],
        "summary": "Retrieve an Item's aliases",
        "parameters": [
            { "$ref": "../../global/parameters.json#/ItemId" },
            { "$ref": "../../global/parameters.json#/IfNoneMatch" },
            { "$ref": "../../global/parameters.json#/IfModifiedSince" },
            { "$ref": "../../global/parameters.json#/IfMatch" },
            { "$ref": "../../global/parameters.json#/IfUnmodifiedSince" },
            { "$ref": "../../global/parameters.json#/Authorization" }
        ],
        "responses": {
            "200": { "$ref": "./responses.json#/ItemAliases" },
            "304": { "$ref": "../../global/responses.json#/NotModified" },
            "308": { "$ref": "../../global/responses.json#/MovedPermanently" },
            "400": { "$ref": "../../global/responses.json#/InvalidEntityIdInput" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    },
    "patch": {
        "operationId": "patchItemAliases",
        "tags": [ "aliases" ],
        "summary": "Change an Item's aliases",
        "parameters": [
            { "$ref": "../../global/parameters.json#/ItemId" },
            { "$ref": "../../global/parameters.json#/IfMatch" },
            { "$ref": "../../global/parameters.json#/IfNoneMatch" },
            { "$ref": "../../global/parameters.json#/IfUnmodifiedSince" }
        ],
        "requestBody": {
            "description": "Payload containing a JSON Patch document to be applied to an Item's aliases and edit metadata",
            "required": true,
            "content": {
                "application/json-patch+json": {
                    "schema": { "$ref": "../../global/request-parts.json#/PatchRequest" },
                    "example": { "$ref": "./examples.json#/PatchItemAliases" }
                },
                "application/json": {
                    "schema": { "$ref": "../../global/request-parts.json#/PatchRequest" },
                    "example": { "$ref": "./examples.json#/PatchItemAliases" }
                }
            }
        },
        "responses": {
            "200": { "$ref": "./responses.json#/ItemAliases" },
            "400": { "$ref": "../../global/responses.json#/InvalidPatch" },
            "403": { "$ref": "../../global/responses.json#/PermissionDenied" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "422": { "$ref": "../../global/responses.json#/InvalidPatchedAliases" },
            "429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    }
}