univention.admin.rest.client package
univention.admin.rest.client package¶
Sample Client for the UDM REST API.
>>> from univention.admin.rest.client import UDM
>>> uri = 'http://localhost/univention/udm/'
>>> udm = UDM.http(uri, 'Administrator', 'univention')
>>> module = udm.get('users/user')
>>> print('Found {}'.format(module))
>>> obj = next(module.search())
>>> if obj:
>>> obj = obj.open()
>>> print('Object {}'.format(obj))
- class univention.admin.rest.client.Session(credentials, language='en-US', reconnect=True, user_agent='univention.lib/1.0', enable_caching=False)[source]¶
Bases:
object
- class univention.admin.rest.client.Module(udm, uri, name, title, *args, **kwargs)[source]¶
- class univention.admin.rest.client.Object(udm, representation, etag=None, last_modified=None, *args, **kwargs)[source]¶
Bases:
univention.admin.rest.client.Client
- objects¶
- property module¶
- property object_type¶
- property dn¶
- property properties¶
- property options¶
- property policies¶
- property superordinate¶
- property position¶
- property uri¶