Deploy Hello World

Now that you've created the code bundle in the previous step, you can use HTTPie and httpie-edgegrid to access the ​Akamai​ APIs.

Add an EdgeWorker version

  1. Add a new version to the Hello World EdgeWorker ID.
cat <edgeworker code bundle> | http --timeout=30 --auth-type edgegrid -a <API credentials section>: POST :/edgeworkers/v1/ids/<edgeWorkerId>/versions Content-Type:application/gzip
  • Replace <edgeWorkerId> with the ID of your Hello World EdgeWorker.

  • Replace <edgeworker code bundle> with the filename and path to the Hello World code bundle.

  1. Issue this API request to verify that the EdgeWorker version was created:
http --timeout=30 --auth-type edgegrid -a <API credentials section>: POST :/edgeworkers/v1/ids/<edgeWorkerId>/activations network=<network> version=<version>
  • Replace <edgeWorkerId> with the ID of your Hello World EdgeWorker.

  • Replace <network> with STAGING.

  • Replace <version> with the version number of your Hello World EdgeWorker ID.

Activate the EdgeWorker version

  1. Activate the EdgeWorker version on the ​Akamai​ network. Note the activationId. You'll need it to monitor the activation status.
http --timeout=30 --auth-type edgegrid -a <API credentials section>: POST :/edgeworkers/v1/ids/<edgeWorkerId>/activations network=<network> version=<version>
  • Replace <edgeWorkerId> with the ID of your Hello World EdgeWorker.

  • Replace <network> with STAGING.

  • Replace <version> with the version number of your Hello World EdgeWorker ID.

  1. To monitor the activation of the EdgeWorker version, try issuing this API request.
http --timeout=30 --auth-type edgegrid -a <API credentials section>: GET :/edgeworkers/v1/ids/<edgeWorkerId>/activations/<activationId>
  • Replace <edgeWorkerId> with the ID of your Hello World EdgeWorker.

  • Replace <activationId> with the activation response.

    The activationId was provided in the previous step when the EdgeWorker ID was activated.

  1. Next, follow these instructions to test the Hello World code bundle.

Did this page help you?