How do I format an API call?

Call formatting follows a specific structure:

[Method] /[Path] HTTP/1.1
Host: [Connection Hostname]
[Action Header]
[Signature Header 1]
[Signature Header 2]

[Body (if applicable)]

Each line in the example above reflects content that must exist on its own line in the request, Variable values are as follows:

  • Line 1: The Request Path: This includes the applicable [Method] required for the action, the /[Path] to the desired destination in NetStorage (originating with the Content Provider (CP) code value that serves as the root of the target storage group), and finally the HTTP version (HTTP 1.1).
  • Line 2: The [Connection Hostname]: Include Host: followed by your unique NetStorage HTTP API domain name. (This value is also referred to as your Connection Hostname.)
  • Line 3: The [Action Header]: This is the applicable X-Akamai-ACS-Action header formatted for the desired call. Individual, per-call usage requirements can be found in the description of the specific action.
  • Line 4 and Line 5: The [Signature Header] Lines: Two separate headers used to authenticate and authorize each call made to the API.
  • Line 6: Empty: This is an empty line.
  • Line 7: The [Body]: If the call uses a PUT or POST Method, the applicable [Body] component is required.
Note: Lines 6 and 7 are not required if the call uses a method other than PUT or POST. Please see the specific description of the call for more details.