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 status code for v1 API disabled #153

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

andrea-hw
Copy link
Contributor

No description provided.

Copy link

Visit the preview URL for this PR (updated for commit 48789c1):

https://hw-api-documentation--pr153-fix-status-code-disa-59ztiqsl.web.app

(expires Tue, 21 Jan 2025 10:10:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4accc1c887f1346ec9c563d5645c74c94f610c07

@DCSBL DCSBL changed the title update status code for v1 api disabled Update status code for v1 API disabled Jan 14, 2025
Copy link
Contributor

@DCSBL DCSBL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you double check this with 5.19? Both status codes should match, if not that would be a bug in 6.x instead of incorrect documentation.

@andrea-hw
Copy link
Contributor Author

Can you double check this with 5.19? Both status codes should match, if not that would be a bug in 6.x instead of incorrect documentation.

It's 403 in 5.19 as well:

>>> response = requests.get(f"http://192.168.0.100/api")
>>> response.json()
{'product_name': 'P1 Meter', 'product_type': 'HWE-P1', 'serial': '5c2faf1a4840', 'firmware_version': '5.19', 'api_version': 'v1'}
>>> response = requests.get(f"http://192.168.0.100/api")
>>> response.json()
{'error': {'description': 'API not enabled', 'id': 202}}
>>> response.status_code
403

Copy link
Contributor

@DCSBL DCSBL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@DCSBL DCSBL merged commit a342428 into main Jan 14, 2025
8 checks passed
@DCSBL DCSBL deleted the fix/status-code-disabled-v1-api branch January 14, 2025 14:18
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

Successfully merging this pull request may close these issues.

2 participants