Resource Leveling Resource
Shared objects
Resource
Represents one resource object for which leveling will be applied.
Fields:
Name | Type | Required | Description |
---|---|---|---|
key | String | Yes | The identifier for the resource, which varies based on the type:
You can find more details in Resources Configuration. |
type | String | Yes | Specifies the type of the resource, with possible values:
|
Example:
Example of Resource
{
"key": "JIRAUSER10000",
"type": "user"
}
Options
Represents Resource Leveling process options. The list of available options may be extended in the future.
Fields:
Name | Type | Required | Description |
---|---|---|---|
levelManual | String | No, false by default | By default, manually scheduled tasks will not be adjusted by resource leveling. To include them, enable this option. |
levelResolved | String | No, false by default | If enabled, resolved tasks may be moved if they are part of resource overallocation. |
levelInProgress | String | No, false by default | By default, tasks considered in progress (based on the Progress Calculation settings in the Gantt Configuration) are not affected by resource leveling. If this option is enabled, these tasks may be moved by leveling if their original estimate results in resource overallocation. Acceptable values: "true" or "false" |
clearLevelingDelay | String | No, false by default | Enabling this option clears any existing delays, allowing Structure.Gantt to consider all tasks from their original positions when applying the leveling. Acceptable values: "true" or "false" |
Example:
Example of Resource
{
"levelResolved": "true",
"levelInProgress": "false",
"levelManual": "false",
"clearLevelingDelay": "true"
}
Resource Leveling endpoints
Initiate a resource leveling process
Initiates a resource leveling process, which applies the results to the tasks associated with the resources. This method only starts the leveling process and returns information about the initiated process immediately, without waiting for the process to complete.
URL: /gantt/{ganttId}/leveling/
Method: POST
URL Parameters:
Parameter | Type | Description |
---|---|---|
ganttId | Number | ID of the Gantt chart for which the resource leveling process will be started. |
Body Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
startDay | String | No | Only overallocations that occur after the chosen date will be resolved. Possible values:
|
resources | Array of Resource objects | No | List of resources for which resource leveling will be applied. See the description of Resource object above. If this parameter is not specified, leveling will be applied to all resources in this Gantt chart. |
options | Options object | No | See the description of Options object above. |
Examples:
curl -X POST --location "http://example.com/rest/structure-gantt/public/1.0/gantt/117/leveling/start" \
-H "Content-Type: application/json" \
-d '{
"startDay": "projectStart",
"resources": [
{
"key": "JIRAUSER10000",
"type": "user"
}
],
"options": {
"levelResolved": "true",
"levelInProgress": "false",
"levelManual": "false",
"clearLevelingDelay": "true"
}
}' \
--basic --user user:password
curl -X POST --location "http://example.com/rest/structure-gantt/public/1.0/gantt/117/leveling/start" \
-H "Content-Type: application/json" \
-d '{
"startDay": "today",
"resources": [
{
"key": "Team 1",
"type": "team"
}
],
"options": {
"levelResolved": "false",
"levelInProgress": "false",
"levelManual": "false",
"clearLevelingDelay": "true"
}
}' \
--basic --user user:password
curl -X POST --location "http://example.com/rest/structure-gantt/public/1.0/gantt/117/leveling/start" \
-H "Content-Type: application/json" \
-d '{
"startDay": "2024-02-05"
}' \
--basic --user user:password
Responses
STATUS 202 application/json - returns description of the started resource leveling process.
Example
{
"ganttId": 117,
"nodeId": "single_node",
"version": 4,
"user": "JIRAUSER10000",
"progress": 0,
"startDay": "2023-12-20",
"resources": [
{
"key": "JIRAUSER10000",
"type": "user"
}
],
"params": {
"levelAgile": "false",
"levelInProgress": "false",
"clearLevelingDelay": "true",
"isAllResources": "false",
"levelManual": "false",
"levelResolved": "true"
}
}
STATUS 404 application/json - error message if the specified Gantt chart doesn't exist or if the user doesn't have permission to start resource leveling for it.
{
"message": "Gantt chart #118 does not exist or user doesn't have permission to start leveling run for it"
}
Get information about the running resource leveling process
Get information about the running resource leveling process for the specified Gantt Chart.
URL: /gantt/{ganttId}/leveling/
Method: GET
URL Parameters:
Parameter | Type | Description |
---|---|---|
ganttId | Number | ID of the Gantt chart. |
Example:
curl -X GET --location "http://example.com/rest/structure-gantt/public/1.0/gantt/42/leveling" \
-H "Content-Type: application/json" \
--basic --user user:password
Responses
STATUS 200 application/json - response with information about the current resource leveling run.
{
"ganttId": 42,
"nodeId": "node1",
"version": 1,
"user": "admin",
"progress": 80,
"startDay": "2023-09-21",
"resources": [
{ "key": "JIRAUSER10000", "type": "user"},
{ "key": "Team 1", "type": "team"}
],
"options": {
"levelResolved": "true",
"levelInProgress": "false",
"levelManual": "false",
"clearLevelingDelay": "true"
}
}
Example
STATUS 404 application/json - error message if there is no running resource leveling process for specified Gantt chart.
{
"message": "There is no leveling run for specified gantt"
}
STATUS 404 application/json - error message if the specified Gantt chart doesn't exist or the user doesn't have permission to get information about leveling processes for it.
{
"message": "Gantt chart #42 does not exist or user doesn't have permission to get information about running resource leveling for it"
}
Clear existing leveling delays
Clear existing leveling delays for the specified Gantt Chart.
URL: /gantt/{ganttId}/leveling/clear
Method: POST
URL Parameters:
Parameter | Type | Description |
---|---|---|
ganttId | Number | ID of the Gantt chart for which leveling delays will be cleared. |
Body Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
startDay | String | No | Only leveling delays for the tasks which are placed after the startDay will be cleared. Possible values:
|
resources | Array of Resource objects | No | List of resources for which leveling delays will be cleared. See the description of Resource object above. If this parameter is not specified, leveling delays will be cleared for all resources in this Gantt chart. |
Example:
curl -X POST --location "http://example.com/rest/structure-gantt/public/1.0/gantt/42/leveling/clear" \
-H "Content-Type: application/json" \
-d '{
"startDay": "projectStart",
"resources": [
{
"key": "JIRAUSER10000",
"type": "user"
},
{
"key": "Team 1",
"type": "team"
}
]
}' \
--basic --user user:password
Responses
STATUS 202 application/json - empty results if there are no errors and leveling delays were cleared successfully.
STATUS 404 application/json - error message if the specified Gantt chart doesn't exist or the user doesn't have permission to clear leveling delays for it
{
"message": "Gantt chart #120 does not exist or user doesn't have permission to clear leveling delays for it"
}
Stop resource leveling process for the specified Gantt Chart
Stop the running resource leveling process for the specified Gantt Chart based on nodeId and version. Will stop the running process only if it matches the specified values for nodeId and version. This check is necessary to avoid stopping another process that may have been started between the start of the original process and the termination request.
URL: /gantt/{ganttId}/leveling/stop
Method: POST
URL Parameters:
Parameter | Type | Description |
---|---|---|
ganttId | Number | ID of the Gantt chart for which the existing resource leveling process will be stopped. |
Body Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
nodeId | String | Yes | ID of the node which is performing the current resource leveling process. |
version | Number | Yes | Version of the resource leveling process. |
Example:
curl -X POST --location "http://example.com/rest/structure-gantt/public/1.0/gantt/117/leveling/stop" \
-H "Content-Type: application/json" \
-d '{
"nodeId": "single_node",
"version": 2
}' \
--basic --user user:password
Responses
STATUS 202 application/json - returns an empty response when the resource leveling process was stopped successfully.
Example
STATUS 404 application/json - error message if there is no running resource leveling process with the specified Gantt chart, nodeId, and version.
{
"message": "There is no leveling run for specified gantt, version and nodeId"
}
STATUS 404 application/json - error message if the specified Gantt chart doesn't exist or the user doesn't have permission to stop Resource Leveling for it.
{
"message": "Gantt chart #42 does not exist or user doesn't have permission to stop Resource Leveling for it"
}