- Created by Former user, last modified on Dec 23, 2014
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 29 Next »
Fetch All Permissions
This operation is used to fetch list of permissions available in the database.
Parameters
Base URL: /getPermissions
Request Type: GET
Name | Type | Mandatory | Description |
---|---|---|---|
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
API Sample
Happy Scenario
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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
roleName | String | Yes | Role 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_pod1Not 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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
roleName | String | Yes | Role Name of the role. |
roleId | String | Yes | Role 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
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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
roleName | String | Yes | Role 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
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 |
---|---|---|---|
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{organizationId} | String | Yes | The id of the Organization. |
API Sample
Happy Scenario
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 into database for a particular facility.
Parameters
Base URL: /organizations/{organization}/facilities/{facility}/createOrUpdateShiftDurations
Request Type: POST
Name | Type | Mandatory | Description |
---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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
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 Location(Room)
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} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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
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 database for a particular facility.
Parameters
Base URL: /organizations/{organization}/facilities/{facility}/deleteShiftDurations
Request Type: POST
Name | Type | Mandatory | Description |
---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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
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 Location(Room)
This operation is used to fetch all Shift Durations from database or fetch shift durations for a given facility.
Parameters
Base URL: /organizations/{organization}/role/createRole
Request Type: POST
Name | Type | Mandatory | Description |
---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{organizationId} | String | No | The id of the Facility. |
API Sample
Happy Scenario
http://localhost:8080/PresentationServices/organizations/UNC/facilities?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
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
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.".
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} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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
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} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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
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} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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
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}/role/createRole
Request Type: POST
Name | Type | Mandatory | Description |
---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{organizationId} | String | No | The id of the Facility. |
API Sample
Happy Scenario
http://localhost:8080/PresentationServices/organizations/UNC/facilities?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
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
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 |
---|---|---|---|
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{organizationId} | String | Yes | The id of the Organization. |
API Sample
Happy Scenario
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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{facility} | String | Yes | The id of the Facility. |
Note that ALL the parameters of the specified template must be present in the request.
API Sample
Happy Scenario
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.".
- No labels
0 Comments