-
Hi,
I'm trying to use the client but have some question, need some help.
My goal is to grab all the last events, login..., from a specific user based on his email by example.So if we take this for example:
response, errors, err := client.SearchEventLogs()the module explaintion gove me that:
func (*fusionauth.FusionAuthClient).SearchEventLogs(request fusionauth.EventLogSearchRequest) (*fusionauth.EventLogSearchResponse, *fusionauth.Errors, error) SearchEventLogs Searches the event logs with the specified criteria and pagination. EventLogSearchRequest request The search criteria and pagination information. (fusionauth.FusionAuthClient).SearchEventLogs on pkg.go.devbut what is the function input ?? What does refer the struct linked to request fusionauth.EventLogSearchRequest ?
Ty,
Adrien_This was pulled over from https://github.com/FusionAuth/go-client/issues/66_
-
In general, you'll use the JSON defined in the API documentation to build the request. Unfortunately, the Search Event Logs API doc doesn't have sample JSON (I filed an issue) but it does have the fields: https://fusionauth.io/docs/v1/tech/apis/event-logs#search-event-logs
You can also find the
EventLogSearchRequestin the client code:https://github.com/FusionAuth/go-client/blob/master/pkg/fusionauth/Domain.go#L1545
This points at https://github.com/FusionAuth/go-client/blob/master/pkg/fusionauth/Domain.go#L1534
However, I'm not sure searching event logs gets you what you are trying to accomplish:
My goal is to grab all the last events, login..., from a specific user based on his email by example.
You probably want to search login records: https://fusionauth.io/docs/v1/tech/apis/login#search-login-records
https://github.com/FusionAuth/go-client/blob/master/pkg/fusionauth/Domain.go#L3145
https://github.com/FusionAuth/go-client/blob/master/pkg/fusionauth/Domain.go#L3134
-
D dan moved this topic from Q&A on
-
D dan moved this topic from Frequently Asked Questions (FAQ) on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login