purity_fb_1dot7.UsageUsersApi

All URIs are relative to https://purity_fb_server/api

Method HTTP request Description
list_user_usage GET /1.7/usage/users

list_user_usage

QuotasUserResponse list_user_usage(names=names, filter=filter, limit=limit, sort=sort, start=start, token=token, file_system_names=file_system_names, uids=uids)

A list of usage user entries

Example

from purity_fb import PurityFb, FileSystem, NfsRule, rest

fb = PurityFb("10.255.9.28", version=__version__) # assume the array IP is 10.255.9.28
fb.disable_verify_ssl()
try:
    res = fb.login(API_TOKEN) # login to the array with your API_TOKEN
except rest.ApiException as e:
    print("Exception when logging in to the array: %s\n" % e)
if res:
    try:
        # Create a file system named usageFs
        file_system_name = "usageFs"
        usageFs = FileSystem(name=file_system_name)
        # post the file system object usageFs on the array
        res = fb.file_systems.create_file_systems(file_system=usageFs)

        # List usage for all users who have space used on usageFs
        res = fb.usage_users.list_user_usage(file_system_names=[file_system_name])
        print(res.items)
    except rest.ApiException as e:
        print("Exception when creating file system or listing user usage: %s\n" % e)

Parameters

Name Type Description Notes
names list[str] A list of names. [optional]
filter str The filter to be used for query. [optional]
limit int limit, should be >= 0 [optional]
sort str The way to order the results. [optional]
start int start [optional]
token str token [optional]
file_system_names list[str] A comma-separated list of file system names. If after filtering, there is not at least one resource that matches each of the elements of names, then an error is returned. [optional]
uids list[str] A comma-separated list of user IDs. If after filtering, there is not at least one resource that matches each of the elements of user IDs, then an error is returned. This cannot be provided together with user_names query parameter. [optional]

Return type

QuotasUserResponse

Authorization

AuthTokenHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to Overview]