Document toolboxDocument toolbox

This article is for Data Center. Visit Cloud

Resource Leveling Resource


Shared objects

Resource

Represents one resource object for which leveling will be applied.

Fields:

NameTypeRequiredDescription
keyStringYes

The identifier for the resource, which varies based on the type:

  • For "user" type, this should be the user key (e.g., "JIRAUSER10000").
  • For "team" type, this is the text name representation of the team.

You can find more details in Resources Configuration.

typeStringYes

Specifies the type of the resource, with possible values:

  • user: Indicates an individual user.
  • team: Represents a team resource. You can find more details in Resources Configuration.

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:

NameTypeRequiredDescription
levelManualStringNo, false by default

By default, manually scheduled tasks will not be adjusted by resource leveling. To include them, enable this option.
Acceptable values: "true" or "false"

levelResolvedStringNo, false by default

If enabled, resolved tasks may be moved if they are part of resource overallocation.
Acceptable values: "true" or "false"

levelInProgressStringNo, false by defaultBy 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"
clearLevelingDelayStringNo, 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:

ParameterTypeDescription
ganttIdNumberID of the Gantt chart for which the resource leveling process will be started.

Body Parameters:

ParameterTypeRequiredDescription
startDayStringNoOnly overallocations that occur after the chosen date will be resolved.
Possible values:
  • Date in the default ISO format YYYY-MM-DD, e.g., 2024-01-01
  • "projectStart" - to apply Resource Leveling to all overallocations that occur after the project's start date. This is the default value which will be used if startDay is not specified.
  • "today" - to apply Resource Leveling to all overallocations that occur after the current date.
resourcesArray of Resource objectsNo

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.

optionsOptions objectNo

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:

ParameterTypeDescription
ganttIdNumberID 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:

ParameterTypeDescription
ganttIdNumberID of the Gantt chart for which leveling delays will be cleared.

Body Parameters:

ParameterTypeRequiredDescription
startDayStringNoOnly leveling delays for the tasks which are placed after the startDay will be cleared.
Possible values:
  • Date in the default ISO format YYYY-MM-DD, e.g., 2024-01-01
  • "projectStart" - to apply Resource Leveling to all overallocations that occur after the project's start date. This is the default value which will be used if startDay is not specified.
  • "today" - to apply Resource Leveling to all overallocations that occur after the current date.
resourcesArray of Resource objectsNo

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:

ParameterTypeDescription
ganttIdNumberID of the Gantt chart for which the existing resource leveling process will be stopped.

Body Parameters:

ParameterTypeRequiredDescription

nodeId

StringYes

ID of the node which is performing the current resource leveling process.
The nodeId should correspond to the one provided in the response from the start method.

versionNumberYes

Version of the resource leveling process.
The version should correspond to the one provided in the response from the start method.


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"
}