Collect all API endpoint and their response, depending on the interaction
Opened this issue · 1 comments
Collect all API endpoints, and their response (status code and message), depending on the passed parameters.
Requirements
ACTIONS
0. Pre-Requisites
1. Research
- [ ]
2. Plan
- Define requirements
API
when api endpoint available, it works with and without v1/
f"{BASE_URL}/api/" endpoint not available
f"{BASE_URL}/api/v1" endpoint not available
f"{BASE_URL}/api/info" endpoint not available
f"{BASE_URL}/api/v1/info" endpoint not available
f"{BASE_URL}/api/info/metrics" endpoint not available
f"{BASE_URL}/api/v1/info/metrics" endpoint not available
- urls werden auch nicht forwarded. also ohne v1/ wird nicht zu v1/ forwarded.
http://localhost:8085/api/
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
http://localhost:8085/api/v1/
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
http://localhost:8085/api/dataverses/1
{'status': 'OK', 'data': {'id': 1, 'alias': 'root', 'name': 'Root', 'dataverseContacts': [{'displayOrder': 0, 'contactEmail': 'root@mailinator.com'}], 'permissionRoot': True, 'description': 'The root dataverse.', 'dataverseType': 'UNCATEGORIZED', 'creationDate': '2020-01-07T00:33:54Z'}}
http://localhost:8085/api/v1/dataverses/1
{'status': 'OK', 'data': {'id': 1, 'alias': 'root', 'name': 'Root', 'dataverseContacts': [{'displayOrder': 0, 'contactEmail': 'root@mailinator.com'}], 'permissionRoot': True, 'description': 'The root dataverse.', 'dataverseType': 'UNCATEGORIZED', 'creationDate': '2020-01-07T00:33:54Z'}}
http://localhost:8085/api/info
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/info' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
http://localhost:8085/api/v1/info
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/info' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
http://localhost:8085/api/info/metrics
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/info/metrics' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
http://localhost:8085/api/v1/info/metrics
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/info/metrics' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
http://localhost:8085/api/info/metrics/dataverses
{'status': 'OK', 'data': {'count': 1}}
http://localhost:8085/api/v1/info/metrics/dataverses
{'status': 'OK', 'data': {'count': 1}}
http://localhost:8085/api/search
{'status': 'ERROR', 'message': 'q parameter is missing'}
http://localhost:8085/api/v1/search
{'status': 'ERROR', 'message': 'q parameter is missing'}
http://localhost:8085/api/search?q=aussda
{'status': 'OK', 'data': {'q': 'aussda', 'total_count': 0, 'start': 0, 'spelling_alternatives': {}, 'items': [], 'count_in_response': 0}}
http://localhost:8085/api/v1/search?q=aussda
{'status': 'OK', 'data': {'q': 'aussda', 'total_count': 0, 'start': 0, 'spelling_alternatives': {}, 'items': [], 'count_in_response': 0}}
http://localhost:8085/api/access
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/access' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
http://localhost:8085/api/v1/access
{'status': 'ERROR', 'code': 404, 'message': "'/api/v1/access' endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org."}
3. Implement
- Write tests
- Write/Update code
- Write/Update Docs
- Write/Update Docstrings
- Run pytest
- Run tox
- Run pylint
- Run mypy
4. Follow Ups
- Review
- Code
- Tests
- Docs
As discussed during the 2024-02-14 meeting of the pyDataverse working group, we are closing old milestones in favor of a new project board at https://github.com/orgs/gdcc/projects/1 and removing issues (like this one) from those old milestones. Please feel free to join the working group! You can find us at https://py.gdcc.io and https://dataverse.zulipchat.com/#narrow/stream/377090-python