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

Update Configuration API #24

Closed
ryuuji5 opened this issue Feb 5, 2018 · 5 comments
Closed

Update Configuration API #24

ryuuji5 opened this issue Feb 5, 2018 · 5 comments

Comments

@ryuuji5
Copy link

ryuuji5 commented Feb 5, 2018

Thank you for helping me for creating access token.

By the way, I also want to use update configuration API like below.
https://api.mattermost.com/#tag/system%2Fpaths%2F~1config%2Fget

According to the documentation, update_conf API needs argument including new configuration(json type).

But, it looks like that your "update_configuration" fuction doesn't have any argument.
How to use it ??

def update_configuration(self):
return self.client.put(
'/config'
)

Thank you.

@Vaelor
Copy link
Owner

Vaelor commented Feb 6, 2018

Damn, you found another bug... :-D
Will be fixed today, sorry for the inconvenience!

@Vaelor
Copy link
Owner

Vaelor commented Feb 7, 2018

Currently unsure, the mattermost API is missing a parameter there itself. I assume they want a whole config as json there. Can't guarantee that though, but will make a commit later to try and fix that.

@ryuuji5
Copy link
Author

ryuuji5 commented Feb 8, 2018

Yes. The document shows example only about Go.

I tried to use API manually, and it worked!! Like this.

config_content = get config somehow (load conf.json or use get configuration API)

request.put(

    MattermostURL/api/v4/config

    headers = {"Authorization": "Bearer {token:s}".format(token=foo.client.token)},

    cookies = foo.client.cookies,

    json = config_content

)

Please reference it : )

Vaelor added a commit that referenced this issue Feb 8, 2018
@Vaelor
Copy link
Owner

Vaelor commented Feb 8, 2018

Thank you so much for trying that out!
I just uploaded a 4.3.2 version which takes options (the config_content)
I probably should rename options to json someday... :-D Somehow that sounds more clear.

Well, thanks :-) Let me know if you have any other issues, I am glad if someone reports the bugs :-)

@ryuuji5
Copy link
Author

ryuuji5 commented Feb 9, 2018

Thank you for your fixing quickly!!

I want to help you by sending pull request. But I cannot do this because of my company circumstances actually... : (

I hope this driver to be a good one : )
If I can, I will make some commitment in my house : )

thank you.

@ryuuji5 ryuuji5 closed this as completed Feb 14, 2018
Vaelor added a commit that referenced this issue Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants