Querying relationships

Hi,

I would like to know how to query a release-group with all the releases inside.

I red the documentation but I do not understand it at all. Here is the query for release-group of a given artist:

http://musicbrainz.org/ws/2/release-group?artist=65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab&type=album&fmt=json&inc=release-rels&limit=50

Thanks a lot!

For a given release-group (for example, the first one in the above results) you can make:

1 Like

First of all, thanks yvanzo. From what you say, there is no way to get all the release-groups with all its releases for a given artist, then?

I mean:
http://musicbrainz.org/ws/2/release-group/?artist=65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab&type=album&fmt=json&inc=releases

returns me:
“error”: “releases is not a valid inc parameter for the release-group resource.”

Why if I specify an ID (release-group/) I can include the releases and if no ID, I get the error above?

Thanks :smiley:

Without MBID, this is a browse request which doesn’t support as much as a lookup request.

So according to the documentation, inc=releases is currently not supported for release-groups browse request, but inc=release-groups is supported for releases browse request. Thus you can get all the releases with release groups summary for a given artist with this browse request: https://musicbrainz.org/ws/2/release?artist=65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab&type=album&fmt=json&inc=release-groups

2 Likes