Workload Settings
This Public Stable API allows you to get network interface information from a workload, for either all interfaces on a workload or an individual interface. You can also configure (create) or delete an individual network interface configuration.
There are two APIs for configuring agent timeout notifications:
GET /api/v2/orgs/:xorg_id/settings/workloads
and
PUT /api/v2/orgs/:xorg_id/settings/workloads
Get Workload Settings
Parameters for GET
Parameter | Description | Type | Required |
|---|---|---|---|
| Organization | Integer | Yes |
| Shows the state of the workload timeout notification threshold | No | |
| Shows the state of the workload timeout notification threshold | No |
If the VEN doesn't send a heartbeat to the PCE within the value specified in workload_disconnected_timeout_seconds, the workload associated with the VEN is considered to be offline.
If the VEN goes down, it sends a goodbye message to the PCE. The PCE then waits for the value set in workload_goodbye_timeout_seconds before setting the workload to offline.
To disable workload_disconnected_timeout_seconds or workload_goodbye_timeout_seconds, set the its value to -1.
Two properties, info and error, are used to to display state of workload timeout notification thresholds. They are provided to assist customers who want a control when they will get alerted about missing agents, and also that such a control be separate from the policy offline timer. Therefore, these properties are useful when a customer has a relatively high offline timer and short warning threshold.
Using info and error, customers can set explicit thresholds and configure when a warning is sent as well as its severity.
Example of a CURL command for GET /api/v2/orgs/:xorg_id/settings/workloads
curl -X GET \
-u api_13468b9c1eb030e6a:4d664456bb8893ee9ba013356887a1993b74870b0bb7f09ab3a84b61e8300022 \
-s \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
https://test.lab.io:8443/api/v2/orgs/1/settings/workloads | python -m json.tool
{
"href": "/orgs/1/settings/workloads",
"workload_disconnected_notification_seconds": [
{
"error": 2700,
"info": 900,
"scope": [],
"warning": 1800
}
],
"workload_disconnected_timeout_seconds": [
{
"scope": [],
"value": 3600
}
],
"workload_goodbye_timeout_seconds": [
{
"scope": [],
"value": 900
}
]
}Update Workload Settings
This API updates workload settings.
Parameters for PUT
Parameter | Description | Type | Required |
|---|---|---|---|
| Organization | Integer | Yes |
| Scope | Object | Yes |
| Label URI | String | Yes |
| Property value associated with the scope | Integer | Yes |
| Assigned labels Label URI Property value associated with the scope | Object String Integer | Yes Yes Yes |
| none | Object | No |
| Shows the state of workload timeout notification threshold | No | |
| Shows the state of workload timeout notification threshold | No |
Example JSON Request Body to Update Both Workload Settings
{
"workload_disconnected_timeout_seconds": [
{
"scope": [ ], # Empty scope is the default. Each setting must have a default.
"value": 3600 # customer-supplied default
}
],
"workload_goodbye_timeout_seconds": [
{
"scope": [
{ "href": "/api/v2/orgs/1/labels/1" },
{ "href": "/api/v2/orgs/1/labels/3" }
],
"value": 1800
},
{
"scope": [
{ "href": "/api/v2/orgs/1/labels/2" },
{ "href": "/api/v2/orgs/1/labels/4" }
],
"value": 60
},
{
"scope": [ ], # Empty scope is the default. Each setting must have a default.
"value": 0 # customer-supplied default
}
]
}Example JSON Request Body to Update One Workload Setting
{
"workload_goodbye_timeout_seconds": [
{
"scope": [
{ "href": "/api/v2/orgs/1/labels/2" },
{ "href": "/api/v2/orgs/1/labels/4" }
],
"value": 120
},
{
"scope": [ ], # Empty scope is the default. Each setting must have a default.
"value": 0 # customer-supplied default.
}
]
}