Description
The addJoinHAStatus operation handles configuration related to JoinHAStatus model. This API call is not allowed on the standby unit in an HA pair.
HTTP request
POST /api/fdm/v3/devices/default/action/ha/join
Data Parameters
| Parameter | Required | Type | Description | ||
|---|---|---|---|---|---|
| statusMessage | False | string | A string that contains all deployment status messages | ||
| cliErrorMessage | False | string | An error message returned from the configuration CLI. | ||
| state | False | string | The current deployment state. | ||
| queuedTime | False | integer | The time in milliseconds (UNIX Epoch Time) when the deployment was scheduled. | ||
| startTime | False | integer | The time in millisecond (UNIX Epoch time) when the deployment was started | ||
| endTime | False | integer | The time in milliseconds (UNIX Epoch Time) when the deployment completed. | ||
| statusMessages | False | [string] | A list of messages that show deployment status. | ||
| name | False | string | Field level constraints: length must be between 0 and 128 (inclusive), must match pattern (^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][ a-zA-Z0-9.()+-]*[a-zA-Z0-9.+-]$). (Note: Additional constraints might exist) |
||
| modifiedObjects | False | object | The modified objects in this deployment | ||
Example
curl -X POST \
--header "Accept: application/json" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"cliErrorMessage": "string",
"endTime": 0,
"id": "string",
"modifiedObjects": {},
"name": "string",
"queuedTime": 0,
"startTime": 0,
"state": "QUEUED",
"statusMessage": "string",
"statusMessages": []
}' \
"https://${HOST}:${PORT}/api/fdm/v3/devices/default/action/ha/join"
from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient
def get_client(host, token):
http_client = RequestsClient()
http_client.ssl_verify = False
http_client.set_api_key(
host,
"Bearer {}".format(token),
param_name="Authorization",
param_in="header"
)
return SwaggerClient.from_url(
"https://{}/apispec/ngfw.json".format(host),
http_client=http_client,
config={
"validate_responses": False,
"validate_swagger_spec": False
}
)
def add_join_ha_status(client, body):
return client.JoinHAStatus.addJoinHAStatus(
body=body
).response().result
if __name__ == "__main__":
host = "ftd.example.com"
token = "access_token"
client = get_client(host, token)
body = {'cliErrorMessage': 'string',
'endTime': 0,
'modifiedObjects': {},
'name': 'string',
'queuedTime': 0,
'startTime': 0,
'state': 'QUEUED',
'statusMessage': 'string',
'statusMessages': []}
add_join_ha_status(client, body)