To run an edge service, make the following POST request with the request body parameters:
Name | Type | Required or optional | Description |
---|---|---|---|
name | string | Required | Name of your service. |
services | object | Required | Podspec for your service. |
networks | array | Required | Network to which this service will connect. |
node_id | string | Required | ID of your Edge Node where this service will run. |
curl -X POST \
-H 'X-API-KEY:<your_api_key>' \
-H "Content-type:application/json" \
-d '{"name":"<your_service_name>", \
"services":[<your_service_podspec>], \
"networks":[{"network_id":"<your_edge_inode_network_id>","ip_address":""}], \
"node_id":"<your_edge_inode_id>"}' \
'https://<your_company>.manage.iotium.io/api/v1/service' \
| jq '{pod_id:.id, name:.name}'
The response includes the name and ID of the service:
{
"pod_id": "<your_service_id>",
"name": "<your_service_name>"
}
To run an edge service attached to multiple networks, make the following request:
curl -X POST \
-H 'X-API-KEY:<your_api_key>' \
-H "Content-type:application/json" \
-d '{"name":"<your_service_name>", \
"services":[<your_service_podspec>], \
"networks":[{"network_id":"<your_edge_inode_network_id_1>","ip_address":""}, {"network_id":"<your_edge_inode_network_id_2>","ip_address":""},
{"network_id":"<your_edge_inode_network_id_3>","ip_address":""}], \
"node_id":"<your_edge_inode_id>"}' \
'https://<your_company>.manage.iotium.io/api/v1/service' \
| jq '{pod_id:.id, name:.name}'
The response includes the name and ID of the service:
{
"pod_id": "<your_service_id>",
"name": "<your_service_name>"
}