Gantt Charts for Structure (DC)
Breadcrumbs

Resource Leveling Resource

/*<![CDATA[*/ div.rbtoc1764615421839 {padding: 0px;} div.rbtoc1764615421839 ul {list-style: disc;margin-left: 0px;} div.rbtoc1764615421839 li {margin-left: 0px;padding-left: 0px;} /*]]>*/ Shared objects Resource Leveling endpoints Initiate a resource leveling process Get information about the running resource leveling process Clear existing leveling delays Stop resource leveling process for the specified Gantt Chart
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:

  • 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.

type

String

Yes

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:

JavaScript
{
  "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.
Acceptable values: "true" or "false"

levelResolved

String

No, false by default

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

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:

JavaScript
{
	"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/

MethodPOST

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:

  • 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.

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:

Bash
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
Bash
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
Bash
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
JavaScript
{
  "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.
JavaScript
{
  "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/

MethodGET

URL Parameters:

Parameter

Type

Description

ganttId

Number

ID of the Gantt chart.

Example:

Bash
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.

JavaScript
  {
    "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.
JavaScript
{
  "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.
JavaScript
{
   "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

MethodPOST

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:

  • 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.

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:

Bash
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
JavaScript
{
  "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

MethodPOST

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.
The nodeId should correspond to the one provided in the response from the start method.

version

Number

Yes

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


Example:

Bash
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.
JavaScript
{
  "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.
JavaScript
{
  "message": "Gantt chart #42 does not exist or user doesn't have permission to stop Resource Leveling for it"
}