Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Table of Contents

...

http://192.168.1.161:8080/PresentationServices/getPermissions?userId=QA_1&token=d38bad16-e48a-4580-b5b6-993124ce638c

Expand
titleResult
{ - data[1]
- 0:  {
name"access_forms"
  }
  -statusFact
  {
successtrue
  }
 }

 

 

Create Role

This operation is used to add Roles into database as per selected organization.

Parameters

Base URL: /organizations/{organization}/role/createRole

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
roleNameStringYesRole Name which needs to be created. 


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/QA_Organization_A/role/deleteRole?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand
titleResult
{ - data
  { id54
name"MyRole1"
organizationId"QA_Organization_A"
  }
  -statusFact
  {
successtrue
  }
 }

Not enough Permissions

In the case userId doesn't have 'modify_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Edit Role

This operation is used to edit Role into database as per selected organization. 

Parameters

Base URL: /organizations/{organization}/role/editRole

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
roleNameStringYesRole Name of the role. 
roleIdStringYesRole Id of the role to edit. 

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/QA_Organization_A/role/deleteRole?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod11

Expand
titleResult
{ - data
  { id54
name"MyRole1"
organizationId"QA_Organization_A"
  }
  -statusFact
  {
successtrue
  }
 }

Not enough Permissions

In the case userId doesn't have 'modify_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Delete Role

This operation is used to delete Role into database as per selected organization.

Parameters

Base URL: /organizations/{organization}/role/deleteRole

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
roleNameStringYesRole Name which needs to be created. 


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/QA_Organization_A/role/deleteRole?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'delete_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Roles With Permissions 

 

This operation is used to  fetch all roles associated with a particular organization along with their associated privileges. 

Parameters

Base URL: /organizations/{organization}/rolesWithPermissions

Name
Type
Mandatory
Description
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{organizationId} String YesThe id of the Organization.

 

API Sample

Happy Scenario

http://192.168.1.161:8080/PresentationServices/organizations/UNC/rolesWithPermissions?token=d38bad16-e48a-4580-b5b6-993124ce638c&userId=QA_1

Expand
titleResult
{
- data:[1]
  -0: {
id"2"
name"pod"
 -permissions[1]
0:  
{
name"read_user"
}
}
  -statusFact
  {
successtrue
  }
 }

 

Not enough Permissions

In the case userId doesn't have 'modify_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".


Create Location(Room) 

This operation is used to add Shift Durations to add Locations into database for a particular facility..

Parameters

Base URL: /organizations/{organization}/facilitiesworkspaces/{facilityworkspace}/createOrUpdateShiftDurationscreateOrUpdateRoom

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} roomName StringYesThe id of the Organizationroom name to create.
{facilityId} roomIdStringYesThe id of the Facility.room id to create
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
shiftDurationsworkspaceStringYesShift Durations of Facility to createThe id of the workspace

Note : 1) ALL the parameters of the specified template must be present in the request.          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilitiesworkspaces/UNC/createOrUpdateShiftDurationscreateOrUpdateRoom?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"idworkspaceId":"UNCunc_nursery","nfcEnabledid":true"test_room","shiftsname":["9Test New Room"},"12statusFact"],:{"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},"statusFact":{"success":true}success":true}}

Not enough Permissions

In the case userId doesn't have 'modify_facilitiesroom' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Edit Location(Room)  

This operation is used to update Shift Durations room into database for a particular facility.

Parameters

Base URL: /organizations/{organization}/facilitiesworkspaces/{facilityworkspace}/createOrUpdateShiftDurationscreateOrUpdateRoom

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} roomName StringYesThe id of the Organizationroom name to create.
{facilityId} roomIdStringYesThe id of the Facility.room id to create
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
shiftDurationsworkspaceStringYesShift Durations of Facility to updateThe id of the workspace

Note : 1) ALL the parameters of the specified template must be present in the request.          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNCworkspaces/facilities/UNC/createOrUpdateShiftDurationscreateOrUpdateRoom?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult

{"data":{"

id

workspaceId":"

UNC

unc_nursery","

nfcEnabled

id":

true,"shifts":["9","12"],"nfcSelfModificationEnabled":false

"test_room","name":"

UNC

Test New Room"},"

barCodeEnabled

statusFact":

true,

{"

organizationId

success":

"UNC"},"statusFact":{"success":true

true}}

Not enough Permissions

In the case userId doesn't have 'modify_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Delete Location(Room) 

This operation is used to delete Shift Durations into locations from the database for a particular facilityworkspace.

Parameters

Base URL: /organizations/{organization}workspaces/facilities/{facilityworkspace}/deleteShiftDurationsdeleteRoom

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} workspaceStringYesThe id of the Organizationworkspace.
{facilityId} roomIdStringYesThe id of the Facility.room id to create
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
shiftDurations String YesShift Durations of Facility to delete.  

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.2) Delete will not be allowed If the requested room is associated with any Patients.

3) Delete will not be allowed If the requested room is associated with any Devices.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNCworkspaces/facilities/UNC/deleteShiftDurationsdeleteRoom?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'delete_facilitiesroom' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Fetch 

Location

Locations(Room) 

This operation is used to fetch all Shift Durations to fetch Locations from database or fetch shift durations for a given facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/workspaces/role{workspace}/createRolerooms

Request Type: POSTGET

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{organizationIdfacilityIdStringNoYesThe id of the Facility. 
{workspaceId}StringYesThe id of the workspace.

 

API Sample

Happy Scenario

http://localhost:8080/PresentationServices//organizations/UNC/facilities/UNC/workspaces/unc_nursery}/rooms?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"idworkspaceId":"NorthEasternunc_nursery","nfcEnabledid":true"poda","shiftsname":["3Pod A"},{"6workspaceId",:"9unc_nursery"],"nfcSelfModificationEnabledid":true"podb","name":"North EasternPod B"},{"barCodeEnabledworkspaceId":true"unc_nursery","organizationIdid":"UNCpodc"},{"idname":"UNCPod C"},{"nfcEnabledworkspaceId":true,"nfcSelfModificationEnabledunc_nursery":false,"nameid":"UNCpodd","barCodeEnabledname":true,"organizationId":"UNC""Pod D"},{"idworkspaceId":"Vidantunc_nursery","nfcEnabledid":false,"shifts":["6","9"],"nfcSelfModificationEnabled":false"pode","name":"Vidant","barCodeEnabled":false,"organizationId":"UNC"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{Pod E"},{"workspaceId":"unc_nursery","id":"UNCpodf","nfcEnabledname":false"Pod F"},{"shiftsworkspaceId":["6unc_nursery","id":"9podg"],"nfcSelfModificationEnabledname":false"Pod G"},{"nameworkspaceId":"UNCunc_nursery","barCodeEnabledid":false"test_room","organizationIdname":"UNCTest Room"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'readlist_facilityrooms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Create Shift Durations 

This operation is used to add Shift Durations into database for a particular facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/createOrUpdateShiftDurations

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
{facilityId} StringYesThe id of the Facility.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before
shiftDurationsStringYesShift Durations of Facility to create. 

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/createOrUpdateShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"id":"UNC","nfcEnabled":true,"shifts":["9","12"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'modify_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Edit Shift Durations 

This operation is used to update Shift Durations into database for a particular facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/createOrUpdateShiftDurations

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
{facilityId} StringYesThe id of the Facility.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
shiftDurationsStringYesShift Durations of Facility to update. 

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/createOrUpdateShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"id":"UNC","nfcEnabled":true,"shifts":["9","12"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'modify_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Delete Shift Durations

This operation is used to delete Shift Durations into database for a particular facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/deleteShiftDurations

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
{facilityId} StringYesThe id of the Facility.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
shiftDurationsStringYesShift Durations of Facility to delete. 

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/deleteShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'delete_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Fetch Shift Durations

This operation is used to fetch all Shift Durations from database or fetch shift durations for a given facility.

Parameters

Base URL: /organizations/{organization}/rolefacilities/createRole{facility}

Request Type: POSTGET

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{organizationIdfacilityIdStringNoThe id of the Facility. 

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilities?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"id":"NorthEastern","nfcEnabled":true,"shifts":["3","6","9"],"nfcSelfModificationEnabled":true,"name":"North Eastern","barCodeEnabled":true,"organizationId":"UNC"},{"id":"UNC","nfcEnabled":true,"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},{"id":"Vidant","nfcEnabled":false,"shifts":["6","9"],"nfcSelfModificationEnabled":false,"name":"Vidant","barCodeEnabled":false,"organizationId":"UNC"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"id":"UNC","nfcEnabled":false,"shifts":["6","9"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":false,"organizationId":"UNC"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'read_facility' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Fetch All Programs

 

This operation is used to  fetch all available survey programs from database.

Parameters

Base URL: /organizations/{organization}/programs

Request Type: GET

Name
Type
Mandatory
Description
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{organizationId} String YesThe id of the Organization.

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/Another1/programs?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"programId":1,"programLabel":"Catheter Associated Bloodstream Infections","programName":"Catheter Associated Bloodstream Infections"},{"programId":2,"programLabel":"Human Breast Milk in NICU","programName":"Human Breast Milk in NICU"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_progarms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Fetch Active Programs

 

This operation is used to  fetch active survey programs from database for a given facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}+programs

Request Type: GET

Name
Type
Mandatory
Description
{organization} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{facility}StringYesThe id of the Facility.


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/Another1/facilities/TestFacility+programs?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"programId":1,"programLabel":"Catheter Associated Bloodstream Infections","programName":"Catheter Associated Bloodstream Infections"},{"programId":2,"programLabel":"Human Breast Milk in NICU","programName":"Human Breast Milk in NICU"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_progarms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".