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
- Add a new version to the Hello World EdgeWorker ID.
[block:code]
{
"codes": [
{
"code": "cat | http --timeout=30 --auth-type edgegrid -a : POST :/edgeworkers/v1/ids//versions Content-Type:application/gzip",
"language": "shell"
}
]
}
[/block]
-
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.
- Issue this API request to verify that the EdgeWorker version was created:
[block:code]
{
"codes": [
{
"code": "http --timeout=30 --auth-type edgegrid -a : POST :/edgeworkers/v1/ids//activations network= version=",
"language": "shell"
}
]
}
[/block]
-
Replace
<edgeWorkerId>with the ID of your Hello World EdgeWorker. -
Replace
<network>withSTAGING. -
Replace
<version>with the version number of your Hello World EdgeWorker ID.
Activate the EdgeWorker version
- Activate the EdgeWorker version on the Akamai network. Note the
activationId. You'll need it to monitor the activation status.
[block:code]
{
"codes": [
{
"code": "http --timeout=30 --auth-type edgegrid -a : POST :/edgeworkers/v1/ids//activations network= version=",
"language": "shell"
}
]
}
[/block]
-
Replace
<edgeWorkerId>with the ID of your Hello World EdgeWorker. -
Replace
<network>withSTAGING. -
Replace
<version>with the version number of your Hello World EdgeWorker ID.
- To monitor the activation of the EdgeWorker version, try issuing this API request.
[block:code]
{
"codes": [
{
"code": "http --timeout=30 --auth-type edgegrid -a : GET :/edgeworkers/v1/ids//activations/ ",
"language": "shell"
}
]
}
[/block]
-
Replace
<edgeWorkerId>with the ID of your Hello World EdgeWorker. -
Replace
<activationId>with the activation response.The
activationIdwas provided in the previous step when the EdgeWorker ID was activated.
- Next, follow these instructions to test the Hello World code bundle.
Updated about 4 years ago
