Test a log parser configuration against a sample log line.
POST
/log_parsers/test
const url = 'https://api.siteqwality.com/log_parsers/test';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sample":"example","parser_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","parse_type":"example","parse_config":"example","field_mapping":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/log_parsers/test \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sample": "example", "parser_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parse_type": "example", "parse_config": "example", "field_mapping": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
sample
required
string
parser_id
string | null format: uuid
parse_type
string | null
parse_config
field_mapping
Example generated
{ "sample": "example", "parser_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parse_type": "example", "parse_config": "example", "field_mapping": "example"}Responses
Section titled “ Responses ”Parse result
Media type application/json
object
matched
required
boolean
extracted_fields
required
mapped_fields
required
parse_type
required
string
error
string | null
Example generated
{ "matched": true, "extracted_fields": "example", "mapped_fields": "example", "parse_type": "example", "error": "example"}Invalid parse type or sample
Missing or invalid authentication
Internal server error