Closed
Description
Description
rules_config.unset
does not work. It returns a 404 for a known existing key. I believe this is because the key
param is being passed to the auth0 api as a query param when it should be a path param according to the docs.
https://auth0.com/docs/api/management/v2#!/Rules_Configs/delete_rules_configs_by_key
Prerequisites
- I have checked the README documentation.
- I have checked the Auth0 Community for related posts.
- I have checked for related or duplicate Issues and PRs.
- I have read the Auth0 general contribution guidelines.
- I have read the Auth0 Code of Conduct.
- I am reporting this to the correct repository.
Environment
- auth0-python 3.7.2
- python 3.7.0
Reproduction
Code Sample:
from auth0.v3.authentication import GetToken
from auth0.v3.management import Auth0
get_token = GetToken('xxx.auth0.com')
mgmt_api_token = get_token.client_credentials('xxx',
'xxx', 'https://{}/api/v2/'.format('xxx.auth0.com'))
auth0 = Auth0('xxx.auth0.com', mgmt_api_token['access_token'])
key_name = 'FOO'
auth0.rules_configs.set(key_name, 'BAR')
rules_configs = auth0.rules_configs.all()
print(rules_configs)
auth0.rules_configs.unset(key_name)
Output:
[{'key': 'FOO'}]
Traceback (most recent call last):
File "<input>", line 13, in <module>
File "/Users/jhunken/.pyenv/versions/securityPlatform-3.5.3/lib/python3.5/site-packages/auth0/v3/management/rules_configs.py", line 45, in unset
return self.client.delete(self._url(), params=params)
File "/Users/jhunken/.pyenv/versions/securityPlatform-3.5.3/lib/python3.5/site-packages/auth0/v3/management/rest.py", line 75, in delete
return self._process_response(response)
File "/Users/jhunken/.pyenv/versions/securityPlatform-3.5.3/lib/python3.5/site-packages/auth0/v3/management/rest.py", line 78, in _process_response
return self._parse(response).content()
File "/Users/jhunken/.pyenv/versions/securityPlatform-3.5.3/lib/python3.5/site-packages/auth0/v3/management/rest.py", line 98, in content
message=self._error_message())
auth0.v3.exceptions.Auth0Error: 404: Not Found
Metadata
Metadata
Assignees
Labels
No labels