Skip to content
CCPEDIAby Unity Nodes
App Development

Running an API request from Terminal/CLI

2 posts154 viewsLast activity Feb 2024

  1. austin.hodgesOP

    I want to run the command curl https://{subdomain}.daml.app/.hub/v1/published/instance and then curl https://{subdomain}.daml.app/.hub/v1/published/instance/delete to delete a specific trigger. When I run curl https://{subdomain}.daml.app/.hub/v1/published/instance, i get the repsonse: The resource requires authentication, which was not supplied with the request, which makes sense. I was wondering if A) this is the correct way to run this request from the cli and B) what authorization(s) i need to include to be able to get the response and then stop the trigger.
    Thanks

  2. sormeter

    Austin

    These endpoints are detailed on the application api docs

    For the delete example, you want to use a LedgerPartyToken passed in the Authorization: Bearer header

    Authorization: Bearer $LEDGER_PARTY_TOKEN"
    

    delete
    https://hub.daml.com/docs/api#tag/Automation/operation/deleteInstance