Hello,
I want to sent post request to my graylog server for extractors. like below:
curl -X "POST" "https://localhost:9000/api/system/inputs/INPUTID/extractors" \
-H 'X-Requested-By: admin' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-u 'admin:PASSWORD' \
-d $'{"title":"title","cut_or_copy":"copy","source_field":"message","target_field":"action","extractor_type":"regex","extractor_config":{"regex_value":" R:(\\S) "},"converters":{},"condition_type":"regex","condition_value":"value"}'
or with token like this:
curl -u \
MYUSERTOKEN:token \
-H 'X-Requested-By: MYUSER Accept: application/json' \
-X POST 'https://localhost:9000/api/system/inputs/INPUTID/extractors' \
-d '{"title":"title","cut_or_copy":"copy","source_field":"message","target_field":"action","extractor_type":"regex","extractor_config":{"regex_value":" R:(\\S) "},"converters":{},"condition_type":"regex","condition_value":"value"}'
But are not working. Sent 415 error like belowe:
{"type":"ApiError","message":"HTTP 415 Unsupported Media Type"}
How can i do, result this problem/error?