Jump to content

Property talk:P6269

Add topic
From Wikidata
Latest comment: 1 year ago by IagoQnsi in topic More guidance on "protocol" qualifier

Documentation

Representsserver-side web API (Q557770)
Data typeURL
Domaindata set (Q1172284), web service (Q193424) (note: this should be moved to the property statements)
Allowed valueshttps?://.{5,1000}
Example
According to statements in the property:
Wikidata (Q2013) → https://www.wikidata.org/w/api.php
GitHub (Q364) → https://api.github.com/graphql
Kitsu (Q115633627) → https://kitsu.io/api/edge
Wikitech (Q104819161) → https://wikitech.wikimedia.org/w/rest.php
When possible, data should only be stored as statements
Sourcewebsites of each item and third-party directories such as https://www.programmableweb.com/apis/directory (note: this information should be moved to a property statement; use property source website for the property (P1896))
Tracking: usageCategory:Pages using Wikidata property P6269 (Q126375264)
See alsoSPARQL endpoint URL (P5305), web feed URL (P1019), URL (P2699), protocol (P2700)
Lists
Proposal discussionProposal discussion
Current uses
Total108,026
Main statement108,012>99.9% of uses
Qualifier5<0.1% of uses
Reference9<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Scope is as main value (Q54828448): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6269#Scope, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6269#Unique value, SPARQL (every item), SPARQL (by value)
Format “https?://.{5,1000}”: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6269#Format, SPARQL
Required qualifier “protocol (P2700)”: this property should be used with the listed qualifier. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6269#mandatory qualifier, SPARQL
Allowed entity types are Wikibase item (Q29934200), Wikibase property (Q29934218): the property may only be used on a certain entity type (Help)
List of violations of this constraint: Database reports/Constraint violations/P6269#Entity types, hourly updated report

Wikidata:List of APIs with user manual

[edit]

See that list for items with this property set as well as a user manual URL specified. Why do so few items have the user manual for the API set? Prototyperspective (talk) 19:03, 25 February 2025 (UTC)Reply

More guidance on "protocol" qualifier

[edit]

Since Aug 2022, the protocol (P2700) qualifier is mandatory for this property, but the values used in it are all over the place. I think we might need more examples, information in Wikidata usage instructions (P2559), or possibly even dedicated qualifiers for the data format, authentication method, etc. Pinging @JakobVoss who proposed using the qualifier in the property proposal, and @IagoQnsi who made it required for this property. — Waldyrious (talk) 12:54, 31 July 2025 (UTC)Reply

I think five years ago I must have been thinking that an API endpoint URL is pretty useless without knowing the protocol. If the protocol is unknown, a data consumer can't really do anything with the endpoint URL – sure, it could make an HTTP request, but it has no idea what it's asking for or what it's getting back.
It looks like most of the really frequently used values (here's a query for that) are pretty useful, and a bot could make queries based on them. The most-used bad values I'm seeing are REST (Q749568) (80 uses), Hypertext Transfer Protocol (Q8777) (25 uses), and Hypertext Transfer Protocol Secure (Q44484) (18 uses). There should probably be a none-of constraint on P2700 for REST (Q749568) since it is in no way a protocol; it's a loose set of principles for designing APIs, not a protocol in and of itself. HTTP and HTTPS technically are protocols, but they're not useful information in this case. If you're calling something an "API endpoint URL", generally that means you've added a layer of structure on top of HTTP; otherwise, we would generally just call that a website, not an API endpoint.
I think the Wikidata usage instructions should explain that the value needs to be the highest-level protocol, and explicitly mention that it shouldn't be HTTP or HTTPS. We could also mention that "somevalue" can be used if it's a custom API that doesn't have its own item yet (though I don't think the data provides much value in that case). It might also be useful to create a list of suggested values – I'm sad to see that some really useful protocols like OData and IIIF have so few uses. –IagoQnsi (talk) 02:51, 1 August 2025 (UTC)Reply