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

Add /server/* endpoint group to REST API #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

agoscinski
Copy link
Collaborator

This includes the implementation of the endpoints /server/info and /server/endpoints. There are some slight changes over the old REST API:

  • The endpoint /server/ has been moved to /server/info
  • The key name in the response of endpoint /server/endpoints has been changed from available_endpoints to endpoints
  • The strings in the response of endpoint /server/endpoints has been splitted up into a dictionary with keys "methods", "group", "path" that contain the same information as the strings but structured

@agoscinski agoscinski force-pushed the server-endpoint branch 5 times, most recently from 0458868 to b5c695a Compare November 21, 2024 12:44
This includes the implementation of the endpoints `/server/info` and
`/server/endpoints`. There are some slight changes over the old REST
API:

* The endpoint `/server/` has been moved to `/server/info`
* The key name in the response of endpoint `/server/endpoints` has been changed
  from `available_endpoints` to `endpoints`
* The strings in the response of endpoint `/server/endpoints` has been
  splitted up into a dictionary with keys "methods", "group", "path" that
  contain the same information as the strings but structured
* Updated API version to the version of the repo. This required a new
  file to prevent circular imports
aiida_restapi/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@eimrek eimrek left a comment

Choose a reason for hiding this comment

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

When i test, currently i get the version in the url path like

{'endpoints': [{'path': '0.1.0a1/token',
   'group': 'token',
   'methods': ['POST']},
  {'path': '0.1.0a1/auth/me/', 'group': 'auth', 'methods': ['GET']},
  {'path': '0.1.0a1/computers', 'group': 'computers', 'methods': ['GET']},
  {'path': '0.1.0a1/computers/projectable_properties',

It's currently wrong (as we don't server under that subpath), and probably we want just the major version, right? i.e. {'path': 'v0/token',


return _func
@pytest.fixture
def calcjob_nodes():
Copy link
Member

Choose a reason for hiding this comment

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

What is this for? it's not used, right?

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