Configuration endpoint descriptions

Manage configuration files and settings.

Usage details

Validation of a configuration file using the btool REST API

Use the btool REST API to securely validate configuration changes in Splunk Cloud Platform without CLI access. For more information, see Validating configurations using the btool REST API.

properties/{config_file}

JSON
https://<host>:<mPort>/services/properties/{config_file}?validate=true

Validate a configuration file using the btool REST API.

Validation requests require the POST method.

Authorization

Requires capability-based authorization.

POST

Add a name of the configuration file to validate in {config_file}.

Request parameters

Name Type Description
validate=true

Boolean

Must have a value of true for the request to validate the configuration file.

Request body

Configuration content to validate in plain text. Maximum size: 100 MB.

Returned values

Returns the data in JSON format.

Field Type Description
validation_status String

Returns success if validation passed, or failed if validation failed.

success correspond to the status code 200

failed correspond to the status code 400

config_type String The configuration file type
content_size String Size of uploaded content in bytes
error_count String If validation fails, returns the number of validation errors
errors Array If validation fails, returns detailed error messages

Example request and response for validation

XML Request
CODE
curl -k -u admin:pass -X POST --data-binary @<config_file>.conf https://localhost:8089/services/properties/<config_file>?validate=true

XML Response

Success response:
JSON
{ "validation_status": "success", "config_type": "inputs", "content_size": "1024" }
Failed response:
JSON
{ "validation_status": "failed", "config_type": "inputs", "content_size": "1024", "error_count": "3", "errors": ["Line 5: Invalid stanza", "Line 10: Missing required field", ...] }