wikimedia/mediawiki-extensions-Wikibase

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

Summary

Maintainability
Test Coverage
{
    "get": {
        "operationId": "getStatement",
        "tags": [ "statements" ],
        "summary": "Retrieve a single Statement",
        "description": "This endpoint is also accessible through `/entities/items/{item_id}/statements/{statement_id}` and `/entities/properties/{property_id}/statements/{statement_id}`",
        "parameters": [
            { "$ref": "../../global/parameters.json#/StatementId" },
            { "$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#/Statement" },
            "304": { "$ref": "../../global/responses.json#/NotModified" },
            "400": { "$ref": "./responses.json#/InvalidRetrieveStatementInput" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    },
    "put": {
        "operationId": "replaceStatement",
        "tags": [ "statements" ],
        "summary": "Replace a single Statement",
        "description": "This endpoint is also accessible through `/entities/items/{item_id}/statements/{statement_id}` and `/entities/properties/{property_id}/statements/{statement_id}`",
        "parameters": [
            { "$ref": "../../global/parameters.json#/StatementId" },
            { "$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#/Statement" },
            "400": { "$ref": "./responses.json#/InvalidReplaceStatementInput" },
            "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": "patchStatement",
        "tags": [ "statements" ],
        "summary": "Change elements of a single Statement",
        "description": "This endpoint is also accessible through `/entities/items/{item_id}/statements/{statement_id}` and `/entities/properties/{property_id}/statements/{statement_id}`",
        "parameters": [
            { "$ref": "../../global/parameters.json#/StatementId" },
            { "$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#/Statement" },
            "400": { "$ref": "../../global/responses.json#/InvalidPatch" },
            "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": "deleteStatement",
        "tags": [ "statements" ],
        "summary": "Delete a single Statement",
        "description": "This endpoint is also accessible through `/entities/items/{item_id}/statements/{statement_id}` and `/entities/properties/{property_id}/statements/{statement_id}`",
        "parameters": [
            { "$ref": "../../global/parameters.json#/StatementId" },
            { "$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#/InvalidRemoveStatementInput" },
            "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" }
        }
    }
}