-
Notifications
You must be signed in to change notification settings - Fork 192
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
Rest api version "v4" implementation #3429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @waychal and @asle85 ! I have a few suggestions and questions. Probably easiest if we discuss tomorrow in person.
aiida/restapi/translator/nodes/process/calculation/calcfunction.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave a first pass.
Sorry for the longish list of comments, but I think some are important as they might change the REST API for users.
A utility `aiida.restapi.common.identifiers.get_node_namespace` is added that constructs the full nested node namespace present in the current database. Each entry will contain a `full_type` attribute, which uniquely identify the exact type, in the case of a leaf, or the sub class of node types in the case of a namespace. The `full_type` can be used to generate the query builder filters that will allow to query exactly for this node type or its sub classes. This is stored in the REST API module because it is exposed as an endpoint. This can then be consumed by the Materials Cloud to dynamically build up an index of available node classes with their `full_types` which can be used to query for them.
The REST API is updated to `v4` to reflect the changes of the ORM of `aiida-core` in `v1.0.0`, especially in the available endpoints. The `calculations` and individual `data` endpoints have been removed. Added are the `processes` and `calcjobs` endpoints. The `visualization` endpoints, which were used by the Materials Cloud to retrieve data in a specific format that was derived from the basic node attributes and repository contents, has been changed to `derived_properties`. Also added the endpoints `repo_list` and `repo_contents` to get the available objects in a node's repository and their contents in the case of files. The `schema` endpoints have been replaced with `projectable_properties`. The `get_schema` class methods on various ORM classes have been deprecated as this functionality was used strictly by the REST API. Co-Authored-By: epassaro <elsa.passaro@epfl.ch>
Thanks a lot @waychal and @asle85 ! Great work 👍 |
Fixes #2384 and fixes #3177
New version of rest api is implemented for aiida v1.0.0. It has only nodes, processes, calcjobs, groups, computers, users and server endpoints.