Problem/Motivation

I would like for each group to create its own menu which can then be accessed by an external resource using JSON:API. I am able to view the menu but I am unable to find a way to see the contents of that menu.

Using postman I receive this response:

{
    "jsonapi": {
        "version": "1.0",
        "meta": {
            "links": {
                "self": {
                    "href": "http://jsonapi.org/format/1.0/"
                }
            }
        }
    },
    "data": [],
    "meta": {
        "omitted": {
            "detail": "Some resources have been omitted because of insufficient authorization.",
            "links": {
                "help": {
                    "href": "https://www.drupal.org/docs/8/modules/json-api/filtering#filters-access-control"
                },
                "item--TvH6xvh": {
                    "href": "http://soadmin.lndo.site:8000/jsonapi/group_content_menu/lodge_main/bb1dd8d8-a432-406e-9ed3-d886b0bf0b5a",
                    "meta": {
                        "rel": "item",
                        "detail": "The current user is not allowed to GET the selected resource."
                    }
                },
                "item--IAcRcrM": {
                    "href": "http://soadmin.lndo.site:8000/jsonapi/group_content_menu/lodge_main/80b08975-f8b7-4840-b4a8-98ab80e7334f",
                    "meta": {
                        "rel": "item",
                        "detail": "The current user is not allowed to GET the selected resource."
                    }
                }
            }
        }
    },
    "links": {
        "self": {
            "href": "http://soadmin.lndo.site:8000/jsonapi/group_content_menu/lodge_main"
        }
    }
}

I have give the accessing account 'Bypass group access control' on the Groups module, and 'Administer group', 'Manage menus', and 'Access group content menu overview' on the specific group type.

If it is already possible to view a menu and its links via JSON:API I would appreciate any guidance.

Thank you!
Joe

Comments

gatorjoe created an issue. See original summary.

gatorjoe’s picture

Just wanted to post a follow up note on this issue. I continue to struggle for a solution to accessing the group content menu via JSON:API. I have enabled every single permission for a role to test in both core and the group module without any success. I still receive "The current user is not allowed to GET the selected resource."

gatorjoe’s picture

Category: Feature request » Support request
gouli’s picture

Anybody figured out how to use this module with JSON API. I have application, wherein i need to expose Group Content Menus via JSONAPI, but it returns empty data[]. Any help in this direction is highly appreciated.

camslice’s picture

I'd love for this to work too.

jessehs’s picture

I opened a separate issue to support the same Linkset functionality being added to core. See https://www.drupal.org/project/drupal/issues/3227824

The patch here can help decoupled systems access group content menus https://www.drupal.org/project/group_content_menu/issues/3293917

heddn’s picture

Status: Active » Closed (duplicate)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.