-
Notifications
You must be signed in to change notification settings - Fork 9
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
Json API v2 initial documentation #830
base: main
Are you sure you want to change the base?
Conversation
7fe2832
to
12406bf
Compare
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.
Numerous small revisions throughout.
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
Co-authored-by: carrielaben-da <[email protected]>
d6cb7e3
to
5ec5c1a
Compare
A general comment in looking through this, is that while the API is a lot more comprehensive, it is significantly more obtuse in terms of the request and response bodies, due to them mapping directly to the GRPC types. I guess that's why you were emphasising the importants of having nice clients for interacting with it. |
docs/3.1/docs/json-api/index.rst
Outdated
|
||
The **JSON API** provides a significantly simpler way to interact with a ledger than | ||
:doc:`the Ledger API </app-dev/ledger-api>` by providing *basic active contract set functionality*: | ||
This section describes the new JSON API Service that is a part of Canton 3.2. If you are looking for legacy JSON API, please navigate to :doc:`JSON API V1 </json-api/v1/index>` |
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.
We are in docs/3.1
but it says it's documenting Canton 3.2?
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.
Actually I have no idea how to deal with that. I think we will not backport JSON V2 to 3.1. So that will be 3.2
On the other hand it probably makes no sense to create new branch of docs yet.
|
||
The sources below can be copied to `Editor swagger IO <https://editor-next.swagger.io>`_ . The editor displays a preview of the specification and generates example inputs and outputs. | ||
|
||
The specification covers streaming (websockets) endpoints - for regular endpoints (HTTP) please see :doc:`openapi` |
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.
Do these work yet?
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.
Websockets work normally.
- Content-Type: ``application/json`` | ||
.. note:: You can only query active contracts with the ``/v2/state/active-contracts`` endpoint. Archived contracts (those that were archived or consumed during an exercise operation) will not be shown in the results. | ||
|
||
HTTP Websocket Request |
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.
Does this work?
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.
You mean websockets? Yes.
Co-authored-by: Raphael Speyer <[email protected]>
Co-authored-by: Raphael Speyer <[email protected]>
Co-authored-by: Raphael Speyer <[email protected]>
Co-authored-by: Raphael Speyer <[email protected]>
Co-authored-by: Raphael Speyer <[email protected]>
Co-authored-by: Raphael Speyer <[email protected]>
Co-authored-by: Raphael Speyer <[email protected]>
I agree - that became visible once I started to create examples - to check using |
} | ||
} | ||
} ], | ||
"workflow_id" : "", |
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 think restricting the populated fields to the minimum required would make these examples a good deal more useful.
} | ||
"commands" : [ { | ||
"CreateCommand" : { | ||
"template_id" : "cbed714ed61c4a30b0038ea72c9ff13de51be99aac065f61e6ae9e954375e171:Iou:Iou", |
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.
Can we use a package name in the template_id
of all the requests?
Co-authored-by: Raphael Speyer <[email protected]>
Preview:
set env variables
ARTIFACTORY_USERNAME=...
ARTIFACTORY_PASSWORD=...
open http://127.0.0.1:8000/json-api/index.html