def get(self, request, format=None): ''' List supported API versions ''' v1 = reverse('api:api_v1_root_view', kwargs={'version': 'v1'}) data = dict( description=_('CyBorgBackup API Rest'), current_version=v1, available_versions=dict(v1=v1), ) return Response(data)
def get(self, request, format=None): ''' List top level resources ''' data = OrderedDict() data['ping'] = reverse('api:api_v1_ping_view', request=request) data['config'] = reverse('api:api_v1_config_view', request=request) data['me'] = reverse('api:user_me_list', request=request) data['users'] = reverse('api:user_list', request=request) data['jobs'] = reverse('api:job_list', request=request) data['job_events'] = reverse('api:job_event_list', request=request) data['settings'] = reverse('api:setting_list', request=request) data['clients'] = reverse('api:client_list', request=request) data['schedules'] = reverse('api:schedule_list', request=request) data['repositories'] = reverse('api:repository_list', request=request) data['policies'] = reverse('api:policy_list', request=request) data['restore'] = reverse('api:restore_launch', request=request) data['catalogs'] = reverse('api:catalog_list', request=request) data['stats'] = reverse('api:stats', request=request) data['escatalogs'] = reverse('api:escatalog_list', request=request) return Response(data)