The flow of a typical request
These steps that follow detail the flow of a request and how it is handled for an API call.
Where a "Requirement" is listed, this is an activity that you must perform in the call itself, or prior to the call, when configuring the applicable header.
- The X-Akamai-ACS-Action
("action") header is located.
- If this header is missing: The request is not an API request. It may, however, still be a valid request that can be served.
- If this header is present: The request is handled by the API, as either a valid operation or an error.
- The action header is parsed using
standard “query string” parsing rules.Note: Query string syntax already supports escaping arbitrary characters. Use care to escape at least spaces (" "), equal signs ("="), plus signs ("+"), and ampersands ("&") in any values you generate.
- The version is verified. The header
must contain a
versionaction header field, and its value must be set to
1, otherwise the request will fail.
- Requirement: Any
legacy headers are denied. Unexpected
X-Akamai-*headers may result in the request being denied to avoid potentially incorrect or ambiguous behavior from other APIs that may be, or may have been supported by the recipient servers. Below is an example of the appropriate syntax, using the
PUT /[CP Code]/[path]/[file.ext] HTTP/1.1 Host: example-nsu.akamaihd.net X-Akamai-ACS-Action: version=1&action=upload&md5=0123456789abcdef01234 56789abcdef&mtime=1260000000 [Signature Header 1] [Signature Header 2] [PUT body]
- Requirement: Any legacy headers are denied. Unexpected
- The request URL is checked for validity according to normal NetStorage rules.
- Requirement: This URL
should begin with the same
[CP Code]root that you use with other NetStorage protocols to target the associated storage group. The URL will name the file or directory that will be queried or modified in this request.
- Requirement: This URL should begin with the same
- The header field
actionis reviewed to determine the appropriate operation.
- Requirement: A
supported “Action” must be defined in the context of the
X-Akamai-ACS-Actionheader. This includes the various actions discussed throughout this documentation. (For example,
listare supported actions.) Only the actions discussed in this documentation are valid; anything else will return an error.
- Requirement: A supported “Action” must be defined in the context of the
- The validity of the Signature Header Authentication in the
X-Akamai-ACS-Auth-Signheaders is verified.
- The defined action is processed.