Gantt Charts for Structure (DC)
Breadcrumbs

Baseline Resource

/*<![CDATA[*/ div.rbtoc1761762474597 {padding: 0px;} div.rbtoc1761762474597 ul {list-style: disc;margin-left: 0px;} div.rbtoc1761762474597 li {margin-left: 0px;padding-left: 0px;} /*]]>*/ Shared objects Baseline Resource endpoints Create a baseline for the specified Gantt chart Get baseline by ID Get baselines for a specified Gantt chart Update baseline Remove baseline
Shared objects

Baseline parameters

Represents baseline parameters. The list may be extended in the future.

Fields:

Name

Type

Required

Description

Compatible baseline types

startDateSpec

String

Yes

The attribute specification of the custom field that contains the start dates that should be used to schedule tasks for the baseline.

For additional details on the attribute specification, please refer to the structure documentation .

Jira-based

finishDateSpec

String

Yes

The attribute specification of the custom field that contains the finish date that should be used to schedule tasks for the baseline.

For additional details on the attribute specification, please refer to the structure documentation .

Jira-based

singleStartAsMilestone

String

No, false by default

If this option is enabled, tasks that only have a value in the Start Date field will appear as milestones in the baseline.

Jira-based

singleFinishAsMilestone

String

No, false by default

If this option is enabled, tasks that only have a value in the Finish Date field will appear as milestones in the baseline.

Jira-based

Example:

{
    "startDateSpec":  "{\"id\":\"created\",\"format\":\"time\"}",
    "finishDateSpec": "{\"id\": \"resolved\",\"format\":\"time\"}",
    "singleStartAsMilestone": true,
    "singleFinishAsMilestone": false
}

Baseline Resource endpoints

Create a baseline for the specified Gantt chart

Create a baseline for the specified Gantt chart.

URL/gantt/{ganttId}/baseline/

MethodPOST

Body Parameters:

Parameter

Type

Description

name

String

Name of the new baseline.

type

String

Type of baseline, either "gantt" or "jira-based".
See Baselines page for more details.

params

Baseline parameters object

Object with properties of the new baseline. See description of Baseline parameters object above.


URL Parameters:

Parameter

Type

Description

ganttId

Number

ID of the Gantt chart for which the baseline will be created.

Examples:

curl -X POST --location "http://example.com/rest/structure-gantt/public/1.0/gantt/114/baseline/" \
    -H "Content-Type: application/json" \
    -d '{
          "name": "New Jira-based baseline",
          "type": "jira-based",
          "params": {
            "startDateSpec":  "{\"id\":\"created\",\"format\":\"time\"}",
            "finishDateSpec": "{\"id\": \"resolved\",\"format\":\"time\"}",
            "singleStartAsMilestone": true,
            "singleFinishAsMilestone": false
          }
        }' \
    --basic --user user:password
curl -X POST --location "http://example.com/rest/structure-gantt/public/1.0/gantt/114/baseline/" \
    -H "Content-Type: application/json" \
    -d '{
          "name": "New baseline Gantt",
          "type": "gantt"
        }' \
    --basic --user user:password


Responses

Status 200  application/json - returns created baseline object.

Example
{
  "id": 62,
  "ganttId": 114,
  "name": "New Jira-based baseline",
  "createdAt": "2024-02-01T10:09:48.292Z",
  "creator": "JIRAUSER10000",
  "type": "jira-based",
  "params": {
    "startDateSpec": "{\"id\":\"created\",\"format\":\"time\"}",
    "finishDateSpec": "{\"id\":\"resolved\",\"format\":\"time\"}",
    "singleStartAsMilestone": true,
    "singleFinishAsMilestone": false
  }
}
Status 404 application/json - error message if user doesn't have permission to create baselines for the specified Gantt chart.
{
  "message": "Gantt #114 does not exist or you don't have permission to edit it"
}
Status 400 application/json - error message if startDateSpec or finishDateSpec parameters are not passed for a Jira-based baseline.
{
  "message": "Attribute specification for start date or finish date is not provided"
}

Get baseline by ID

Retrieves the baseline by its id.

URL/baseline/{baselineId}

MethodGET

URL Parameters:

Parameter

Type

Description

baselineId

Long

The unique ID of the baseline.

Example:

curl -X GET --location "http://example.com/rest/structure-gantt/public/1.0/baseline/42" \
    -H "Content-Type: application/json" \
    --basic --user user:password


Responses

Status 200  application/json - returns baseline object.

Example
{
  "id": 42,
  "ganttId": 50,
  "name": "New baseline",
  "createdAt": "2024-01-30T09:49:09.047Z",
  "creator": "JIRAUSER10000",
  "type": "gantt",
  "params": {}
}
Status 404 application/json - error message if the baseline wasn't found or the user doesn't have permission to view it.
{
  "message": "Baseline #60 does not exist or you don't have permission to view it"
}

Get baselines for a specified Gantt chart

Retrieve baselines for a specified Gantt chart.

URL/gantt/{ganttId}/baseline/

Method: GET

URL Parameters:

Parameter

Type

Description

ganttId

Long

The unique ID of the Gantt chart.

Example:

curl -X GET --location "http://example.com/rest/structure-gantt/public/1.0/gantt/42/baseline/" \
    -H "Content-Type: application/json" \
    --basic --user user:password


Responses

Status 200  application/json - returns a list of baselines for the specified Gantt chart.

Example
[
  {
    "id": 58,
    "ganttId": 114,
    "name": "New Jira-based baseline",
    "createdAt": "2024-02-02T15:29:04.922Z",
    "creator": "JIRAUSER10000",
    "type": "jira-based",
    "params": {
      "startDateSpec": "{\"id\":\"created\",\"format\":\"time\"}",
      "finishDateSpec": "{\"id\":\"resolved\",\"format\":\"time\"}",
      "singleStartAsMilestone": true,
      "singleFinishAsMilestone": false
    }
  },
  {
    "id": 59,
    "ganttId": 114,
    "name": "New baseline Gantt",
    "createdAt": "2024-02-02T15:29:04.922Z",
    "creator": "JIRAUSER10000",
    "type": "gantt",
    "params": {}
  }
]
Status 404 application/json - error message if the Gantt chart wasn't found or the user doesn't have permission to view it.
{
  "message": "Gantt #42 does not exist or you don't have permission to view it"
}

Update baseline

Update the baseline.

URL/baseline/{baselineId}

MethodPUT

URL Parameters:

Parameter

Type

Description

baselineId

Number

ID of the baseline to be updated.

Body Parameters:

Parameter

Type

Required

Description

name

String

No

New name for the baseline.

params

Baseline parameters object

No

Object with parameters of the baseline, with each parameter being optional. Only the parameters provided will be updated.

See description of Baseline parameters object above.


Example:

curl -X PUT --location "http://example.com/rest/structure-gantt/public/1.0/baseline/60" \
    -H "Content-Type: application/json" \
    -d '{
          "name": "New baseline name",
          "params": {
            "singleFinishAsMilestone": true
          }
        }' \
    --basic --user user:password


Responses

Status 200  application/json - returns updated baseline object.

Example
{
  "id": 62,
  "ganttId": 114,
  "name": "New baseline name",
  "createdAt": "2024-02-01T10:09:48.292Z",
  "creator": "JIRAUSER10000",
  "type": "jira-based",
  "params": {
    "startDateSpec": "{\"id\":\"created\",\"format\":\"time\"}",
    "finishDateSpec": "{\"id\":\"resolved\",\"format\":\"time\"}",
    "singleStartAsMilestone": true,
    "singleFinishAsMilestone": true
  }
}
Status 404 application/json - error message if the baseline doesn't exist or the user doesn't have permission to update baselines for the specified Gantt chart.
{
  "message": "Baseline #60 does not exist or you don't have permission to edit it"
}

Remove baseline

Remove baseline by ID.

URL/baseline/{baselineId}

MethodDELETE

URL Parameters:

Parameter

Type

Description

baselineId

Number

The unique ID of the baseline.

Example:

curl -X DELETE --location "http://example.com/rest/structure-gantt/public/1.0/baseline/42" -H "Content-Type: application/json" --basic --user user:password

Success Response:

Status 202  application/json - empty response if baseline was removed successfully.

Error Responses:

Status 404application/json - error message if the baseline doesn't exist or the user doesn't have permission to delete the baseline.

{
  "message": "Baseline #60 does not exist or you don't have permission to edit it"
}