This guide uses the List assignments by username API as an example.

As a prerequisite for this guide, do ensure you currently have a few pending task assignments.


To call this API, we must know these values:

  1. API URL: http://localhost:8080/jw/api/assignment/listByUser/admin (Change the domain/port as needed according to your Joget server)
  2. HTTP Method (In this case, it is a GET call)
  3. Mandatory parameter(s) to fill up.
    This API only requires 1 mandatory path parameter --> username (Path parameter is to be keyed into the API URL itself)
    Optionally, you can also fill in values for the optional query string parameters to alter the API response.
  4. API Document ID: API-0f6e9f1f-6e1d-4e9e-9bd2-fb34c67b2696 (You can find this value by editing the API document > Properties)
  5. API Key (unique API Key that you've created in your API access)

Reference: https://dev.joget.org/community/display/marketplace/Assignment#Assignment-Listassignmentsbyusername

 

Now to construct the API call, these are the required request header fields:

  • api_id
  • api_key

Reference: https://dev.joget.org/community/display/marketplace/Manage+API+Key+Menu#ManageAPIKeyMenu-ConfigureAPIAccess

Now with the information above, this is how it looks like in Postman.


The expected response returned (Depending on your available task assignments):

[
    {
        "activityId": "33_5_expenseclaim_process1_verify_claim",
        "dateCreated": "16-01-2020 04:35 AM",
        "serviceLevelMonitor": "-",
        "processId": "5_expenseclaim_process1",
        "processName": "Expense Approval Process",
        "due": "-",
        "activityName": "Finance Verify",
        "description": null,
        "id": "33_5_expenseclaim_process1_verify_claim",
        "label": "Finance Verify",
        "processVersion": "2"
    },
    {
        "activityId": "49_7_expenseclaim_process1_verify_claim",
        "dateCreated": "16-01-2020 04:49 AM",
        "serviceLevelMonitor": "-",
        "processId": "7_expenseclaim_process1",
        "processName": "Expense Approval Process",
        "due": "-",
        "activityName": "Finance Verify",
        "description": null,
        "id": "49_7_expenseclaim_process1_verify_claim",
        "label": "Finance Verify",
        "processVersion": "2"
    },
      ....
]