matej_suchanek created this task.
matej_suchanek added projects: Wikidata, Wikibase-_javascript_-Api, MediaWiki-extensions-WikibaseRepository.
Herald added a subscriber: Aklapper.

TASK DESCRIPTION

The doc says:

srv/RepoApi.js
/**
 * Returns `Claim`s of a specific `Entity` by providing an `Entity` id or a specific `Claim` by
 * providing a `Claim` GUID.
 * @see wikibase.api.RepoApi._post
 *
 * @param {string|null} entityId `Entity` id. May be `null` if `claimGuid` is specified.
 * @param {string} [propertyId] Only return `Claim`s featuring this `Property`.
 * @param {string} [claimGuid] GUID of the `Claim` to return. Either `claimGuid` or `entityID`
 *        has to be provided.
 * [...]
 */

This API call

repoApi.getClaim( null, null, 'Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F' )

results in an error, though:

{
    "error": {
        "code": "param-illegal",
        "info": "An illegal set of parameters have been used.",
        "messages": [
            {
                "name": "wikibase-api-param-illegal",
                "parameters": [],
                "html": {
                    "*": "An illegal set of parameters have been used."
                }
            }
        ],
        "*": "See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    },
    "servedby": "mw1286"
}

It happens because the argument entity= is empty (not excluded from the request).


TASK DETAIL
https://phabricator.wikimedia.org/T200078

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: matej_suchanek
Cc: matej_suchanek, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to