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

Make Template ID optional in exercise; exercise by key #2695

Closed
wants to merge 8 commits into from

Conversation

S11001001
Copy link
Contributor

@S11001001 S11001001 commented Aug 28, 2019

The exercise endpoint in HTTP JSON API currently requires a template ID, even when a contract ID is provided. In general for contract reference we want to support two forms:

  1. contract ID with optional template ID (for sanity checking only, not required to disambiguate), or
  2. contract key with required template ID

We should support this for exercise as well as lookup (which already supports it).

Structurally dependent on #3755.

Pull Request Checklist

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

@S11001001 S11001001 added this to the HTTP JSON API First Version milestone Aug 28, 2019
@S11001001 S11001001 self-assigned this Aug 28, 2019
@hurryabit
Copy link
Contributor

I'm not convinced that is a good idea. What's the rationale for doing it?

@S11001001
Copy link
Contributor Author

@hurryabit This refers only to the HTTP JSON API; contract ID is sufficient to disambiguate. As a rule we don't require anything we can derive in the HTTP JSON API.

@hurryabit
Copy link
Contributor

Can we close this?

@leo-da
Copy link
Contributor

leo-da commented Nov 20, 2019

Can we close this?

@hurryabit we want to finish it, but it is not our top priority. Current priorities (sorted):
https://github.com/digital-asset/daml/milestone/23
https://github.com/digital-asset/daml/milestone/21

S11001001 added a commit that referenced this pull request Dec 10, 2019
mergify bot pushed a commit that referenced this pull request Dec 12, 2019
* Lookup by Contract ID and Contract Key is WIP

* factor out "contract ID or key" JSON decoding

- adapted from fc13225 (#2695)

* Resolving conflicts

* Resolving conflicts

* Lookup by contract ID works

* Testing new contract created by IOU_Transfer can be looked up

* error if key and contractId specified for lookup at the same time

* Lookup by contract key test

* Lookup docs

* re-format with `./fmt.sh`

* minor cleanup

CHANGELOG_BEGIN

- [JSON API - Experimental] Fix and document ``/contracts/lookup`` endpoint. See #3755.

CHANGELOG_END
@S11001001
Copy link
Contributor Author

Obsoleted by #4049.

@S11001001 S11001001 closed this Jan 16, 2020
@S11001001 S11001001 deleted the exercise-template-id-optional branch January 16, 2020 16:23
@stefanobaghino-da stefanobaghino-da added component/json-api HTTP JSON API team/ledger-clients Related to the Ledger Clients team's components. labels Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/json-api HTTP JSON API team/ledger-clients Related to the Ledger Clients team's components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants