Daml smart contract interaction using json api

Hey I created a daml smart contract using daml new
I got a alice bob ownership contract

Now my question is how to interact with this smart contract using daml json api
Since there is no clear walkthrough for this in daml documentation
Can anyone share me the default endpoints and the payload structure for this smart contract

module Main where

import Daml.Script

type AssetId = ContractId Asset

template Asset
  with
    issuer : Party
    owner  : Party
    name   : Text
  where
    ensure name /= ""
    signatory issuer
    observer owner
    choice Give : AssetId
      with
        newOwner : Party
      controller owner
      do create this with
           owner = newOwner

setup : Script AssetId
setup = script do
-- user_setup_begin
  alice <- allocatePartyWithHint "Alice" (PartyIdHint "Alice")
  bob <- allocatePartyWithHint "Bob" (PartyIdHint "Bob")
  aliceId <- validateUserId "alice"
  bobId <- validateUserId "bob"
  createUser (User aliceId (Some alice)) [CanActAs alice]
  createUser (User bobId (Some bob)) [CanActAs bob]
-- user_setup_end

  aliceTV <- submit alice do
    createCmd Asset with
      issuer = alice
      owner = alice
      name = "TV"

  bobTV <- submit alice do
    exerciseCmd aliceTV Give with newOwner = bob

  submit bob do
    exerciseCmd bobTV Give with newOwner = alice

I want to interact with this using curl or postman
Will it require authentication if yes where can i get
and what is the payload i need to give in jwt.io
Please guide me on this

Hi, welcome to the forums!

The following should get you started with Daml 2.x. I’m using 2.9.4.

  1. Check your project’s Daml version:

    daml version
    
  2. Start the ledger and an HTTP JSON process:

    daml start
    
  3. Wait… and then list your party ids:
    (in a separate terminal window, project folder)

    daml ledger list-parties
    
  4. Ping the HTTP JSON endpoint:

    curl http://localhost:7575/readyz
    
  5. Form a JWT payload:
    (inserting your party id)

    {
      "https://daml.com/ledger-api":
      {
        "ledgerId": "sandbox",
        "applicationId": "HTTP-JSON-API-Gateway",
        "actAs": ["Alice::1220...3c4f"]
      }
    }
    

    …and encode it using https://jwt.io/.

  6. Query the JSON API for contracts:
    (inserting your encoded JWT)

    curl http://localhost:7575/v1/query \
      --header 'Authorization: Bearer eyJhbGci...fIXMKvCs'
    

Here are the docs.

Thank you so much for the assistance