Wikimedia API makes no mention of terms of use or licensing information
Open, NormalPublic

Description

There's been much ado lately at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(proposals)/Simplify_the_edit_window regarding the visual edit form (index.php?action=edit) including particular legal language (specifically licensing information and site terms of use).

However, it occurs to me that the main entry point of the Wikimedia/MediaWiki API (https://en.wikipedia.org/w/api.php) does not include most of this legal text. I'm not sure this is a problem (i.e., a legitimate bug), but it seems like a discrepancy that should be examined.

It's possible to retrieve a wiki's "rights info" by calling https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=rightsinfo. This seems orthogonal to the main issue at-hand, though: nowhere on the API entry point page does it state explicitly that edits (or other write [or even read, I suppose] actions) are subject to the relevant and associated terms of use and licensing.


Version: unspecified
Severity: normal

Details

Reference
bz40459
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz40459.
bzimport added a subscriber: Unknown Object (MLST).

Agreed. The language should mirror the standard language, so something like:

[under "Bugs & Requests: ... "]

Terms: By using the API, you agree to the Terms of Use, and you irrevocably agree to release modifications made through the API under the CC-BY-SA 3.0 License and the GFDL.

Not sure how best to handle the links within the house style of that document, but we should link to TOU/CC/GFDL.

Thanks for pointing this out, MZ.

(In reply to comment #1)

Agreed. The language should mirror the standard language, so something like:

[under "Bugs & Requests: ... "]

Terms: By using the API, you agree to the Terms of Use, and you irrevocably
agree to release modifications made through the API under the CC-BY-SA 3.0
License and the GFDL.

Well, no, not exactly. Not all wikis are dual licensed. Needs to vary on $wmgUseDualLicense

Oh, and Wikidata is different too

if ( in_array( $wgDBname, array( 'wikidatawiki', 'testwikidatawiki' ) ) ) {
$wgHooks['SkinCopyrightFooter'][] = function( $title, $type, &$msg, &$link, &$forContent ) {

		if ( $title->getNamespace() === NS_MAIN ) {
			$msg = 'Creative Commons Public Domain 1.0';
			$link = '//creativecommons.org/publicdomain/zero/1.0/';
		}
		return true;

};
}

Yes, forgot to mention this would have to be tweaked for some outlier wikis. But the same basic text still applies, as far as I know.

Though looking at it again, and being reminded by wikidata, it should probably say "modifications or additions":

"Terms: By using the API, you agree to the Terms of Use, and you irrevocably
agree to release modifications or additions made through the API under the CC-BY-SA 3.0 License and the GFDL."

Reedy added a comment.EditedJan 14 2014, 1:27 AM

So I don't have to dig it out again. Basic pattern for adding this information is

$wgHooks['APIGetDescription'][] = function ( &$module, &$desc ) {
        if ( !$module instanceof ApiMain ) {
                return true;
        }

        $desc[] = 'Terms: By using the API, you agree to the Terms of Use, and you irrevocably agree to release modifications made through the API under the CC-BY-SA 3.0 License and the GFDL.';

        // Append some more whitespace for ApiMain
        for ( $i = 0; $i < 3; $i++ ) {
                $desc[] = '';
        }

        return true;
}
Krenair changed the status of subtask T62023: Investigate wmgUseDualLicense from Open to Stalled.Feb 14 2015, 3:57 AM
Jalexander moved this task from Backlog to Radar on the Support-and-Safety board.Jun 17 2015, 7:07 AM
Jalexander raised the priority of this task from Normal to High.

The copyright bit should probably be in core mediawiki.

Jalexander lowered the priority of this task from High to Normal.Jun 17 2015, 7:24 AM
Jalexander added a subscriber: Jalexander.

errr.... reverting priority change... it appears that I do not understand how the workboards work.. I have no idea why priorities were changed.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 1 2015, 8:30 PM
Krenair added a subscriber: Krenair.

It sounds like we need something added to MediaWiki core to let wikis configure some text for this.

Restricted Application added a subscriber: Matanya. · View Herald TranscriptSep 9 2015, 3:14 PM
Anomie added a subscriber: Anomie.Sep 9 2015, 5:34 PM

This would be easy enough to do. But since the API help has dramatically changed since the earlier discussion, I'm not sure where you'd like it put. Two possibilities come to mind:

  • Just above the "Credits" section on action=help&modules=main. Then it wouldn't be present on other pages such as action=help&modules=query.
  • In the "lead" section at the top of the help page, where it will show for all auto-generated help pages.
  • As an additional section appended at the very bottom of every auto-generated help page.

As for the message itself, I'm inclined to just use 'copyrightwarning' or 'copyrightwarning2' by default with API-specific messages that default to empty in case some wiki needs to override it. WMF can register a hook (similar to the existing EditPageCopyrightWarning hook) in the WikimediaMessages extension to apply their specific wording (as with wikimedia-copyrightwarning for the edit page).

Is this for terms of use or licensing or both? MZMcBride originally wondered (emphasis mine)

nowhere on the API entry point page does it state explicitly that edits (or other write [or even read, I suppose] actions) are subject to the relevant and associated terms of use and licensing.

Do clients that only "read" (i.e. make API queries) need to abide by terms of use, or only the content licensing that's in the page footer and in the wiki's "rights info" API query?

Note that API help already displays the license of the code generating the module as "License: GPL-2.0+" (sample), so adding more licensing information will be confusing.

I support putting something in generated help; meanwhile T112607: Web APIs hub should explain licensing is the task to have a wiki page documenting this.

ZhouZ added a subscriber: ZhouZ.Mar 17 2016, 8:55 PM
Restricted Application added a subscriber: JEumerus. · View Herald TranscriptMar 17 2016, 8:55 PM
Zppix claimed this task.Oct 10 2016, 6:33 PM
Zppix removed Zppix as the assignee of this task.Oct 10 2016, 6:45 PM
Zppix added a subscriber: Zppix.

Unassiging until the changes outside of mw/core are made.

ZhouZ added a comment.Apr 10 2017, 4:25 PM

Let's start with the basics and add links to our policies on the API help pages.

Here's one possible wording for this:

"Terms: By using this API, you agree to Wikimedia's Terms of Use and Privacy Policy, and you irrevocably
agree to release modifications or additions made through the API under the CC-BY-SA 3.0 License and the GFDL."

In terms of location, I suggest you put it here:

In the "lead" section at the top of the help page, where it will show for all auto-generated help pages.

Change 347433 had a related patch set uploaded (by Anomie):
[mediawiki/core@master] API: Add terms to auto-generated documentation

https://gerrit.wikimedia.org/r/347433

Change 347434 had a related patch set uploaded (by Anomie):
[mediawiki/extensions/WikimediaMessages@master] Add terms to the action API

https://gerrit.wikimedia.org/r/347434