Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

PowerScale OneFS API Reference

PDF

Query an object

Query objects by system-defined and user-defined attributes in a directory.

Request syntax

POST /namespace/<access_point>/<container_path>?query[&<query_param>] HTTP/1.1
Host <hostname>[:<port>]
Date: <date>
Authorization: <signature>

[JSON BODY]

Request query parameters

The query_param argument is optional and can be one or more of the parameters in the following table, which is separated by an “&.”

Parameter Name Description Default Type Required
limit Specifies the maximum number of objects to send to the client. You can set the value to a negative number to retrieve all objects. 1000 String No
detail Specifies which object attributes are displayed. If the detail parameter is excluded, only the name of the object is returned. If the detail parameter is set to yes, then system information such as name, owner, group, mode, and size is returned.

You can specify multiple attribute names in CSV format. For example:

detail=size,container,content_type				 

If you set this value to default, the following attributes are included: name, size, owner, last_modified, type, group, and mode.

No String No
max-depth Specifies the maximum directory level depth to search for objects. If set to 0, only the specified directory is searched for objects. If set to -1, the entire hierarchy below the specified directory is searched for objects. 0 String No

Request headers

This call sends common request headers.

Response headers

This call returns common response headers.

Response body

An array of the objects that match the query filter criteria are returned in the JSON body.

Example request

POST /namespace/ifs/my_folder/?query HTTP/1.1
Host my_cluster:8080
Date: <date>
Authorization: <signature>

{
   "result":[
      "name",
      "size",
      "last_modified",
      "container_path",
      "user.color",
      "content_type"
   ],
   "scope":{
      "logic":"and",
      "conditions":[
         {
            "operator":">=",
            "attr":"last_modified",
            "value":"Thu, 15 Dec 2011 06:41:04"
         },
         {
            "operator":"like",
            "attr":"name",
            "value":"ta.*"
         }
      ]
   }
}

Example response

{
    "children" :
     [
          {
                 "content_type " : "text/plain; charset=UTF-8",
                 "container_path" : "/ifs/movie",
                 "last_modified" : "Thu, 05 Jan 2012 04:29:56 GMT",
                 "name" : "fantasy",
                  "size" : 56
             },
             {
                   "content_type " : "text/plain; charset=UTF-8",
                   "container_path" : "/ifs/folder",
                   "last_modified" : "Thu, 15 Dec 2011 06:41:04 GMT",
                   "name" : "tar",
                    "size" : 3359,
                    "user.color" : "green"
                }
     ]
}

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\