POSTAPI - kwantu/platformconfiguration GitHub Wiki

back

Overview of the API to update the system using the workflow engine

This describes the resources that make up the kwantu data API. All these below endpoints will be used to add application data.

Add versioning to the API so that it calls the specific

Worfklow processes

  1. Instantiate the workflow - no data: take it to step 2` seq 1 - So that it it is done only once
  2. Update the workflow, at step 2, and it stays there.
  3. Call the worklfow to transition to complete,
  4. Instantiate the same processId to the next sequence.

/api/addProfile

METHOD: POST

HEADERS:

  • Content-Type : application/json

BODY:

{
  "communityId": "",
  "applicationId": "",
  "processId":"",
  "profileId":"",
  "validDate":"",
  "dueDate":"",
  "sdos":[
    {
      "title":"aaa",
      "model":{
        "appProfile":{
          "Name":"",
          "refNo":"",
          "description":""
        }
      }
    },
    {
      "title":"aaa",
      "model":{
        "EPWPProjectDetails":{
          "Duration": "100",
          "EndDate": "12/10/2019",
          "EstimatedBudget": "1001",
          "ProjectDescription": "test 123",
          "ProjectName": "Test 123 project",
          "ProjectReference": "test ref#123",
          "StartDate": "12/10/1982",
          "ProvinceLockedStatus": "Yes"
        }
      }
    }
  ]
}

Required applicationId communityId processId sdos (At least one item in array)

Optional: profileId: if passed this will be used as profileId. Default uuid

Optional: validDate: if passed this will be used as validDate. Default today's date.

Optional: dueDate: if passed this will be used as dueDate. Default today's date.

Response:

Status: 200

{
    "isError":false,
    "message": "",
    "response":{
        "profileId":"",
        "subProcessUUID":"",
        "sdoList":[
            {
                "setId":"",
                "uuid":""
            }
        ],
        "groupKey":""
    }
}

/api/addSubProfile

METHOD: POST

HEADERS:

  • Content-Type : application/json

BODY:

{
  "communityId": "",
  "applicationId": "",
  "profileId":"",
  "processId":"",
  "subprofileId":""
  "validDate":"",
  "dueDate":"",
  "subprofileTitle":"",
  "sdos":[
    {
      "title":"",
      "model":{
        "EPWPLocality": {
          "degreesDecimalMinutesLatitude": [],
          "street": [],
          "spatialselector": {
             "code": [],
             "label": []
          }
       }
      }
    }
  ]
}

Required applicationId communityId profileId processId sdos (At least one item in array)

Optional: subprofileId: if passed this will be used as subprofileId. Default uuid

Optional: validDate: if passed this will be used as validDate. Default today's date.

Optional: dueDate: if passed this will be used as dueDate. Default today's date.

Optional: subprofileTitle: if passed this will be used as subprofileTitle.

Response:

Status: 200

{
    "isError":false,
    "message": "",
    "response":{
        "profileId":"",
        "subprofileId":"",
        "subProcessUUID":"",
        "sdoList":[
            {
                "setId":"",
                "uuid":""
            }
        ],
        "groupKey":""
    }
}

/api/addSubProcess

METHOD: POST

HEADERS:

  • Content-Type : application/json

BODY:

{
  "communityId": "",
  "applicationId": "",
  "profileId":"",
  "processId":"",
  "subprofileId":""
  "validDate":"",
  "dueDate":"",
  "processTitle":"",
  "sdos":[
    {
      "title":"",
      "model":{
        "EPWPLocality": {
          "degreesDecimalMinutesLatitude": [],
          "street": [],
          "spatialselector": {
             "code": [],
             "label": []
          }
       }
      }
    }
  ]
}

Required applicationId communityId profileId processId sdos (At least one item in array)

Optional: subprofileId: if passed this will be used as subprofileId.

Optional: validDate: if passed this will be used as validDate. Default today's date.

Optional: dueDate: if passed this will be used as dueDate. Default today's date.

Optional: processTitle: if passed this will be used as processTitle.

Response:

Status: 200


{
    "isError":false,
    "message": "",
    "response":{
        "profileId":"",
        "subprofileId":"", // with value or blank
        "subProcessUUID":"",
        "sdoList":[
            {
                "setId":"",
                "uuid":""
            }
        ],
        "groupKey":""
    }
}