API Models Overview
models/data/rest_api/v1/entitybase/response/cleanup.py
CleanupOrphanedResponse
Response model for cleanup orphaned statements.
Fields:
cleaned_count(int): Number of statements cleaned up from S3 and Vitessfailed_count(int): Number of statements that failed to clean uperrors(list[str]): List of error messages for failed cleanups
models/data/rest_api/v1/entitybase/response/endorsements.py
BatchEndorsementStatsResponse
Response for batch statement endorsement statistics.
Fields:
stats(List[StatementEndorsementStats]): List of endorsement statistics for multiple statements
EndorsementListResponse
Response for endorsement list queries.
Fields:
statement_hash(int): Hash of the statement for which endorsements are listed. Example: 12345user_id(int): ID of the user whose endorsements are listed. Example: 67890endorsements(List[EndorsementResponse]): List of endorsements. Example: [{'id': 1, 'user_id': 123}]total_count(int): Total number of endorsements. Example: 50has_more(bool): Whether there are more endorsements to fetch. Example: truestats(Optional['StatementEndorsementStats']): Statistics for the statement's endorsements
EndorsementResponse
Response for endorsement operations.
Fields:
endorsement_id(int): Unique identifier for the endorsement. Example: 12345.user_id(int): ID of the user who created the endorsement. Example: 67890.statement_hash(int): Hash of the endorsed statement. Example: 987654321.created_at(str): Timestamp when the endorsement was created (ISO format). Example: '2023-01-01T12:00:00Z'.removed_at(str): Timestamp when the endorsement was removed (ISO format), empty string if active. Example: '2023-12-31T23:59:59Z'.
EndorsementStatsResponse
Response for endorsement statistics.
Fields:
user_id(int): ID of the user for whom statistics are provided. Example: 12345total_endorsements_given(int): Total number of endorsements given by the user. Example: 10total_endorsements_active(int): Number of active endorsements given by the user. Example: 8
SingleEndorsementStatsResponse
Response for single statement endorsement statistics.
Fields:
total(int): Total number of endorsements for the statement. Example: 15active(int): Number of active endorsements for the statement. Example: 12withdrawn(int): Number of withdrawn endorsements for the statement. Example: 3
StatementEndorsementResponse
Endorsement record.
Fields:
id(int): Unique identifier for the endorsementuser_id(int): ID of the user who gave the endorsementstatement_hash(int): Hash of the endorsed statementcreated_at(datetime): Timestamp when the endorsement was createdremoved_at(Optional[datetime]): Timestamp when the endorsement was removed, null if active
StatementEndorsementStats
Response for statement endorsement statistics.
Fields:
total(int): Total number of endorsements for the statement. Example: 15active(int): Number of active endorsements for the statement. Example: 12withdrawn(int): Number of withdrawn endorsements for the statement. Example: 3
models/data/rest_api/v1/entitybase/response/entity/backlink_statistics.py
BacklinkStatisticsData
Container for computed backlink statistics.
Fields:
total_backlinks(int): Total number of backlink relationships. Example: 150.unique_entities_with_backlinks(int): Number of entities with at least one backlink. Example: 75.top_entities_by_backlinks(list[TopEntityByBacklinks]): Top entities by backlink count. Example: [{'entity_id': 'Q1', 'backlink_count': 10}].
BacklinkStatisticsResponse
API response for backlink statistics.
Fields:
date(str): Date of statistics computation. Example: '2023-01-01'.total_backlinks(int): Total number of backlink relationships. Example: 150.unique_entities_with_backlinks(int): Number of entities with at least one backlink. Example: 75.top_entities_by_backlinks(list[TopEntityByBacklinks]): Top entities by backlink count. Example: [{'entity_id': 'Q1', 'backlink_count': 10}].
models/data/rest_api/v1/entitybase/response/entity/backlinks.py
BacklinkResponse
Model representing a backlink from one entity to another.
Fields:
entity_id(str): Entity ID that references the targetproperty_id(str): Property used in the referencerank(str): Rank of the statement (normal/preferred/deprecated)
BacklinksResponse
Response model for backlinks API.
Fields:
backlinks(list[BacklinkResponse]): List of backlinkslimit(int): Requested limitoffset(int): Requested offset
models/data/rest_api/v1/entitybase/response/entity/change.py
EntityChange
Schema for entity change events in API responses.
Fields:
entity_id(str): The ID of the entity that changedrevision_id(int): The new revision ID after the changechange_type('ChangeType'): The type of changefrom_revision_id(int): The previous revision ID (0 for creations)changed_at(datetime): Timestamp of the changeedit_summary(str): Summary of the edit
models/data/rest_api/v1/entitybase/response/entity/entity_status.py
EntityStatusResponse
Response model for entity status changes (lock, archive, semi-protect).
Fields:
id(str): Entity ID. Example: 'Q42'.revision_id(int): Revision ID after status change. Example: 12345.status(str): Status that was set. Example: 'locked', 'unlocked', 'archived', 'unarchived', 'semi_protected', 'unprotected'.idempotent(bool): True if entity was already in the target state (no new revision created).
models/data/rest_api/v1/entitybase/response/entity/entitybase.py
EntityAliasesResponse
Collection of aliases keyed by language code.
Fields:
data(dict[str, list[AliasValue]]): Dictionary of aliases keyed by language code.
EntityDeleteResponse
Response model for entity deletion.
Fields:
id(str): Entity ID. Example: 'Q42'.revision_id(int): Revision ID at deletion. Example: 12345.is_deleted(bool): Whether entity is deleted. Example: true.deletion_type(str): Type of deletion performed. Example: 'soft_delete'.deletion_status(str): Status of deletion (soft_deleted/hard_deleted). Example: 'soft_deleted'.
EntityDescriptionsResponse
Collection of descriptions keyed by language code.
Fields:
data(dict[str, DescriptionValue]): Dictionary of descriptions keyed by language code. Example: {'en': {'language': 'en', 'value': 'A test description'}}.
EntityHistoryEntry
Response model for a single entity history entry.
Fields:
revision_id(int): Revision ID. Example: 12345.created_at(str): Creation timestamp (ISO format). Example: '2023-01-01T12:00:00Z'.user_id(int): User ID who made the change. Example: 67890.edit_summary(str): Edit summary text. Example: 'Added label'.
EntityJsonImportResponse
Response model for JSONL entity import operations.
Fields:
processed_count(int): Number of lines processedimported_count(int): Number of entities successfully importedfailed_count(int): Number of entities that failed to importerror_log_path(str): Path to error log file for malformed lines
EntityLabelsResponse
Collection of labels keyed by language code.
Fields:
data(dict[str, LabelValue]): Dictionary of labels keyed by language code. Example: {'en': {'language': 'en', 'value': 'Test'}}.
EntityListItem
Single entity item in a list response.
Fields:
entity_id(str): Entity ID (e.g., 'Q42')head_revision_id(int): Current head revision ID
EntityListResponse
Response model for entity list queries.
Fields:
entities(list[EntityListItem | EntityListItemWithEditType]): List of entities with their metadatacount(int): Total number of entities returned
EntityMetadataBatchResponse
Response model for batch entity metadata fetching.
Fields:
metadata(dict[str, EntityMetadataResponse | None]): Dictionary mapping entity_id to metadata or None
EntityMetadataResponse
Model for entity metadata.
Fields:
id(str): Entity IDtype(str): Entity typelabels(EntityLabelsResponse): Entity labelsdescriptions(EntityDescriptionsResponse): Entity descriptionsaliases(EntityAliasesResponse): Entity aliasesstatements(EntityStatementsResponse): Entity statementssitelinks(EntitySitelinksResponse): Entity sitelinks
EntityRedirectResponse
Response model for entity redirect creation.
Fields:
redirect_from_id(str): Entity ID being redirected fromredirect_to_id(str): Entity ID being redirected tocreated_at(str): Creation timestamp of the redirectrevision_id(int): Revision ID of the redirect
EntityResponse
Response model for entity data.
Fields:
id(str): Entity ID. Example: 'Q42'.revision_id(int): Revision ID of the entity. Example: 12345.entity_data(S3RevisionData): Full entity JSON data. Example: {'id': 'Q42', 'type': 'item'}.state(EntityState | None): Entity state information (optional, may be None for revisions).
EntitySitelinksResponse
Collection of sitelinks.
Fields:
data(dict[str, SitelinkValue]): Dictionary of sitelinks keyed by site.
EntityStatementsResponse
List of entity statements.
Fields:
data(list[dict[str, Any]]): List of entity statements.
ProtectionResponse
Model for entity protection information.
Fields:
is_semi_protected(bool): Whether entity is semi-protected. Example: true.is_locked(bool): Whether entity is locked. Example: false.is_archived(bool): Whether entity is archived. Example: false.is_dangling(bool): Whether entity is dangling. Example: false.is_mass_edit_protected(bool): Whether entity is mass edit protected. Example: true.
models/data/rest_api/v1/entitybase/response/entity/revert.py
EntityRevertResponse
Response for entity revert operation.
Fields:
entity_id(str): ID of the reverted entity. Example: 'Q42'.new_revision_id(int): New revision ID after revert. Example: 12345.reverted_from_revision_id(int): Original revision ID before revert. Example: 67890.reverted_at(str): Timestamp of the revert. Example: '2023-01-01T12:00:00Z'.
models/data/rest_api/v1/entitybase/response/entity/revision_read_response.py
RevisionReadResponse
Response model for reading revisions.
Fields:
entity_id(str): No descriptionrevision_id(int): No descriptiondata(RevisionData): No descriptioncontent(dict[str, Any]): No descriptionschema_version(str): No descriptioncreated_at(str): No descriptionuser_id(int): No descriptionedit_summary(str): No descriptionredirects_to(str): No description
models/data/rest_api/v1/entitybase/response/entity/wikibase.py
AliasValue
Individual alias entry with language and value.
Fields:
language(str): Language code for the alias. Example: 'en'.value(str): The alias text. Example: 'Alternative Name'.
DescriptionValue
Individual description entry with language and value.
Fields:
language(str): Language code for the description. Example: 'en'.value(str): The description text. Example: 'A test description'.
LabelValue
Individual label entry with language and value.
Fields:
language(str): Language code for the label. Example: 'en'.value(str): The label text. Example: 'Test Label'.
SitelinkValue
Individual sitelink entry.
Fields:
site(str): Site identifier for the sitelink. Example: 'enwiki'.title(str): Page title on the site. Example: 'Test Page'.url(str): URL of the page. Example: 'https://en.wikipedia.org/wiki/Test_Page'.badges(List[str]): List of badges associated with the sitelink. Example: ['featuredarticle']
models/data/rest_api/v1/entitybase/response/entity_data.py
ElasticsearchDocumentResponse
Response model for Elasticsearch document preview.
Fields:
document(dict[str, Any]): Elasticsearch document
EntitiesResponse
Response model for entities search.
Fields:
entities(dict[str, Any]): Entities data
EntityJsonResponse
Response model for JSON format entity data.
Fields:
data(dict[str, Any]): Entity data in JSON format
PropertiesResponse
Response model for entity properties.
Fields:
properties(dict[str, Any]): Entity properties
TopEntityByBacklinks
Model for entity backlink ranking.
Fields:
entity_id(str): Entity IDbacklink_count(int): Number of backlinks to this entity
TurtleResponse
Response model for Turtle format entity data.
Fields:
turtle(str): Entity data in Turtle format
models/data/rest_api/v1/entitybase/response/events.py
RDFChangeEvent
RDF change event following MediaWiki recentchange schema.
Fields:
schema_uri(str): Schema URI for this eventmeta(dict): Event metadataentity_id(str): Entity ID (e.g., Q42)revision_id(int): New revision IDfrom_revision_id(int): Previous revision ID (0 for creation)added_triples(list[tuple[str, str, str]]): RDF triples added in this revisionremoved_triples(list[tuple[str, str, str]]): RDF triples removed in this revisioncanonicalization_method(str): RDF canonicalization method usedtriple_count_diff(int): Net change in triple counttype(str): Type of changetitle(str): Entity titleuser(str): Editor usernametimestamp(int): Unix timestampcomment(str): Edit summarybot(bool): Whether editor is a botminor(bool): Whether this is a minor editpatrolled(bool | None): Patrol statusrevision(dict): Old and new revision IDslength(dict): Length of old and new revisionsnamespace(int): Namespace IDserver_name(str): Server nameserver_url(str): Server URLwiki(str): Wiki identifier
models/data/rest_api/v1/entitybase/response/health.py
HealthCheckResponse
Detailed response model for health check.
Fields:
status(str): Overall health statuss3(str): S3 service health status. Example: 'healthy'.vitess(str): Vitess service health status. Example: 'healthy'.timestamp(str): Timestamp of health check
HealthResponse
Response model for health check.
Fields:
status(str): Health status
WorkerHealthCheckResponse
Model for worker health check response.
Fields:
status(str): Health status: healthy or unhealthyworker_id(str): Unique worker identifierdetails(dict[str, Any]): Worker health details including running status and last_runrange_status(dict[str, Any]): Current ID range allocation status
models/data/rest_api/v1/entitybase/response/id_response.py
IdResponse
Response model for generated entity ID.
Fields:
id(str): The generated entity ID (e.g., 'Q123', 'P456')
models/data/rest_api/v1/entitybase/response/lexemes.py
FormRepresentationResponse
Fields:
value(str): No description
FormRepresentationsResponse
Fields:
representations(Dict[str, RepresentationData]): No description
FormResponse
Fields:
id(str): No descriptionrepresentations(Dict[str, RepresentationData]): No descriptiongrammatical_features(List[str]): No descriptionclaims(Dict[str, List[Dict[str, Any]]]): No description
FormsResponse
Fields:
forms(List[FormResponse]): No description
LemmaResponse
Fields:
value(str): No description
LemmasResponse
Fields:
lemmas(Dict[str, RepresentationData]): No description
LexemeLanguageResponse
Response model for lexeme language endpoint.
Fields:
language(str): No description
LexemeLexicalCategoryResponse
Response model for lexeme lexical category endpoint.
Fields:
lexical_category(str): No description
RepresentationData
Fields:
language(str): No descriptionvalue(str): No description
SenseGlossResponse
Fields:
value(str): No description
SenseGlossesResponse
Fields:
glosses(Dict[str, RepresentationData]): No description
SenseResponse
Fields:
id(str): No descriptionglosses(Dict[str, RepresentationData]): No descriptionclaims(Dict[str, List[Dict[str, Any]]]): No description
SensesResponse
Fields:
senses(List[SenseResponse]): No description
models/data/rest_api/v1/entitybase/response/listings.py
EntityListing
Model for entity listing entries.
Fields:
entity_id(str): Entity IDentity_type(str): Entity type (Q, P, etc.)reason(str): Reason for listing
models/data/rest_api/v1/entitybase/response/metadata.py
MetadataContent
Model for metadata content.
Fields:
ref_count(int): Reference count
MetadataData
Model for metadata data content.
Fields:
data(str | dict[str, Any]): Metadata content as text or structured data
RevisionMetadataResponse
Metadata for entity revisions.
Fields:
revision_id(int): Revision IDcreated_at(str): Creation timestampuser_id(int): User IDedit_summary(str): Edit summary
models/data/rest_api/v1/entitybase/response/qualifiers.py
QualifierResponse
Response model for qualifier data.
Fields:
qualifier(dict[str, Any]): Full qualifier JSON object with reconstructed snaks. Values may be int, str, dict, or list containing reconstructed snaks.content_hash(int): Hash of the qualifier content. Example: 123456789.created_at(str): Timestamp when qualifier was created. Example: '2023-01-01T12:00:00Z'.
ReconstructedSnakValue
Response model for reconstructed snak value from hash.
Fields:
snaktype(str): Type of snak. Example: 'value', 'novalue', 'somevalue'.property(str): Property ID. Example: 'P31'.datatype(str | None): Datatype of the snak. Example: 'wikibase-item'.datavalue(dict[str, Any] | None): Data value of the snak. Example: {'value': 'Q1', 'type': 'wikibase-entityid'}.
SerializableQualifierValue
Serializable form of qualifier values for JSON serialization.
Fields:
value(dict[str, Any] | int | str | list['SerializableQualifierValue'] | None): Serializable qualifier value (dict, int, str, or list of SerializableQualifierValue).
SnakResponse
Response model for snak data.
Fields:
snak(dict[str, Any]): Full snak JSON object. Example: {'snaktype': 'value', 'property': 'P31', 'datatype': 'wikibase-item', 'datavalue': {...}}.content_hash(int): Hash of the snak content. Example: 123456789.created_at(str): Timestamp when snak was created. Example: '2023-01-01T12:00:00Z'.
models/data/rest_api/v1/entitybase/response/rdf.py
DeduplicationStatsResponse
Model for deduplication cache statistics.
Fields:
hits(int): Number of cache hitsmisses(int): Number of cache missessize(int): Current cache sizecollision_rate(float): Collision rate percentage
FullRevisionResponse
Model for full revision data from database.
Fields:
revision_id(int): Revision IDstatements(list[int]): List of statement hashesproperties(list[str]): List of unique propertiesproperty_counts(dict[str, int]): Property countslabels(dict[str, dict[str, str]]): Entity labelsdescriptions(dict[str, dict[str, str]]): Entity descriptionsaliases(dict[str, list[str]]): Entity aliasessitelinks(dict[str, dict[str, str]]): Entity sitelinks
MetadataLoadResponse
Response model for metadata loading operations.
Fields:
results(dict[str, bool]): Dictionary mapping entity_id to success status
RedirectBatchResponse
Response model for batch entity redirects fetching.
Fields:
redirects(dict[str, list[str]]): Dictionary mapping entity_id to list of redirect titles
WikibasePredicatesResponse
Model for Wikibase predicate URIs for a property.
Fields:
direct(str): Direct property predicatestatement(str): Statement property predicatestatement_value(str): Statement value property predicatequalifier(str): Qualifier property predicatereference(str): Reference property predicatestatement_value_node(str): Statement value node predicate
models/data/rest_api/v1/entitybase/response/references.py
ReferenceResponse
Response model for reference data.
Fields:
reference(dict[str, Any]): Full reference JSON object. Example: {'snaks': {'P854': [{'value': 'https://example.com'}]}}.content_hash(int): Hash of the reference content. Example: 123456789.created_at(str): Timestamp when reference was created. Example: '2023-01-01T12:00:00Z'.
ReferenceSnaks
Model for reference snaks structure (inner reference data).
Fields:
snaks(dict[str, Any]): No descriptionsnaks_order(list[str] | None): No description
models/data/rest_api/v1/entitybase/response/result.py
EntityIdResult
Model for entity creation result with ID and revision.
Fields:
entity_id(str): The new entity ID (e.g., 'Q123')revision_id(int): The revision ID of the created entity
RevisionIdResult
Model for operations that return a revision ID.
Fields:
revision_id(int): The revision ID of the created/updated entity, or 0 for idempotent operations
RevisionResult
Result of revision processing.
Fields:
success(bool): Whether the revision processing was successfulrevision_id(int): The ID of the created or updated revisionerror(str): Error message if the operation failed
models/data/rest_api/v1/entitybase/response/settings.py
SettingsResponse
Response model for settings endpoint (excludes sensitive values).
Fields:
s3_endpoint(str): No descriptions3_revisions_bucket(str): No descriptions3_snak_version(str): No descriptions3_sitelink_version(str): No descriptions3_qualifier_version(str): No descriptions3_reference_version(str): No descriptions3_statement_version(str): No descriptions3_schema_revision_version(str): No descriptionvitess_host(str): No descriptionvitess_port(int): No descriptionvitess_database(str): No descriptionvitess_pool_size(int): No descriptionvitess_max_overflow(int): No descriptionvitess_pool_timeout(int): No descriptionwikibase_repository_name(str): No descriptionproperty_registry_path(str): No descriptionlog_level(str): No descriptionstreaming_enabled(bool): No descriptionkafka_bootstrap_servers(str): No descriptionkafka_entitychange_json_topic(str): No descriptionkafka_entity_diff_topic(str): No descriptionstreaming_entity_change_version(str): No descriptionstreaming_endorsechange_version(str): No descriptionstreaming_newthank_version(str): No descriptionstreaming_entity_diff_version(str): No descriptionentity_version(str): No descriptiondangling_property_id(str): No descriptionapi_prefix(str): No descriptionuser_agent(str): No descriptionapi_description(str): No descriptionbacklink_stats_enabled(bool): No descriptionbacklink_stats_schedule(str): No descriptionbacklink_stats_top_limit(int): No descriptionuser_stats_enabled(bool): No descriptionuser_stats_schedule(str): No descriptiongeneral_stats_enabled(bool): No descriptiongeneral_stats_schedule(str): No descriptionjson_dump_enabled(bool): No descriptionjson_dump_schedule(str): No descriptions3_dump_bucket(str): No descriptionjson_dump_batch_size(int): No descriptionjson_dump_parallel_workers(int): No descriptionjson_dump_generate_checksums(bool): No descriptionttl_dump_enabled(bool): No descriptionttl_dump_schedule(str): No descriptionttl_dump_batch_size(int): No descriptionttl_dump_parallel_workers(int): No descriptionttl_dump_compression(bool): No descriptionttl_dump_generate_checksums(bool): No description
models/data/rest_api/v1/entitybase/response/sitelinks.py
AllSitelinksResponse
Response model for all entity sitelinks.
Fields:
sitelinks(dict[str, Any]): Dictionary mapping site key to sitelink data
BatchSitelinksResponse
Response model for batch sitelinks lookup by hash.
Fields:
sitelinks(dict[str, str]): Dictionary mapping hash strings to sitelink titles
SitelinksResponse
Response model for all entity sitelinks.
Fields:
sitelinks(dict[str, str]): Sitelinks per site
models/data/rest_api/v1/entitybase/response/statement.py
BatchStatementsResponse
Response model for batch statements lookup.
Fields:
statements(dict[str, dict[str, list[int]]]): Dictionary mapping entity_id → property_id → list of statement hashes
MostUsedStatementsResponse
Fields:
statements(list[int]): List of statement hashes sorted by ref_count DESC
PropertyCountsResponse
Fields:
property_counts(dict[str, int]): Dict mapping property ID -> statement count
PropertyHashesResponse
Fields:
property_hashes(list[int]): List of statement hashes for specified properties
PropertyListResponse
Fields:
properties(list[str]): List of unique property IDs
PropertyRecalculationResult
Result of property count recalculation after statement removal.
Fields:
properties(list[str]): List of property IDs after recalculationproperty_counts(PropertyCounts): Mapping of property ID to statement count after recalculation
StatementBatchResponse
Response model for batch statement queries.
Fields:
statements(list[StatementResponse]): List of statementsnot_found(list[int]): Hashes that were not found
StatementHashResult
Fields:
statements(list[int]): List of statement hashes (rapidhash of each statement). Example: [123456789, 987654321].properties(list[str]): Sorted list of unique property IDs. Example: ['P31', 'P279'].property_counts(PropertyCounts): Dict mapping property ID to count of statements. Example: {'P31': 5}.full_statements(list[Dict[str, Any]]): List of full statement dicts (parallel with hashes). Example: [{'id': 'P31', 'value': 'Q5'}].
StatementResponse
Response model for statement data.
Fields:
schema_version(str): Schema version for the statement. Example: '1.0'.content_hash(int): Hash of the statement content. Example: 123456789.statement(Dict[str, Any]): Full statement JSON object. Example: {'id': 'P31', 'value': 'Q5'}.created_at(str): Timestamp when statement was created. Example: '2023-01-01T12:00:00Z'.
StatementsHashResponse
Response model for entity statement hashes (schema 2.0.0).
Fields:
property_hashes(list[int]): List of statement hashes (rapidhash of each statement). Example: [123456789, 987654321].
StatementsResponse
Response model for statements.
Fields:
statements(dict[str, Any]): Statements data
models/data/rest_api/v1/entitybase/response/stats.py
DeduplicationDatabaseStatsResponse
API response for database deduplication statistics.
Fields:
statements(DeduplicationStatsByType): Statement deduplication statsqualifiers(DeduplicationStatsByType): Qualifier deduplication statsreferences(DeduplicationStatsByType): Reference deduplication statssnaks(DeduplicationStatsByType): Snak deduplication statssitelinks(DeduplicationStatsByType): Sitelink deduplication statsterms(DeduplicationStatsByType): Term deduplication stats
DeduplicationStatsByType
Deduplication stats for a single data type.
Fields:
unique_hashes(int): Number of unique hashes storedtotal_ref_count(int): Total reference count (what would be stored without deduplication)deduplication_factor(float): Deduplication factor as a percentage (0-100)space_saved(int): Number of duplicates eliminated
DeduplicationStatsResponse
API response for deduplication statistics.
Fields:
statements(DeduplicationStatsByType): Statement deduplication statsqualifiers(DeduplicationStatsByType): Qualifier deduplication statsreferences(DeduplicationStatsByType): Reference deduplication statssnaks(DeduplicationStatsByType): Snak deduplication statssitelinks(DeduplicationStatsByType): Sitelink deduplication statsterms(DeduplicationStatsByType): Term deduplication stats
GeneralStatsData
Container for computed general wiki statistics.
Fields:
total_statements(int): Total number of statements.total_qualifiers(int): Total number of qualifiers.total_references(int): Total number of references.total_items(int): Total number of items.total_lexemes(int): Total number of lexemes.total_properties(int): Total number of properties.total_sitelinks(int): Total number of sitelinks.total_terms(int): Total number of terms (labels + descriptions + aliases).terms_per_language(TermsPerLanguage): Terms count per language.terms_by_type(TermsByType): Terms count by type (labels, descriptions, aliases).
GeneralStatsResponse
API response for general wiki statistics.
Fields:
date(str): Date of statistics computation.total_statements(int): Total number of statements.total_qualifiers(int): Total number of qualifiers.total_references(int): Total number of references.total_items(int): Total number of items.total_lexemes(int): Total number of lexemes.total_properties(int): Total number of properties.total_sitelinks(int): Total number of sitelinks.total_terms(int): Total number of terms (labels + descriptions + aliases).terms_per_language(TermsPerLanguage): Terms count per language.terms_by_type(TermsByType): Terms count by type (labels, descriptions, aliases).
RangeStatus
Model for ID range status.
Fields:
current_start(int): Current range start IDcurrent_end(int): Current range end IDnext_id(int): Next available IDids_used(int): Number of IDs usedutilization(float): Utilization percentage
RangeStatuses
Model for all ID range statuses.
Fields:
ranges(dict[str, RangeStatus]): Range statuses by entity type
WatchCounts
Model for user watch counts.
Fields:
entity_count(int): Number of entities watchedproperty_count(int): Number of properties watched
models/data/rest_api/v1/entitybase/response/terms.py
AliasesResponse
Response model for entity aliases.
Fields:
aliases(list[str]): List of alias texts for the specified language
BatchAliasesResponse
Response model for batch aliases lookup by hash.
Fields:
aliases(dict[str, list[str]]): Dictionary mapping hash strings to alias text lists
BatchDescriptionsResponse
Response model for batch descriptions lookup by hash.
Fields:
descriptions(dict[str, str]): Dictionary mapping hash strings to description text
BatchLabelsResponse
Response model for batch labels lookup by hash.
Fields:
labels(dict[str, str]): Dictionary mapping hash strings to label text
DescriptionResponse
Response model for entity descriptions.
Fields:
value(str): The description text for the specified language
DescriptionsResponse
Response model for all entity descriptions.
Fields:
descriptions(dict[str, str]): Descriptions per language
LabelResponse
Response model for entity labels.
Fields:
value(str): The label text for the specified language
LabelsResponse
Response model for all entity labels.
Fields:
labels(dict[str, str]): Labels per language
TermHashResponse
Response for single term (label/description/alias/lemma) operations.
Fields:
hash(int): Hash of the stored term.
TermHashesResponse
Response for multi-term operations (e.g., aliases PUT).
Fields:
hashes(list[int]): Hashes of the stored terms.
TermsByType
Model for terms count by type.
Fields:
counts(dict[str, int]): Type to count mapping.
TermsPerLanguage
Model for terms count per language.
Fields:
terms(dict[str, int]): Language to count mapping.
TermsResponse
Model for batch terms result.
Fields:
terms(dict[int, tuple[str, str]]): Terms by hash
models/data/rest_api/v1/entitybase/response/thanks.py
ThankItemResponse
Individual thank item.
Fields:
id(int): Unique identifier for the thankfrom_user_id(int): User ID who sent the thankto_user_id(int): User ID who received the thankentity_id(str): Entity ID associated with the thankrevision_id(int): Revision ID associated with the thankcreated_at(datetime): Timestamp when the thank was created
ThankResponse
Response for sending a thank.
Fields:
thank_id(int): Thank IDfrom_user_id(int): User ID sending the thankto_user_id(int): User ID receiving the thankentity_id(str): Entity IDrevision_id(int): Revision IDcreated_at(str): Creation timestamp
ThanksListResponse
Response for thanks list queries.
Fields:
user_id(int): User IDthanks(List['ThankItemResponse']): List of thankstotal_count(int): Total count of thankshas_more(bool): Whether there are more thanks available
models/data/rest_api/v1/entitybase/response/user.py
MessageResponse
Generic message response.
Fields:
message(str): No description
NotificationResponse
Response for user notifications.
Fields:
user_id(int): No descriptionnotifications(list): No description
UserCreateResponse
Response for user creation.
Fields:
user_id(int): No descriptioncreated(bool): No description
UserResponse
User model. We intentionally don't have auth, nor store the usernames.
Fields:
user_id(int): No descriptioncreated_at(datetime): No descriptionpreferences(dict | None): No description
WatchlistToggleResponse
Response for watchlist toggle.
Fields:
user_id(int): No descriptionenabled(bool): No description
models/data/rest_api/v1/entitybase/response/user_activity.py
UserActivityItemResponse
Individual user activity item.
Fields:
id(int): Unique identifier for the activityuser_id(int): User ID who performed the activityactivity_type(UserActivityType): Type of activity performedentity_id(str): Entity ID associated with the activityrevision_id(int): Revision ID associated with the activitycreated_at(datetime): Timestamp when the activity occurred
UserActivityResponse
Response for user activity query.
Fields:
user_id(int): User IDactivities(List[UserActivityItemResponse]): List of user activities
models/data/rest_api/v1/entitybase/response/user_preferences.py
UserPreferencesResponse
Response for user preferences query.
Fields:
user_id(int): User IDnotification_limit(int): Notification limitretention_hours(int): Retention hours
models/data/rest_api/v1/entitybase/response/user_stats.py
UserStatsData
Container for computed user statistics.
Fields:
total_users(int): Total number of users. Example: 1000.active_users(int): Number of active users. Example: 500.
UserStatsResponse
API response for user statistics.
Fields:
date(str): Date of statistics computation. Example: '2023-01-01'.total_users(int): Total number of users. Example: 1000.active_users(int): Number of active users. Example: 500.
models/data/rest_api/v1/entitybase/response/utilities.py
DeleteResponse
Response for DELETE operations.
Fields:
success(bool): Whether the operation succeeded.
VersionResponse
Response model for version endpoint.
Fields:
api_version(str): API versionentitybase_version(str): EntityBase version
models/data/rest_api/v1/entitybase/response/watchlist.py
WatchlistEntryResponse
Watchlist entry for database.
Fields:
id(int): Unique identifier for the watchlist entryuser_id(int): User ID who owns the watchlist entryinternal_entity_id(int): Internal entity ID being watchedwatched_properties(List[str] | None): List of specific properties being watched, null for all
WatchlistResponse
Response for listing user's watchlist.
Fields:
user_id(int): User ID for whom the watchlist is returnedwatches(List[dict]): List of watchlist entries with entity_id and properties