class Meta: resource_name = 'scope' queryset = Scope.objects.all() authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=True) filtering = {"datastore_owner": ALL_WITH_RELATIONS}
class Meta: resource_name = "funfconfig" list_allowed_methods = ["delete", "get", "post"] authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=True) object_class = Document collection = "funfconfig" # collection name
class Meta: queryset = Device.objects.all() allowed_methods = ("get", "post", "delete") authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=True) filtering = {"datastore_owner": ALL_WITH_RELATIONS} limit = 20
class Meta: resource_name = 'role' queryset = Role.objects.all() list_allowed_methods = ["delete", "get", "post"] authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=True) filtering = {"datastore_owner": ALL_WITH_RELATIONS}
class Meta: resource_name = "answer" list_allowed_methods = ["delete", "get", "post"] help_text = 'resource help text...' authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=True) object_class = Document collection = "answer" # collection name
class Meta: authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=True) resource_name = "funf" list_allowed_methods = ["delete", "get", "post"] object_class = Document collection = "funf" # collection name filtering = {"key": ["exact"]}
class Meta: authentication = OAuth2Authentication("crowdsos_write") authorization = PDSAuthorization(scope="crowdsos_write", audit_enabled=False) resource_name = "incident" list_allowed_methods = ["delete", "get", "post"] object_class = Document collection = "incident" filtering = {"type": ["exact"]}
class Meta: queryset = AuditEntry.objects.extra({ 'date': 'date(timestamp)' }).values('date').annotate(count=models.Count("id")) authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=False) fields = ['date', 'count'] allowed_methods = ('get') filtering = { "date": ["gte", "lte", "gt", "lt"], "datastore_owner": ALL_WITH_RELATIONS } ordering = ("date")
class Meta: queryset = AuditEntry.objects.all() # POST is provided to allow a Resource or Sandbox server to store audit entries on the PDS allowed_methods = ('get', 'post') authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=False) filtering = { "datastore_owner": ALL_WITH_RELATIONS, "timestamp": ["gte", "lte", "gt", "lt"], "script": ["contains"], "requester": ALL_WITH_RELATIONS } ordering = ('timestamp') limit = 20
class Meta: queryset = Profile.objects.all() authentication = OAuth2Authentication("funf_write") authorization = PDSAuthorization(scope="funf_write", audit_enabled=True) filtering = {"uuid": ["contains", "exact"]}