• Scalable File Service

sfs
  1. Help Center
  2. Scalable File Service
  3. API Reference
  4. SFS APIs
  5. File Sharing
  6. Querying All Shared File Systems

Querying All Shared File Systems

Function

This interface is used to list the basic information of all shared file systems.

URI

  • GET /v2/{project_id}/shares?all_tenants={all_tenants}&status={status}&limit={limit}&offset={offset}&sort_key={sort_key}&sort_dir={sort_dir}&project_id={project_id}&is_public={is_public}&metadata={metadata}& export_location_id={export_location_id}& export_location_path={export_location_path}& name~={name}& description~={description}& with_count={with_count}
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the project ID of the operator.

    all_tenants

    No (query parameter)

    boolean

    (Administrators only) Specifies whether to list shared file systems of all tenants. To list shared file systems of all tenants, set it to 1. To list shared file systems only of the current tenant, set it to 0.

    project_id

    No (query parameter)

    string

    Specifies the UUID of the project to which the shared file system belongs. This parameter is used together with all_tenants.

    status

    No (query parameter)

    string

    Filters shared file systems by status. Possible values are creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, and shrinking_possible_data_loss_error.

    limit

    No (query parameter)

    integer

    Specifies the maximum number of shared file systems that can be returned.

    offset

    No (query parameter)

    integer

    Specifies the offset to define the start point of shared file system listing.

    sort_key

    No (query parameter)

    string

    Specifies the keyword for sorting the queried shared file systems. Possible values are id, status, size, host, share_proto, export_location, availability_zone, user_id, project_id, created_at, updated_at, display_name, name, share_type_id, share_type, share_network_id, share_network, snapshot_id, and snapshot.

    sort_dir

    No (query parameter)

    string

    Specifies the direction to sort shared file systems. Possible values are asc (ascending) and desc (descending).

    is_public

    No (query parameter)

    string

    When this parameter is set to true, the current tenant can query all its own shared file systems and other tenants' shared file systems whose is_public is set to true. When this parameter is set to false, the current tenant can query only the shared file systems owned by the tenant.

    metadata

    No (query parameter)

    string

    Specifies the metadata information used to query the shared file systems. The value consists of one or more key and value pairs organized as a dictionary of strings.

    export_location_id

    No (query parameter)

    string

    Specifies the field used for filtering based on the UUID of the mount path. This field is supported since API v2.35.

    export_location_path

    No (query parameter)

    string

    Specifies the field used for filtering based on the mount path. This field is supported since API v2.35.

    name~

    No (query parameter)

    string

    Specifies the field used for fuzzy filtering based on the share name. This field is supported since API v2.36.

    description~

    No (query parameter)

    string

    Specifies the field used for fuzzy filtering based on the share description. This field is supported since API v2.36.

    with_count

    No (query parameter)

    string

    Specifies that the number of queried shared file systems will be returned. This field is supported since API v2.42.

Request

  • Parameter description

    None

  • Example request

    None

Response

  • Parameter description

    Parameter

    Type

    Description

    shares

    array

    Specifies the list of shares.

    count

    string

    Specifies the number of queried shared file systems.

  • Description of field share

    Parameter

    Type

    Description

    id

    string

    Specifies the UUID of the shared file system.

    links

    array

    Specifies the share links.

    name

    string

    Specifies the UUID of the project to which the shared file system belongs.

  • Example response
    {
        "count": 1,
        "shares": [
        {
            "id": "1390cb29-539b-4926-8953-d8d6b106071a",
            "links": [
            {
                "href": "https://100.133.170.97:8796/v2/f24555bfcf3146ca936d21bcb548687e/shares/1390cb29-539b-4926-8953-d8d6b106071a",
                "rel": "self"
            },
            {
                "href": "https://100.133.170.97:8796/f24555bfcf3146ca936d21bcb548687e/shares/1390cb29-539b-4926-8953-d8d6b106071a",
                "rel": "bookmark"
            }
            ],
            "name": null
        }
    ]
    }

Status Codes

  • Normal

    200

  • Abnormal

    Status Code

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter a username and the password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The requested page was not found.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication. Then the request can be processed.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    501 Not Implemented

    Failed to complete the request because the server does not support the requested function.

    502 Bad Gateway

    Failed to complete the request because the request is invalid.

    503 Service Unavailable

    Failed to complete the request because the service is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.