Page MenuHomePhabricator

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

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

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:07 AM
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."

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;
}
Jalexander raised the priority of this task from Medium to High.Jun 17 2015, 7:07 AM
Jalexander moved this task from Backlog to Radar on the Trust-and-Safety board.

The copyright bit should probably be in core mediawiki.

Jalexander lowered the priority of this task from High to Medium.Jun 17 2015, 7:24 AM
Jalexander subscribed.

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

Krenair subscribed.

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

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.

Zppix removed Zppix as the assignee of this task.Oct 10 2016, 6:45 PM
Zppix subscribed.

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

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

Jdforrester-WMF changed the task status from Open to Stalled.May 7 2018, 9:40 PM
Jdforrester-WMF added a project: WMF-Legal.
Jdforrester-WMF subscribed.

Stalled waiting for response from WMF-Legal.

Stalled waiting for response from WMF-Legal.

Would recommend emailing them since Phabricator is not really somewhere they routinely look. (Zhou has since left the team which I would imagine means this slipped off their radar.)

I'll go ahead and flag it to them.

Change 347433 abandoned by Umherirrender:

[mediawiki/core@master] API: Add terms to auto-generated documentation

Reason:

Old outdated patch set

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

Change 347434 abandoned by Umherirrender:

[mediawiki/extensions/WikimediaMessages@master] Add terms to the action API

Reason:

Old outdated patch set

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