Contents
4.1.1 Stateful Operation Service Proxy
4.1.3 Stateless Operation Service Proxy
5.1 Assigning a resource to a data object resource pool
5.4 Copy assignments to capacity
6 Auxiliary Services to get data
1 Document Change Management
| Release | Date | Author | Comments |
| 1.0 | 01/2018 | DC | First release |
| 1.1 | 11/2019 | JB | Adding Update Capacity from Assignments Service |
| 1.2 | 03/2020 | JB | Adding move resource data serviceAdding generate resource profile service Changes in saving resource data service. Adding update parent assignments |
| 1.3 | 11/2021 | DC | Improvements on Update parent assignments |
| 1.4 | 12/2022 | RF | Create/Update Requirement on Resource Management V2 |
| 1.5 | 03/2025 | RF | Create/Update/Delete Leave on Resource Management V2 |
| 1.6 | 11/2025 | RF | Remove Requirement on Resource Management V2 |
| 1.7 | 03/2026 | RF | Update document to Bruno software |
2 Introduction
Several REST web services are provided allowing tenants and customers to interact with Triskell virtually from any environment/platform. This document describes how to manage assigning a resource to a data object resource pool and loading data on a given resource pool assign using the operational services.
|
Usually, Web services are designed to manage small sets of data.
If you are not sure they will cover your requirements, please contact us at: support@triskellsoftware.com.
|
In this document there are some examples about how to send information to Triskell using Bruno plug-in, from Bruno Software. You can get Bruno for free here. Then you just need to import the attached file "TriskellAPI.yml" and the file “NextRelease-environment.json”. The last file is used to set environment variables, so it can be easily tested on different environments.
It's very important to test your code on the Nextrelease environment before delivering it on the production environment (https://nextrelease.triskellsoftware.com/triskell/). In this document examples given are using Localhost as testing environment.
|
Some internal id's can be different between testing and production environments. Please review the hardcoded ids before delivering them on production environment.
|
3 Authentication
From the authentication point of view, there are two kinds of web services on Triskell: stateful and stateless.
Most of the REST services provided are Stateful, which means that interacting with them requires a login first.
On the other hand, Stateless services will do user authentication on every call.
Stateless services are intended to be used by clients not capable of managing a session cookie to maintain a dialog with the server.
| In this document, only Stateless services will be denoted, most of the services being Stateful by default. |
Two services are provided to log in and log out of Triskell.
Stateless services must provide their authentication parameters as HTTP Headers on every service call.
3.1 Login Service
The login service must be invoked before any other stateful Triskell web service call. It receives a user identifier and a password as URL parameters.
| URL | https:// SERVER /triskell/service/rest/login/user/{userId}/passwd/{pass} |
| HTTP Method | GET |
| URL Parameters |
{ userId }: String containing user identifier as ‘user@tenant.com’ URI encoded { pass }: String containing a Base64 encoded SHA256 hash of the password |
| When login is successful it returns a HTTP response code ‘200 – OK’An authentication failure will return HTTP response code ‘401 – UNAUTHORIZED’ |
Example:
3.2 Logout Service
Logout service provided for closing the session at the server.
| URL | URL: https:// SERVER /triskell/service/rest/logout |
| HTTP Method | GET |
Example:
| Don't forget to close your session when finishing your REST conversation |
4 Service Proxies
Service Proxies are a simple way of executing remote procedure calls Operation services.
Requests and responses are exchanged as JSON objects with the clients, to enhance easiness and interoperability.
The proxy input object DataRequest, is compound of the following properties:
- Id: numerical identifier
- Params: A simple JSON object containing only primitive type properties.
- Objects: Array of JSON objects of any type.
These properties must be present in the object being it is used or not.
Example of DataRequest:
|
{ 'id': 1, 'params': { "param_1":"A", "param_2":2 } , 'objects': [ {"NAME":"OBJECT_1"}, {"NAME":"OBJECT_2"} ] } |
The proxy output object Result, is compound of the following properties:
- success: Boolean indicating successfulness of the request.
- message: Error description.
- resultType: Numerical identifier, error severity (1-OK, 2–Warning, 3-Error)
- data: a String or a JSON object
- id: a numerical identifier
- authash: session identifier
- executime: service execution time in nanoseconds
- i18NParams and i18NMessageId: used on internationalized error message
Example of DataResult:
|
{ "authash":"dd06d7c94cd9a73f62b45c5b54247bce", "executime":10997027, "success":true, "message":null, "resultType":1, "data":"Hello world !!!", "id":0, "i18NParams": [], "i18NMessageId":"" } |
4.1 Operation Service Proxy
This is a Web service to execute operations on a Triskell OperationService.
An OperationService groups related functionalities allowing to access then by his Operation Name.
OperationServiceProxy has two implementations, stateful and stateless.
4.1.1 Stateful Operation Service Proxy
Any stateful service requires a Login to be done before submitting any request to it.
4.1.2 WS Operation execute
Execute a service operation call. DataRequest is sent attached to the body of the HTTP request.
| URL | URL: https:// SERVER /triskell/service/rest/proxy/operation/execute/{serviceName}/{operationName} |
| HTTP Method | POST |
| Content-Type Header | application/json |
| URL Parameters |
{serviceName}: String containing the name of the service to be called {operationName}: String containing the operation name |
4.1.3 Stateless Operation Service Proxy
This web service does not require doing a previous Login on Triskell, a user authentication is done on every request.
4.1.4 WS Operation execute
Execute a service operation call. DataRequest is sent as a URL parameter.
| URL | https:// SERVER /triskell/service/rest/proxy/operation/execute/{serviceName}/{operationName}/{payload} |
| HTTP Method | GET |
| Content-Type Header |
X-Account-Name Header: Optional, username@tenantdomain X-API-Key Header: Optional |
| URL Parameters |
{serviceName} : String containing the name of the service to be called {operationName} : String containing the operation name {payload} : JSON DataRequest Object encoded in Base64 |
5 Resource Pool Services
In this section, we describe the main operations available to handle resource pool in Triskell using the existing Stateful services for the most basic use of case. In this document, we are using examples from a standard configuration at test.com.
5.1 Assigning a resource to a data object resource pool
To use this call, we need to get some information from your instance to make it work properly.
What information do we need to assign a resource to a data object resource pool?
- Object instance to assign resource: "PRJ 001".
- Source data object: "BISST"
- Resource to be assigned: "Tomás Barros Silva".
We need to extract all this information from Triskell. Some information can be taken directly from your Triskell instance using the UI and, in some cases, we need to make a request using an operational service to get data from a stored selector report.
This is a request example:
| Customer can make more than one request on the same REST conversation depending on your functional needs. This feature should not be used to load big data volumes because. During the REST conversation Triskell users can get blocked processing the request, so we suggest using it with common sense in terms of data volume and scheduling. Triskell will limit the number of requests by day in the future to avoid collapsing the server, so please take this into account when developing your interfaces. |
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. |
To see if the user was added to Resource Pool you can check on Triskell
5.1.1 Fields description
5.1.1.1 Mandatory fields
- sourcepool_data_objectid: unique object instance identifier (Integer). In the previous example is "BISST". It requires making a request to Triskell to get it. Please refer to Get object instance
- resource_id: unique user instance identifier (Integer). In previous example is "Tomás Barros Silva". It requires making a request to Triskell to get it.
- destination_dataobject_id: unique object instance identifier (Integer). In the previous example is "PRJ 001". It requires making a request to Triskell to get it.
5.2 Save Resource data
To use this call, we need to get some information from your instance to make it work properly.
What information do we need to assign a resource to a data object resource pool?
- Object instance to assign resource: "PRJ 001".
- Resource assigned: "Tomás Barros Silva".
- Input level: Global, Year, Half Year, Quarter, Month, Half Month, Week, Day
- Period: It’s an entry of Object Calendar that represents a period with same granularity of input level
- UnitId: Hour, Day, Week, Month, Year
- Units: The value to be applied to Resource at the period in the defined units
In this example we will set for the previous assigned resource the value of 150 Hours at Month 2017-01.
To add data to a resource pool you should make a similar request to Triskell like this:
This is the example content request:
|
{ "id": 0, "params": { "resource_id": "124", "destination_dataobject_id": "1064", "INPUT_LEVEL": "5", "PERIODID": "6144", "unitId":"1", "UNITS": "150" } , "objects": null } |
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. |
|
To keep data consistency, after several requests to this service for a given resource_id is mandatory to do one request to update parent assignments. Now you can get poolresource_id in the response: This field is mandatory for UpdateParentAssignments service. This new service is described in the next point. |
5.2.1 Fields description
5.2.1.1 Mandatory fields
- resource_id: unique user instance identifier (Integer). In previous example is "Tomás Barros Silva". It requires making a request to Triskell to get it.
- destination_dataobject_id: unique object instance identifier (Integer). In the previous example is "PRJ 001". It requires making a request to Triskell to get it.
- INPUT_LEVEL: the possible values are:
- PERIODID: unique calendar period (Integer). In previous example is "2017-01". It requires making a request to Triskell to get it.
- unitId: the possible values are:
- UNITS: BigDecimal value with decimal separator “.” and no thousands separator representing some value at unitId
5.3 Update parent assignments
This service updates data on the source of every pool resource and/or on the primary management entity.
| It’s mandatory to do one request to update parent assignments after several (or one) request to save resource data. But please avoid making one request for each resource data request when you are managing data for the same resource. |
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. |
This service will recursively update data if “update capacity from assignments” flag is checked in the parent object definition.
This is an example of the request:
This is the example content request:
|
{ "id": 0, "params": { "poolresourcesIdArray": "706", "startdate": "2020.02.05", "enddate": "2020.02.05" } , "objects": null } |
Or in alternative:
|
{ "id": 0, "params": { "dataobject_id": "1064", "resource_id": "124", "startdate": "2020.02.05", "enddate": "2020.02.05" } , "objects": null } |
5.3.1 Fields description
5.3.1.1 Mandatory fields
- poolresourcesIdArray: unique pool resource instance identifier (Integer). Only one integer value is allowed for this field in a rest request. You can get this value from the previous save resource data response in the id:
- dataobject_id (in alternative to poolresourcesIdArray): unique object instance identifier (Integer). In the previous example is "PRJ 001". It requires making a request to Triskell to get it.
- resource_id (in alternative to poolresourcesIdArray): unique user instance identifier (Integer). In previous example is "Tomás Barros Silva". It requires making a request to Triskell to get it.
5.3.1.2 Optional fields
- startdate: The start date from the period you use in the previous requests save resource data service. It’s optional at this moment but we plan to make it mandatory in the future to improve performance. Format is YYYY.MM.DD.
- enddate: The end date from the period you use in the previous requests save resource data service. It’s optional at this moment but we plan to make it mandatory in the future to improve performance. Format is YYYY.MM.DD.
5.4 Copy assignments to capacity
For a given instance this service will update all their resources from the pool copying the assignments into the capacity.
These are the restrictions for this service:
- It is only allowed for rest API users
- It is only allowed for objects using pool
- It is only allowed for manual capacity mode objects
- It is not available for custom components (for performance reasons)
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. |
In this example we will update the capacity from assignments for “PRJ 038”. The internal id for “PRJ 038” is 2077. You can extract the internal id from the reporting views.
Postman example:
This is the example content request:
|
{ "id": 0, "params": { "id": "2077" } , "objects": null } |
This is the example content OK response:
|
{ "authash": "03663e556a63170e8fe3b40667f6e09f", "executime": 1130310200, "success": true, "messages": [], "message": null, "ret_i18n_code": "", "ret_i18n_params": [], "resultType": 1, "data": null, "description": null, "id": 0, "ret_count": 0, "i18NParams": [], "i18NMessageId": "" }
|
This is the example content KO response:
|
{ "authash": "03663e556a63170e8fe3b40667f6e09f", "executime": 0, "success": false, "messages": [], "message": "1631651 not found ", "ret_i18n_code": "", "ret_i18n_params": [], "resultType": 3, "supportCode": "SUPPORTCODE[VElEWzJdVUlEWzEwMl1USU1FU1RBTVBbMTU3Mjg2ODk0NjEzNF0=]", "i18NParams": [], "i18NMessageId": "" }
|
5.5 Move resource data
This service moves pool data for a resource from the pool or for all resources from the pool. These are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. This service is not available for Gantt tasks custom components. You can only use this service if the object has a pool in the definition.Data cannot be moved to the past if there is already some data in the past. If there is no data on the past, you can move data to the past.This process will consider non-working days for every user. |
This is an example of the request:
This is the example content request:
|
{ "id": 0, "params": { "dataObjectId": "2079", "usersIdArray": "123,124", "oldStartDate: "2020.01.01", "newStartDate": "2020.02.01" } , "objects": null } |
5.5.1 Fields description
5.5.1.1 Mandatory fields
- dataObjectId: unique integer identifier for a dataobject.
- oldStartDate: the start date from which you want to move the data. Format is YYYY.MM.DD.
- newStartDate: the new start date where your data will be moved to. Format is YYYY.MM.DD.
5.5.1.2 Optional fields
- usersIdArray: Array of unique user’s instance identifiers (Integers). Comma separator. If this field is empty the service will move data for all users from the pool.
5.6 Generate resource profile
This service generates a profile for a set of users into the pool. These are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest api client user, security rules will not be considered. For other kinds of users, security rules will be considered. This service is available for Gantt leaves tasks custom components using “Fixed Duration” scheduling mode. You can only use this service if the object has a pool in the definition and you are using capacity mode.This process will consider non-working days for every user. |
This is an example of the request:
This is the example content request:
|
{ "id": 0, "params": { "dataobjectId": "2079", "profiletype": "2", "unitId": "1", "units": "4", "usersIdArray": "123", "fromPeriodId": "2020.01.01", "toPeriodId": "2020.02.01" } , "objects": null } |
5.6.1 Fields description
5.6.1.1 Mandatory fields
- dataobjectId: Unique integer identifier for a DataObject.
- profiletype: Integer value. These are available values:
- 1: Total units: it will spread the units value into the working days for each user between periods.
- 2: Units by period: It will set the units value into every working day for each user between periods.
- unitId: Integer value with these available values:
- units: It represents the number of units to generate the profile.
- usersIdArray: Array of integer values. Each value of the array is the user id. You can use comma as separator.
- fromPeriodId: The start date to fill data pool for a set of users. Format is YYYY.MM.DD.
- toPeriodId: The end date to fill data pool for a set of users. Format is YYYY.MM.DD.
5.7 Create Requirement
This service creates a requirement for one user on the specified DataObject. There are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. You can only use this service if Resource Management V2 is enabled, and the object has a pool in the definition, and you are using capacity mode. |
To use this call, the user logged in does not need to have the Configurator role in Triskell, also we need to get some information from your instance to make it work properly.
What information do we need to create the Requirement?
|
|
In this example we will create one requirement for the user Bernadette Hérbert on the PRJ 006, with the amount of 8 hours per day, from 05/12/2022 to 11/12/2022. Also, we will set the Status as Accepted.
To create the requirement on a DataObject you should do a similar request to Triskell like this:
This is the example content request:
|
{ "id": 0, "params": { "dataobjectId": "1069", "ResourceId": "711", "status": "253",
"StartDate": "2022-12-05", "EndDate": "2022-12-11",
"isDailyInput": true, "dailyUnits": "8", "totalUnits": "40",
"notes": "" }, "objects": null } |
5.7.1 Fields description
5.7.1.1 Mandatory fields
- dataobjectId: Unique integer identifier for a DataObject. In the previous example is “PRJ 006”. It requires making a request to Triskell to get it.
- ResourceId: Unique integer identifier for the resource on the DataObject. In the previous example is “Bernadette Hérbert”. It requires making a request to Triskell to get it.
- status: Unique integer identifier of the status for the requirement. Can be extracted from the UI on the configuration environment:
- StartDate: String with the beginning date of the period for the requirement. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “05/12/2022”.
- EndDate: String with the end date of the period for the requirement. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “11/12/2022”.
- isDailyInput: Boolean value to indicate if the requirement is set as a “Units/day” (TRUE) or “Total units” (FALSE). In the previous example is “yes”.
- dailyUnits: Numeric value to be set as the hours/day value of the requirement. In the previous example is 8.
- totalUnits: Numeric value to be set as the Total unit’s value of the requirement. In the previous example is 40.
5.7.1.2 Optional fields
- notes: String value to be set as the comments of the requirement. If not provided it will insert NULL for the value.
5.8 Update Requirement
This service allows you to update one requirement previously created, for one user on a specified DataObject. There are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. You can only use this service if Resource Management V2 is enabled, and the object has a pool in the definition, and you are using capacity mode. |
To use this call, the user logged in does not need to have the Configurator role in Triskell, also we need to get some information from your instance to make it work properly.
What information do we need to update one Requirement?
|
|
In this example we will change the requirement of the user Bernadette Hérbert on the PRJ 006, it will change the amount to a total of 20 hours, from 05/12/2022 to 19/12/2022. Also, we will change the Status to Cancelled and set one comment.
To change the requirement on a DataObject you should do a similar request to Triskell like this:
This is the example content request:
|
{ "id": 0, "params": { "Id": "52", "dataobjectId": "1069", "ResourceId": "711", "status": "255",
"StartDate": "2022-12-05", "EndDate": "2022-12-09",
"isDailyInput": false, "dailyUnits": "4", "totalUnits": "20",
"notes": "It was cancelled" }, "objects": null } |
5.8.1 Fields description
5.8.1.1 Mandatory fields
- Id: Unique integer identifier of the existing requirement to be changed. This value was returned on the previous service, the create requirement. If not saved, it requires making a request to Triskell to get it.
- dataobjectId: Unique integer identifier for a DataObject. In the previous example is “PRJ 006”. It requires making a request to Triskell to get it.
- ResourceId: Unique integer identifier for the resource on the DataObject. In the previous example is “Bernadette Hérbert”. It requires making a request to Triskell to get it.
- status: Unique integer identifier of the status for the requirement. Can be extracted from the UI on the configuration environment:
- StartDate: String with the beginning date of the period for the requirement. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “05/12/2022”.
- EndDate: String with the end date of the period for the requirement. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “09/12/2022”.
- isDailyInput: Boolean value to indicate if the requirement is set as a “Units/day” (TRUE) or “Total units” (FALSE). In the previous example is “no”.
- dailyUnits: Numeric value to be set as the hours/day value of the requirement. In the previous example is 4.
- totalUnits: Numeric value to be set as the Total unit’s value of the requirement. In the previous example is 20.
5.8.1.2 Optional fields
- notes: String value to be set as the comments of the requirement. If not provided it will insert NULL for the value. In the previous example is “It was cancelled”.
5.9 Remove Requirement
This service allows you to remove one requirement previously created, for one user on a specified DataObject. There are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. You can only use this service if Resource Management V2 is enabled, and the object has a pool in the definition, and you are using capacity mode. |
To use this call, the user logged in does not need to have the Configurator role in Triskell, also we need to get some information from your instance to make it work properly.
This service is now available on the Triskell swagger, and all the information needed, and documentation will be there. The swagger links will be available soon, and then this section of the document will be updated. If you need it for now, please ask support team.
Also, the Bruno examples have been updated to contain the new service.
5.10 Create Leave
This service creates a leave for one user on the specified leave DataObject. There are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. You can only use this service if Resource Management V2 is enabled, and the object has a pool in the definition, and you are using capacity mode. |
To use this call, the user logged in does not need to have the Configurator role in Triskell, also we need to get some information from your instance to make it work properly.
What information do we need to create one Leave?
|
In this example we will create one Leave of Sickness type for the user Sean Pearson on the Holiday Leave, from 03/02/2025 to 04/02/2052. Also, we will set the Status as Proposed.
To create the Leave on a DataObject you should make a similar request to Triskell like this:
This is the example content request:
|
{ "id": 0, "params": { "dataobjectId": "1247",
"npaId": "1248", "userId": "122", "status": "252", "StartDate":"2025-02-03", "EndDate": "2025-02-04" }, "objects": null } |
5.10.1 Fields description
5.10.1.1 Mandatory fields
- dataobjectId: Unique integer identifier for the source DataObject. In the previous example is “Holidays”. It requires making a request to Triskell to get it.
- npaId: Unique integer identifier for the Leave DataObject. In the previous example is “Sickness”. It requires making a request to Triskell to get it.
- userId: Unique integer identifier for the user. In the previous example is “Sean Pearson”. Can be extracted from the UI on the configuration environment:
- status: Unique integer identifier of the status for the requirement. Can be extracted from the UI on the configuration environment:
- StartDate: String with the beginning date of the period for Leave. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “03/02/2025”.
- EndDate: String with the end date of the period for Leave. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “04/02/2025”.
5.10.1.2 Optional fields
- notes: String value to be set as the comments of the Leave. If not provided it will insert NULL for the value.
5.11 Update Leave
This service allows you to update one leave previously created, for one user on a specified leave DataObject. There are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. You can only use this service if Resource Management V2 is enabled, and the object has a pool in the definition, and you are using capacity mode. |
To use this call, the user logged in does not need to have the Configurator role in Triskell, also we need to get some information from your instance to make it work properly.
What information do we need to update one Leave?
|
In this example we will change the leave of the user Sean Pearson on the Holidays, it will change the type of leave to Holidays, from 03/02/2025 to 07/02/2025. Also, we will change the Status to Accepted and make one comment.
To change the leave in a DataObject you should make a similar request to Triskell like this:
This is the example content request:
|
{ "id": 0, "params": { "Id": "68", "dataobjectId": "1247",
"npaId": "1247", "userId": "122", "status": "253", "StartDate":"2025-02-03", "EndDate": "2025-02-07", "notes": "It was approved" }, "objects": null } |
5.11.1 Fields description
5.11.1.1 Mandatory fields
- Id: Unique integer identifier of the existing leave assignment to be changed. This value was returned on the previous service, the create leave. If not saved, it requires making a request to Triskell to get it.
- dataobjectId: Unique integer identifier for the source DataObject. In the previous example is “Holidays”. It requires making a request to Triskell to get it.
- npaId: Unique integer identifier for the Leave DataObject. In the previous example is “Holidays”. It requires making a request to Triskell to get it.
- userId: Unique integer identifier for the user. In the previous example is “Sean Pearson”. Can be extracted from the UI on the configuration environment:
- status: Unique integer identifier of the status for the requirement. Can be extracted from the UI on the configuration environment:
- StartDate: String with the beginning date of the period for Leave. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “03/02/2025”.
- EndDate: String with the end date of the period for Leave. It must be provided in the ISO format (YYYY-MM-DD). In the previous example is “07/02/2025”.
5.11.1.2 Optional fields
- notes: String value to be set as the comments of the requirement. If not provided it will insert NULL for the value. In the previous example is “It was approved”.
5.12 Delete Leave
This service allows you to delete/remove one previously created leave for one user on a specified leave DataObject. There are some important points to consider using this service:
| If the logged user using this service is a configurator or a rest API client user, security rules will not be considered. For other kinds of users, security rules will be considered. You can only use this service if Resource Management V2 is enabled, and the object has a pool in the definition, and you are using capacity mode. |
To use this call, the user logged in does not need to have the Configurator role in Triskell, also we need to get some information from your instance to make it work properly.
What information do we need to delete one Leave?
|
In this example we will delete the leave of the user Sean Pearson on the Holidays source Data Object.
To delete the leave on DataObject you should do a similar request to Triskell like this:
This is the example content request:
|
{ "id": 0, "params": { "Id": "68", "dataobjectId": "1247",
"userId": "122" }, "objects": null } |
To see if the Leave was deleted you can check on Triskell.
5.12.1 Fields description
5.12.1.1 Mandatory fields
- Id: Unique integer identifier of the existing leave assignment to be changed. This value was returned on the previous service, the create leave. If not saved, it requires making a request to Triskell to get it.
- dataobjectId: Unique integer identifier for the source DataObject. In the previous example is “Holidays”. It requires making a request to Triskell to get it.
- userId: Unique integer identifier for the user. In the previous example is “Sean Pearson”. Can be extracted from the UI on the configuration environment:
5.12.1.2 Optional fields
N/A
6 Auxiliary Services to get data
In this section it will be explained how to extract data required to call main services.
6.1 Get object instance
To get the object instance id from Triskell it's needed to make a request to Triskell. Triskell allows extract data from your instance using reports. You need a stored selector to build your report. This report requires at least one parameter to get the object instance id.
Create the report parameter on Triskell configuration environment, for example:
Get the parameter id (it will be used in next steps):
Create the stored selector using the parameter:
Then you can test the query to check that you get the id properly:
This is the result:
This is the query for the example above:
|
select dataobject_id from tenant_vw_project where dataobject_name = ##DATAOBJECTNAME## |
This view contains all projects data.
Once you create and test your stored selector, you need to create the associated report:
Now you can get your report id to use the operational service to extract this data:
Now we have all the id's needed to get our object instance id dynamically from our API rest:
Where "valuesByParams" format is:
|
{paramId1}#{paramValue1}##{paramId2}#{paramValue2}##....##{paramIdn}#{paramValuen}
|
| Login request is required.This example request is for this specific example you can manage it to fit your functional needs. |
6.2 Get period
In this section we describe how to get the period identifier from Triskell. Triskell allows extract data from your instance using reports. You need a stored selector to build your report.
First, we need to get the calendar that is using your timephased attribute:
Then we can get the calendar id from the UI:
This report requires one parameter to get the period id.
PERIOD (Text):
Create the stored selector using the parameter:
Then you can test the query to check that you get the id properly:
This is the result on this example:
This is the query for the example above:
|
select period_id from tenant_vw_calendar where calendar_id = 2 and period_type_id = 5 and labellong = ##PERIOD## |
This view contains all calendar periods.
period_type_id = 5 is monthly and labellong format for monthly scale is 'YYYY-MM'.
Once you create and test your stored selector, you need to create the associated report:
Now we have all id's needed and report to get period id dynamically from our API rest.
| Validate that the calendar you are using to get this information is the same as timephased attribute definition. |
6.3 Get Resource
In this section we describe how to get the ResourceId identifier from Triskell. Triskell allows extract data from your instance using reports. You need a stored selector to build your report.
This report requires two parameters to get the ResourceId.
dataobject_name (Text):
user_name (Text):
Create the stored selector using the parameters:
Then you can test the query to check that you get the id properly:
This is the result on this example:
This is the query for the example above:
|
SELECT target_pool_resources_id FROM tenant_vw_resource_pool_assignation WHERE target_dataobject_name = ##dataobject_name## AND user_name LIKE ##user_name## |
This view contains all resources on all dataobjects.
Once you create and test your stored selector, you need to create the associated report:
Now we have all id's needed and report to get resource pool id dynamically from our API rest.
| Validate that the resource you are using to get this information is in the same project. |
6.4 Get Resource Assignment
In this section we describe how to get the Resource Assignment Id identifier from Triskell. Triskell allows extract data from your instance using reports. You need a stored selector to build your report.
This report requires two parameters to get the Resource Assignment Id.
dataobject_name (Text):
user_name (Text):
Create the stored selector using the parameters:
Then you can test the query to check that you get the id properly:
This is the result of this example:
This is the query for the example above:
|
SELECT assignment_id FROM tenant_vw_resource_assignments WHERE dataobject_name = ##dataobject_name## AND user_name LIKE ##user_name## |
This view contains all assignments on all dataobjects.
Once you create and test your stored selector, you need to create the associated report:
Now we have all id's needed and report to get the assignment id dynamically from our API rest.
| Validate that the resource you are using to get this information is the same project. |
Comments
0 comments
Please sign in to leave a comment.