Create a log parser.
POST
/log_parsers/
const url = 'https://api.siteqwality.com/log_parsers/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","enabled":true,"priority":1,"detect_pattern":"example","source_filter":"example","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/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "enabled": true, "priority": 1, "detect_pattern": "example", "source_filter": "example", "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
name
required
string
description
string | null
enabled
boolean | null
priority
integer | null format: int32
detect_pattern
string | null
source_filter
string | null
parse_type
required
string
parse_config
field_mapping
Example generated
{ "name": "example", "description": "example", "enabled": true, "priority": 1, "detect_pattern": "example", "source_filter": "example", "parse_type": "example", "parse_config": "example", "field_mapping": "example"}Responses
Section titled “ Responses ”Log parser created
Invalid request body or parse type
Missing or invalid authentication
Internal server error