Skip to main content

post contract via rest api from postman by impersonating a user RRS feed

  • Question

  • Hi, if I am using postman to impersonate a user to post a contract, can that work?

    In my situation, when I tried to post a new contract, I get a 200 OK, and I can see that a new contract is created by Get api/v2/contracts.

    However, the contract has no ledgerIdentifier, and when I try Get api/contract/{contractId}/actions from the user who created the contract, it returns me 204. FYI, the user who creates the contract should be able to take one action.

    The following is the contract info I get through postman by calling Get api/v2/contract/{contractId}


    "id": 12,
    "provisioningStatus": 0,
    "timestamp": "2019-08-15T18:41:49.5566667",
    "connectionID": 1,
    "ledgerIdentifier": null,
    "deployedByUserId": 1,
    "workflowId": 2,
    "requestId": "7140c8cd-8174-46af-8c1e-bb0717e02073",
    "contractCodeId": 2,
    "contractProperties": [],
    "transactions": [],
    "contractActions": [
    "id": 30,
    "userId": 1,
    "provisioningStatus": 0,
    "timestamp": "2019-08-15T18:41:49.5566667",
    "parameters": [
    "name": "description",
    "value": "from postman",
    "workflowFunctionParameterId": 9
    "name": "transferability",
    "value": "true",
    "workflowFunctionParameterId": 10
    "name": "expired time",
    "value": "1569011400",
    "workflowFunctionParameterId": 11
    "workflowFunctionId": 7,
    "transactionId": null,
    "workflowStateId": null,
    "requestId": "7140c8cd-8174-46af-8c1e-bb0717e02073",
    "eventId": null


    My questions are:

    1.what could possibly go wrong here?

    2.why there is no ledgerIdentifier and contractProperties for the contract?


    Really appreciate your help on this!!!!!

    Thursday, August 15, 2019 8:03 PM

All replies