# Querying Details About All Shared File Systems

#### Function

This API is used to query the details about all shared file systems.

#### URI

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

  Parameter | Mandatory | Type | Description
  --- | --- | --- | ---
  project_id | Yes | String | Specifies the project ID of the operator.
  all_tenants | No (query parameter) | Integer | (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 ID of the tenant who creates the shared file system. 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, availability_zone_id, user_id, project_id, created_at, updated_at, display_name, name, share_type_id, share_network_id, and snapshot_id.
  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 ID of the mount path. This field is supported by API v2.35 and later versions.
  export_location_path | No (query parameter) | String | Specifies the field used for filtering based on the mount path. This field is supported by API v2.35 and later versions.
  name | No (query parameter) | String | Specifies the field used for fuzzy filtering based on the name of a shared file system. This field is supported by API v2.36 and later versions.
  description~ | No (query parameter) | String | Specifies the field used for fuzzy filtering based on the description of a shared file system. This field is supported by API v2.36 and later versions.

#### Request

- Parameter description

  None

- Example request

  None

#### Response

- Parameter description

  Parameter | Type | Description
  --- | --- | ---
  shares | Array of objects | Specifies the list of share objects.

- Description of the share field

  Parameter | Type | Description
  --- | --- | ---
  links | Array | Specifies the links of shared file systems.
  availability_zone | String | Specifies the availability zone.
  share_server_id | String | Specifies the ID for managing share services.
  share_network_id | String | Specifies the ID of the share network. This parameter is reserved, because share network management is not supported currently.
  snapshot_id | String | Specifies the ID of the source snapshot that is used to create the shared file system. This parameter is reserved, because snapshots are not supported currently.
  snapshot_support | Boolean | Specifies whether snapshots are supported. This parameter is reserved, because snapshots are not supported currently. This field is supported by API v2.2 and later versions.
  id | String | Specifies the ID of the shared file system.
  size | Integer | Specifies the size (GB) of the shared file system.
  share_group_id | String | Specifies the ID of the consistency group. This parameter is reserved, because consistency groups are not supported currently. This field is supported by API versions from v2.31 to v2.42.
  project_id | String | Specifies the ID of the project to which the shared file system belongs.
  metadata | Object | Sets one or more metadata key and value pairs as a dictionary of strings. share_used is the key, and the corresponding value is the used capacity of the shared file system in the unit of Bytes.
  status | String | Specifies the status of the shared file system.
  task_state | String | Specifies the data migration status. This parameter is reserved, because data migration is not supported currently. This field is supported by API v2.5 and later versions.
  has_replicas | Boolean | Specifies whether replicas exist. This parameter is reserved, because replication is not supported currently. This field is supported by API versions from v2.11 to v2.42.
  replication_type | String | Specifies the replication type. This parameter is reserved, because replication is not supported currently. This field is supported by API versions from v2.11 to v2.42.
  description | String | Describes the shared file system.
  host | String | Specifies the name of the host. This field is visible only to the administrator.
  name | String | Specifies the name of the shared file system.
  created_at | String | Specifies the date and time stamp when the shared file system was created.
  access_rules_status | String | Specifies the configuration status of the access rule. Possible values are active (effective), error (configuration failed), and syncing (configuration in progress). This field is supported by API v2.10 and later versions.
  share_proto | String | Specifies the protocol for sharing file systems.
  share_type_name | String | Specifies the storage service type assigned for the shared file system, such as high-performance storage (composed of SSDs) and large-capacity storage (composed of SATA disks). This field is supported by API v2.6 and later versions.
  share_type | String | Specifies the ID of the share type.
  volume_type | String | Specifies the volume type. The definition of this parameter is the same as that of share_type.
  export_locations | Array | Lists the mount locations. Currently, only a single mount location is supported. This parameter exists only when X-Openstack-Manila-Api-Version specified in the request header is smaller than 2.9.
  export_location | String | Specifies the mount location. This parameter exists only when X-Openstack-Manila-Api-Version specified in the request header is smaller than 2.9.
  is_public | Boolean | Specifies the visibility level of the shared file system. If it is set to true, the file system can be seen publicly. If it is set to false, the file system can be seen privately. The default value is false.
  source_share_group_snapshot_member_id | String | Specifies the ID of the snapshot's source. This parameter is reserved, because consistency snapshots are not supported currently. This field is supported by API v2.31 and later versions.
  revert_to_snapshot_support | Boolean | Specifies whether rollback from snapshot is supported. This parameter is reserved, because snapshots are not supported currently. This field is supported by API v2.27 and later versions.
  create_share_from_snapshot_support | Boolean | Specifies whether creation of shared file systems from snapshot is supported. This parameter is reserved, because snapshots are not supported currently. This field is supported by API v2.24 and later versions.
  mount_snapshot_support | Boolean | Specifies whether snapshot mount is supported. This parameter is reserved, because snapshots are not supported currently. This field is supported by API v2.32 and later versions.
  user_id | String | Specifies the user ID. This field is supported by API v2.16 and later versions.

- Example response

      {
          "shares": [
              {
                  "links": [
                      {
                          "href": "https://192.168.170.97:8796/v2/61b01a94b84448cfac2424e46553d7e7/shares/54d0bac6-45c8-471c-bf0d-16ffd81ef88a",
                          "rel": "self"
                      },
                      {
                          "href": "https://192.168.170.97:8796/61b01a94b84448cfac2424e46553d7e7/shares/54d0bac6-45c8-471c-bf0d-16ffd81ef88a",
                          "rel": "bookmark"
                      }
                  ],
                  "export_location": "sfs.dong.com:/share-e1c2d35e",
                  "availability_zone": "az1.dc1",
                  "share_network_id": null,
                  "snapshot_id": null,
                  "id": "54d0bac6-45c8-471c-bf0d-16ffd81ef88a",
                  "size": 1,
                  "share_type": "default",
                  "share_group_id": null,
                  "project_id": "da0f615c35eb4d72812d1547a77b5394",
                  "metadata": {

                               "share_used": "1048576000000"
                   },
                  "status": "available",
                  "description": "test description",
                  "export_locations": ["sfs.dong.com:/share-e1c2d35e"],
                  "host": "DJ01@9656beb1-7ce2-4c46-9911-ecd51ab632bf#9656beb1-7ce2-4c46-9911-ecd51ab632bf",
                  "is_public": false,
                  "name": "cl01",
                  "created_at": "2017-07-07T03:15:06.858662",
                  "share_proto": "NFS",
                  "volume_type": "default"
              }
      ]
      }

#### 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 | Access to the requested page is forbidden.
  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.

Parent topic: File Sharing