Wikibase
MediaWiki Wikibase extension
|
accepted
/entities/items/{item_id}/statements/{statement_id}
and /statements/{statement_id}
endpoints. Currently, these endpoints are limited to handling items only and don't support other entity types such as properties./statement/{statement_id}
endpoints don't explicitly specify the entity type in the URL, we should make them work with all entity types and not just items and properties.Wikibase
extension, other extensions can create additional Wikibase entity types (e.g. the WikibaseMediaInfo
extension adds the MediaInfo
entity)./entities/items/{item_id}/statements/{statement_id}
, /entities/properties/{property_id}/statements/{statement_id}
and /statements/{statement_id}
endpoints, will each call the same subject agnostic GetStatement
use case.POST /entities/items/{item_id}/statements
endpoint for adding a new statement to an item won't use a subject agnostic use case. Instead, when adding the POST /entities/properties/{property_id}/statements
endpoint, will create a new use cases for adding a new statement to a property. This is because the new statement doesn't yet have a unique identifier, and it would be nonsensical to have a short POST /statements
endpoint. This is also true of all endpoints that don't support a single uniquely identifiable statement, such as the GET /entities/items/{item_id}/statements
endpoint.UseCaseError
. The route handlers will need to handle these new error codes in order to return the correct endpoint specific error response./statement/{statement_id}
endpoints as the existing ones will already support that. They will have to implement the long entity specific endpoints though.