dir action

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

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

Include the dir action as a base parameter with any of the provided examples for expanded use.

  • version=1. This value is constant.
  • action=dir. This is the base 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.
  • max_entries=#. Set a limit on the number of entries returned.
  • prefix=[value]. Only list files whose names begins with the specified prefix.
  • start=[path/dir0]. Start with the first file in the directory whose name is greater than or equal to this value. This value is appended to the prefix if that field is also included.
  • 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.

Learn more about the dir action.

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

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.

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!