Description
The addInitialProvision operation handles configuration related to InitialProvision model.
This API call is not allowed on the standby unit in an HA pair.
HTTP request
POST /api/fdm/v6/devices/default/action/provision
Data Parameters
Parameter | Required | Type | Description | |||
---|---|---|---|---|---|---|
acceptEULA | False | boolean | A boolean value that indicates whether the End User License Agreement is accepted. Specify one of the following values: [true, false]. | |||
eulaText | False | string | The text of End User License Agreement. | |||
currentPassword | False | string | The current password. It is only used when updating user password. If you need to change the admin password, the current password. You must also configure the new password. | |||
newPassword | False | string | The new password to use. It is only used when updating user password. If you need to change the admin password, the new password. You must also configure the current password. | |||
initialPasswordChangeRequired | False | boolean | A read only boolean value indicating whether password fields are required. Value 'true' denotes the password has not been changed from the factory default and you must specify a new password as well as the existing password. Value 'false' denotes the default password was already changed and the current and new password fields are optional. | |||
type | True | string | A UTF8 string, all letters lower-case, that represents the class-type. This corresponds to the class name. |
Example
curl -X POST \
--header "Accept: application/json" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"acceptEULA": true,
"currentPassword": "string",
"eulaText": "string",
"id": "string",
"initialPasswordChangeRequired": true,
"newPassword": "string",
"type": "initialprovision",
"version": "string"
}' \
"https://${HOST}:${PORT}/api/fdm/v6/devices/default/action/provision"
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_initial_provision(client, body):
return client.InitialProvision.addInitialProvision(
body=body
).response().result
if __name__ == "__main__":
host = "ftd.example.com"
token = "access_token"
client = get_client(host, token)
body = {'acceptEULA': True,
'currentPassword': 'string',
'eulaText': 'string',
'initialPasswordChangeRequired': True,
'newPassword': 'string',
'type': 'initialprovision'}
add_initial_provision(client, body)