wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/rest-api/specs/resources/statements/single-for-item.json

Summary

Maintainability
Test Coverage
{
    "get": {
        "operationId": "getItemStatement",
        "tags": [ "statements" ],
        "summary": "Retrieve a single Statement from an Item",
        "description": "This endpoint is also accessible through `/statements/{statement_id}`",
        "parameters": [
            { "$ref": "../../global/parameters.json#/ItemId" },
            { "$ref": "../../global/parameters.json#/ItemStatementId" },
            { "$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": "../../global/responses.json#/ItemStatement" },
            "304": { "$ref": "../../global/responses.json#/NotModified" },
            "400": { "$ref": "./responses.json#/InvalidRetrieveItemStatementInput" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    },
    "put": {
        "operationId": "replaceItemStatement",
        "tags": [ "statements" ],
        "summary": "Replace a single Statement of an Item",
        "description": "This endpoint is also accessible through `/statements/{statement_id}`",
        "parameters": [
            { "$ref": "../../global/parameters.json#/ItemId" },
            { "$ref": "../../global/parameters.json#/ItemStatementId" },
            { "$ref": "../../global/parameters.json#/IfMatch" },
            { "$ref": "../../global/parameters.json#/IfNoneMatch" },
            { "$ref": "../../global/parameters.json#/IfUnmodifiedSince" }
        ],
        "requestBody": { "$ref": "../../global/requests.json#/Statement" },
        "responses": {
            "200": { "$ref": "../../global/responses.json#/ItemStatement" },
            "400": { "$ref": "./responses.json#/InvalidReplaceItemStatementInput" },
            "403": { "$ref": "../../global/responses.json#/PermissionDenied" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    },
    "patch": {
        "operationId": "patchItemStatement",
        "tags": [ "statements" ],
        "summary": "Change elements of a single Statement of an Item",
        "description": "This endpoint is also accessible through `/statements/{statement_id}`.",
        "parameters": [
            { "$ref": "../../global/parameters.json#/ItemId" },
            { "$ref": "../../global/parameters.json#/ItemStatementId" },
            { "$ref": "../../global/parameters.json#/IfMatch" },
            { "$ref": "../../global/parameters.json#/IfNoneMatch" },
            { "$ref": "../../global/parameters.json#/IfUnmodifiedSince" }
        ],
        "requestBody": { "$ref": "../../global/requests.json#/StatementPatch" },
        "responses": {
            "200": { "$ref": "../../global/responses.json#/ItemStatement" },
            "400": { "$ref": "./responses.json#/InvalidItemStatementPatch" },
            "403": { "$ref": "../../global/responses.json#/PermissionDenied" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "409": { "$ref": "../../global/responses.json#/CannotApplyStatementPatch" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "422": { "$ref": "../../global/responses.json#/InvalidPatchedStatement" },
            "429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    },
    "delete": {
        "operationId": "deleteItemStatement",
        "tags": [ "statements" ],
        "summary": "Delete a single Statement from an Item",
        "description": "This endpoint is also accessible through `/statements/{statement_id}`",
        "parameters": [
            { "$ref": "../../global/parameters.json#/ItemId" },
            { "$ref": "../../global/parameters.json#/ItemStatementId" },
            { "$ref": "../../global/parameters.json#/IfMatch" },
            { "$ref": "../../global/parameters.json#/IfNoneMatch" },
            { "$ref": "../../global/parameters.json#/IfUnmodifiedSince" }
        ],
        "requestBody": { "$ref": "../../global/requests.json#/Delete" },
        "responses": {
            "200": { "$ref": "../../global/responses.json#/StatementDeleted" },
            "400": { "$ref": "./responses.json#/InvalidRemoveItemStatementInput" },
            "403": { "$ref": "../../global/responses.json#/PermissionDenied" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    }
}