Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-7363

The type parameter for web service searches doesn't work as documented

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Search, Web service
    • None

      Earlier today, somebody was asking why his search http://beta.musicbrainz.org/ws/2/artist/?fmt=json&query=artist%3AOlyam&type=artist&limit=25 did fail with an error message of

      "type is not a valid parameter unless releases or release-groups are requested."

      http://beta.musicbrainz.org/doc/Development/XML_Web_Service/Version_2/Search documents the type parameter as common to all resources and meaning:

      Selects the index to be searched, artist, release, release-group, recording, work, label (track is supported but maps to recording)

      but if you use it on anything other than release or release-group searches, you get the error message above. Additionally, if you use it on release or release-group searches, the only valid values for it are release group types, not index names as the documentation suggests. So unless I misunderstood something, the type parameter is only a shortcut for the type field on release and release group searches, but not for any other search.

      This seems to be a problem in MBS, because a direct query to the search server (http://search.musicbrainz.org/ws/2/artist/?fmt=json&query=artist%3AOlyam&type=artist&limit=25) does work.

            Unassigned Unassigned
            mineo Wieland Hoffmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                Version Package