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

Collect all API endpoint and their response, depending on the interaction #133

Open
13 tasks
skasberger opened this issue Apr 2, 2021 · 1 comment
Open
13 tasks
Assignees
Labels
pkg:api api related activities prio:low status:fix committed Fix is already commited, but still some task(s) open. type:feature New feature

Comments

@skasberger
Copy link
Member

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
@skasberger skasberger added type:feature New feature pkg:api api related activities prio:low status:fix committed Fix is already commited, but still some task(s) open. labels Apr 2, 2021
@skasberger skasberger added this to the v0.4.0 milestone Apr 2, 2021
@skasberger skasberger self-assigned this Apr 2, 2021
@pdurbin
Copy link
Member

pdurbin commented Feb 14, 2024

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

@pdurbin pdurbin removed this from the v0.4.0 milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:api api related activities prio:low status:fix committed Fix is already commited, but still some task(s) open. type:feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants