# keystone.api.groups module

class keystone.api.groups.GroupAPI(blueprint_url_prefix='', api_url_prefix='', default_mediatype='application/json', decorators=None, errors=None)

  Bases: `APIBase`

  resource_mapping = [(<class 'keystone.api.groups.GroupsResource'>, '/groups', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/groups', 'stable', {})), (<class 'keystone.api.groups.GroupResource'>, '/groups/<string:group_id>', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/group', 'stable', {'group_id': 'https://docs.openstack.org/api/openstack-identity/3/param/group_id'})), (<class 'keystone.api.groups.GroupUsersResource'>, '/groups/<string:group_id>/users', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/group_users', 'stable', {'group_id': 'https://docs.openstack.org/api/openstack-identity/3/param/group_id'})), (<class 'keystone.api.groups.UserGroupCRUDResource'>, '/groups/<string:group_id>/users/<string:user_id>', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/group_user', 'stable', {'group_id': 'https://docs.openstack.org/api/openstack-identity/3/param/group_id', 'user_id': 'https://docs.openstack.org/api/openstack-identity/3/param/user_id'}))]

class keystone.api.groups.GroupResource

  Bases: `ResourceBase`

  collection_key: str = 'groups'
  delete(group_id: str)

    Delete group.

    DELETE /groups/{group_id}

  get(group_id: str)

    Get a group reference.

    GET/HEAD /groups/{group_id}

  get_member_from_driver
  member_key: str = 'group'
  methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET', 'PATCH'}

    The methods this view is registered for. Uses the same default (`["GET", "HEAD", "OPTIONS"]`) as `route` and `add_url_rule` by default.

  patch(group_id: str)

    Update group.

    PATCH /groups/{group_id}

class keystone.api.groups.GroupUsersResource

  Bases: `ResourceBase`

  get(group_id)

    Get list of users in group.

    GET/HEAD /groups/{group_id}/users

  methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

    The methods this view is registered for. Uses the same default (`["GET", "HEAD", "OPTIONS"]`) as `route` and `add_url_rule` by default.

class keystone.api.groups.GroupsResource

  Bases: `ResourceBase`

  collection_key: str = 'groups'
  get()

    List groups.

    GET/HEAD /groups

  get_member_from_driver
  member_key: str = 'group'
  methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}

    The methods this view is registered for. Uses the same default (`["GET", "HEAD", "OPTIONS"]`) as `route` and `add_url_rule` by default.

  post()

    Create group.

    POST /groups

class keystone.api.groups.UserGroupCRUDResource

  Bases: `Resource`

  delete(group_id, user_id)

    Remove user from group.

    DELETE /groups/{group_id}/users/{user_id}

  get(group_id, user_id)

    Check if a user is in a group.

    GET/HEAD /groups/{group_id}/users/{user_id}

  methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET', 'PUT'}

    The methods this view is registered for. Uses the same default (`["GET", "HEAD", "OPTIONS"]`) as `route` and `add_url_rule` by default.

  put(group_id, user_id)

    Add user to group.

    PUT /groups/{group_id}/users/{user_id}

this page last updated: 2026-04-01 20:09:17

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug