Use this action to list the objects directly within the specified directory, similar to a standard ls or dir command.

Recipes
List content in a directory
Open Recipe
Path Params
integer
required

The unique CP code that represents the root directory in the applicable NetStorage storage group.

Learn more about CP codes.

string
required

If applicable, any additional sub-directories that exist within the path to the desired file or symbolic link.

Headers
string
required

Form the header value as a query parameter string with these fields:

  • version=1. This value is constant.
  • action=list. This is the action for this API operation.

Optional parameters
You can append these optional parameters to the end of the header, prefaced by an ampersand ("&").

  • encoding=utf-8. Request the response in UTF-8 encoding.
  • mtime_all=yes. Request the modification time on all objects within the response.
  • max_entries=#. Set a limit on the number of entries returned.
  • end=[path/dir0]. Include a complete path to the last object to return in the list response. All other objects that exist after the noted path are left out of the response. The zero 0 character exists in place of the trailing slash to accommodate NetStorage directory logic. As a result, the list will display everything up to, and including the last object in the path-and possibly a path named "[path]0" if one exists.
string
required

This required header is referred to as [signature header 1].

X-Akamai-ACS-Auth-Data: [version], [0.0.0.0], [0.0.0.0], [current epoch time], [unique-number-id], [uploadAccountId]

  • [version]. Indicate your authentication encryption format.
  • [0.0.0.0]. This is a reserved field you specify as 0.0.0.0.
  • [current epoch time]. This is the time of your API client within one (1) minute of the current time.
  • [unique-number-id]. A random numeric ID your client creates to guarantee uniqueness to support multiple requests.
  • [uploadAccountId]. The name of an upload account with access to the target storage group.

Learn more about the "X-Akamai-ACS-Auth-Data" authentication header.

string
required

This required header is referred to as [signature header 2]. It's a Base64-encoded-signature comprised of HMAC-SHA256([key], [data] + [sign-string]).

Learn more about the "X-Akamai-ACS-Auth-Sign" authentication header.

string
required

This is your full NetStorage Usage API connection hostname.

Responses

Response body
object
file
array of objects
file
object
string

What type of object this is.

file dir symlink

string

Full name of the object, if it can be expressed in the encoding= parameter requested in the X-Akamai-ACS-Action HTTP request header. If type=dir, does include the trailing slash.

string

The base64 encoded name of the object relative to the requested path, if it cannot be expressed in the encoding= parameter requested in the X-Akamai-ACS-Action HTTP request header. If present, name will not be present.

int32

Modification time of the object, in seconds since January 1, 1970.

uint64

If type=file, the size of the object in bytes.

string

If type=file, the MD5 hash of the file contents.

string

If type=symlink, and the target of the symbolic link can be expressed in the requested character encoding, the target of the link.

string

If type=symlink, and the target of the symbolic link cannot be expressed in the requested character encoding, the target of the link encoded in base64.

resume
object
string

The string to pass as the start= parameter of the X-Akamai-ACS-Action HTTP request header to resume this directory listing, if that string is legal in the encoding= parameter requested in the X-Akamai-ACS-Action HTTP request header.

string

The string to pass as the start= parameter of the X-Akamai-ACS-Action HTTP request header to resume this directory listing. This replaces start in cases where the value is not legal in the encoding= parameter requested in the X-Akamai-ACS-Action HTTP request header.

400

Malformed request, such as an illegal combination of parameters in the X-Akamai-ACS-Action request header. There may be more information in the response body, represented as unstructured text.

403

Forbidden operation, such as an action=stat in the HTTP PUT request, or an authentication or authorization error. There may be more information in the response body, represented as unstructured text.

404

Not found. The object referenced by action=stat does not exist.

500

Internal server error. There will be more information in the response body, represented as unstructured text.

Language
Authentication
URL