Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version method to API and call in OTXv2 init method #59

Open
chrisinmtown opened this issue Mar 26, 2021 · 1 comment
Open

Add version method to API and call in OTXv2 init method #59

chrisinmtown opened this issue Mar 26, 2021 · 1 comment

Comments

@chrisinmtown
Copy link

New feature request: please extend the API with a method to get the server's version. Also please consider invoking this method in the OTXv2 class init method and log the result at level debug.

In addition to yielding version details, this is a cheap way of testing if the API key is valid before trying to fetch data.

Thanks in advance for considering it.

@rustybrooks
Copy link
Contributor

What do you mean by "the server's version?"

/api/v1/user is a pretty cheap way to check the api key, it'll get "your" basic user data. I believe there's not a corresponding function for this in the SDK, the closest would be
get_user(YOUR_USERNAME, detailed=False)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants