GETAPI - kwantu/platformconfiguration GitHub Wiki
Overview
This describes the resources that make up the kwantu data API. All these below endpoints will be used to fetch application data.
/api/profiles
METHOD: POST
HEADERS:
- Content-Type : application/json
BODY:
{
"applicationId":"66862981-9164-4319-c1c2-4bbd7380f919",
"communityId":"3af49348-f52f-487c-9666-78a65bd16a96",
"limit":"100",
"offset":"0",
"include_data":"false",
"filter":""
}
Required
applicationId communityId
Optional: limit
: number (default 25)
Optional: offset
: number (default 0)
Optional: include_data
: boolean (default false)
Optional: filter
: string (default none)
Default sorting based on SDO title
Response:
Status: 200
{
"isError": false,
"message": "",
"response": {
"total_rows": 1,
"etag": "16f80e471b5689",
"limit": 100,
"offset": 0,
"rows": [
{
"id": "c9c37b8a-8c81-459f-a97b-136b4559d9ce",
"sdo": "ChristianAidPartnerDetails-91c11f0a-7f7f-4120-9556-dc7aa6303e7a",
"title": "KCIU"
}
]
}
}
A model
property will be present once include_data
is set to true
/api/subprofiles
This call retrieves all the subprofiles of the given profile. If we want to access the apex level subprofiles simply pass applicationId value in profileId parameter. API will determine to fetch subprofiles from application level context only.
subprofiletype
is the category of subprofile. To know call subprofiletypes service
METHOD: POST
HEADERS:
- Content-Type : application/json
BODY:
{
"applicationId":"66862981-9164-4319-c1c2-4bbd7380f919",
"communityId":"3af49348-f52f-487c-9666-78a65bd16a96",
"profileId":"c9c37b8a-8c81-459f-a97b-136b4559d9ce",
"subprofiletype":"profileRegistration",
"limit":"10",
"offset":"0",
"include_data":"true",
"filter":""
}
Required
applicationId communityId profileId subprofiletype
Optional: limit
: number (default 25)
Optional: offset
: number (default 0)
Optional: include_data
: boolean (default false)
Optional: filter
: string (default none)
Default sorting based on SDO title
Response:
Status: 200
{
"isError": false,
"message": "",
"response": {
"total_rows": 1,
"etag": "16f95a8b9968c8",
"limit": 10,
"offset": 0,
"rows": [
{
"id": "0ae2817c-4734-4661-b900-2920b7db9f81",
"sdo": "ChristianAidprogrammes-58d84c57-1923-4c5d-9cbd-00c0838dd9b6",
"title": "",
"model": {
"ChristianAidprogrammes": {
"programmeID": "728ACEE0-9735-E711-AAE8-005056BE001C",
"programmeName": "CASE- OVC"
}
}
}
]
}
}
A model
property will be present once include_data
is set to true
/api/subprocesses
This call retrieves all the subprocesses of the given context. Context can be of profile level subprocesses or subprofile level subprocesses. subprofileId
in this case is optional.
If we want to access apex level subprocesses or subprocesses within the subprofiles of apex we need to pass applicationId
in profileId
and subprofileId
to a value or blank.
METHOD: POST
HEADERS:
- Content-Type : application/json
BODY:
{
"applicationId":"66862981-9164-4319-c1c2-4bbd7380f919",
"communityId":"3af49348-f52f-487c-9666-78a65bd16a96",
"profileId":"c9c37b8a-8c81-459f-a97b-136b4559d9ce",
"subprofileId":"",
"processId":"",
"limit":"10",
"offset":"0",
"include_data":"true",
"filter":""
}
Required
applicationId communityId profileId processId
processId
and subProcessId
can be found by processtypes
Optional: subprofileId
(default blank)
Optional: limit
: number (default 25)
Optional: offset
: number (default 0)
Optional: include_data
: boolean (default false)
Optional: filter
: string (default none)
Default sorting based on SDO title
Response:
Status: 200
{
"isError": false,
"message": "",
"response": {
"total_rows": 1,
"etag": "16f95a8b9968c8",
"limit": 10,
"offset": 0,
"rows": [
{
"id": "0ae2817c-4734-4661-b900-2920b7db9f81",
"sdo": "ChristianAidprogrammes-58d84c57-1923-4c5d-9cbd-00c0838dd9b6",
"title": "",
"model": {
"ChristianAidprogrammes": {
"programmeID": "728ACEE0-9735-E711-AAE8-005056BE001C",
"programmeName": "CASE- OVC"
}
}
}
]
}
}
A model
property will be present once include_data
is set to true
/api/subprofiletypes
This call retrieves all the subprofiles categories within the application.
METHOD: POST
HEADERS:
- Content-Type : application/json
BODY:
{
"applicationId":"66862981-9164-4319-c1c2-4bbd7380f919",
"communityId":"3af49348-f52f-487c-9666-78a65bd16a96"
}
Required
applicationId communityId
Response:
Status: 200
{
"isError": false,
"message": "",
"response": {
"rows": [
{
"type": "profileRegistration",
"name": "Programmes",
"sdo": "ChristianAidprogrammes"
}
]
}
}
/api/processtypes
This call retrieves all the processes within the application. Processes at application level (adoption), subprofile level and instance level (profile). The service also returns processId
and subProcessId
which is later provided to ddddd
METHOD: POST
HEADERS:
- Content-Type : application/json
BODY:
{
"applicationId":"66862981-9164-4319-c1c2-4bbd7380f919",
"communityId":"3af49348-f52f-487c-9666-78a65bd16a96"
}
Required
applicationId communityId
Response:
Status: 200
{
"isError": false,
"message": "",
"response": {
"applicationProcesses": [
{
"name": "Import data from Promise",
"processId": "promiseData",
"subProcessId": "spPromiseImport",
"type": "Single instance"
},
{
"name": "Updated OH App using Promise data",
"processId": "importData",
"subProcessId": "spDataImport",
"type": "Multi instance"
}
],
"profileProcesses": [
{
"name": "Partner details",
"processId": "profileRegistration",
"subProcessId": "spProfileRegistration",
"type": "Single instance"
}
],
"subprofileProcesses": [
{
"name": "Click to view programmes and outcomes for this partner",
"processId": "programmes",
"subProcessId": "spProgramme",
"type": "Single instance"
},
{
"name": "Projects",
"processId": "Projects",
"subProcessId": "spProject",
"type": "Multi instance"
},
{
"name": "Outcomes",
"processId": "outcomes",
"subProcessId": "spoutcomes",
"type": "Multi instance"
}
]
}
}