You can resume a "dir" listing

If you stop a "dir" listing of an ObjectStore (NS4) storage group, you can resume it.

A response to this action may contain a large amount of entries. To limit excessive output, you can utilize the max_entries=[#] field in the action header for the call. Subsequently, the Akamai network may enforce a limit, based on various implementation-dependent factors. If the dir listing is not complete, a resume start is returned as the final item in the response output. It will be comprised of the next object in the list, and look similar to the following:

<stat directory="/[CP Code]/dir1/dir2/"> 
    ... [add'l response entries] 
    <file type="file" name="b.log"/> 
    <resume start="c.log">

The “resume start” can then be used in a subsequent dir action call to continue the response from where the previous request finished:

How to

  1. Define the Request Path using the same method (GET), and include the full path to the resume start object, minus the actual object (For example, [CP Code]/dir1/dir2/, using the example, above.)
  2. Include the start=[value] field in the action header and set the [value] variable to the object shown at the end of the resume start path. (Perform any necessary XML un-escaping and HTTP URL escaping in the process.)
  3. If you also included the prefix=[prefix] action header in the original request, also include it here, using the same [prefix] value.
    GET /[CP Code]/dir1/dir2/link2 HTTP/1.1 
    Host: [Domain Prefix] 
    X-Akamai-ACS-Action: version=1&action=dir&format=xml 
    [Recomputed Signature Headers]

What you should see

As a result, the dir listing will continue from the specified point, similar to the example that follows:

<stat directory="/[CP Code]/dir1/dir2/">
    <file type="symlink" name="[CP Code]/dir1/dir2/c.log"/> 
    <file type="file" name="[CP Code]/dir1/dir2/d.log" size="129444" md5="34e4e082ddbc76424d1e0ff08f485641" mtime="1371132700"/> 
    ... [add'l response entries] 

Next steps

You can include "max-entries=[#]" in a "dir" resume

Just like an initial call, you can include the max-entries=[#] field in the action header in a resumed dir, to limit resulting output. As a result, a new resume start is returned in the response. It could then be used to continue the dir, using the steps discussed above.

Note: Once a dir is initiated, it must run to fruition. If you anticipate a large number of records in the response, it is recommended that you include the max_entries=[#] field in the action header--both initially, as well as in subsequent “resumes”.