Getting different results in Postman and Cribl Rest Collector for the Cribl API
Trying to hit the Cribl APi in postman and successfully able to get the output but while hitting the API with same configurations in the Cribl Rest collector it gives status code 400, any reason?
Answers
-
Can you share more of what you're doing?
0 -
How have you configured the REST collector?
0 -
Trying to create google pub/sub source with Cribl API via Cribl rest collector
0 -
Can you share a screenshot of your config?
0 -
Have passed the /system/input endpoint in the collect url and given the json payload in post body and given the cribl bearer token in authorization
0 -
Make sure you're sending a POST and that you've also set the `Content-Type: application/json` header. 400 means bad method/input.
0 -
Sure
0 -
What's in the POST body?
0 -
0
-
FYI that's a Javascript field so you might be sending "undefined" as the payload instead of your intended JSON
0 -
The whole payload with type= google_pubsub
0 -
Also, make sure you add all the required elements: https://docs.cribl.io/api -> schemas -> InputGooglePubsub
0 -
Make sure you put quotes around the entire POST body to send it correctly
0 -
Is this a standalone instance or Leader you're working with?
0 -
<@U01J549PR6Y> <@U01LSBF5953> Thanks!! but am still unable to do so
0 -
<@U01LSBF5953> It's a standalone instance
0 -
<@U01LSBF5953> One more addtional question Is it possible to use Oauth2.0 in custom collector ?
0 -
Hey <@U01LSBF5953> This is interesting :thinking_face: the grant type I'm having troubles with is ‘password credentials' which requires a username and password. I'm assuming that's not supported doing the method above right?
0 -
Yes, OAuth2 (client_credentials flow) is supported for authentication.
0