# keystone.api.roles module

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

  Bases: `APIBase`

  resource_mapping = [(<class 'keystone.api.roles.RolesResource'>, '/roles', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/roles', 'stable', {})), (<class 'keystone.api.roles.RoleResource'>, '/roles/<string:role_id>', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/role', 'stable', {'role_id': 'https://docs.openstack.org/api/openstack-identity/3/param/role_id'})), (<class 'keystone.api.roles.RoleImplicationListResource'>, '/roles/<string:prior_role_id>/implies', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/implied_roles', 'stable', {'prior_role_id': 'https://docs.openstack.org/api/openstack-identity/3/param/role_id'})), (<class 'keystone.api.roles.RoleImplicationResource'>, '/roles/<string:prior_role_id>/implies/<string:implied_role_id>', None, {}, ('https://docs.openstack.org/api/openstack-identity/3/rel/implied_role', 'stable', {'implied_role_id': 'https://docs.openstack.org/api/openstack-identity/3/param/role_id', 'prior_role_id': 'https://docs.openstack.org/api/openstack-identity/3/param/role_id'}))]

class keystone.api.roles.RoleImplicationListResource

  Bases: `Resource`

  get(prior_role_id)

    List Implied Roles.

    GET/HEAD /v3/roles/{prior_role_id}/implies

  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.roles.RoleImplicationResource

  Bases: `Resource`

  delete(prior_role_id, implied_role_id)

    Delete implied role.

    DELETE /v3/roles/{prior_role_id}/implies/{implied_role_id}

  get(prior_role_id, implied_role_id)

    Get implied role.

    GET/HEAD /v3/roles/{prior_role_id}/implies/{implied_role_id}

  head(prior_role_id, implied_role_id=None)
  methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET', 'HEAD', 'PUT'}

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

  put(prior_role_id, implied_role_id)

    Create implied role.

    PUT /v3/roles/{prior_role_id}/implies/{implied_role_id}

class keystone.api.roles.RoleResource

  Bases: `ResourceBase`

  collection_key: str = 'roles'
  delete(role_id)

    Delete role.

    DELETE /v3/roles/{role_id}

  get(role_id)

    Get role.

    GET/HEAD /v3/roles/{role_id}

  get_member_from_driver
  member_key: str = 'role'
  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(role_id)

    Update role.

    PATCH /v3/roles/{role_id}

class keystone.api.roles.RolesResource

  Bases: `ResourceBase`

  collection_key: str = 'roles'
  get()

    List roles.

    GET/HEAD /v3/roles

  get_member_from_driver
  member_key: str = 'role'
  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 role.

    POST /v3/roles

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