Skip to main content
Skip table of contents

Baseline Resource


Shared objects

Baseline parameters

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

Fields:

NameTypeRequiredDescriptionCompatible baseline types
startDateSpec
StringYes

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
StringYes

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
StringNo, 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
StringNo, 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:

Example of Resource

JS
{
    "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:

ParameterTypeDescription
nameStringName of the new baseline.
typeString

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

paramsBaseline parameters object

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


URL Parameters:

ParameterTypeDescription
ganttIdNumberID of the Gantt chart for which the baseline will be created.

Examples:

BASH
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
BASH
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
JS
{
  "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.
JS
{
  "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.
JS
{
  "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:

ParameterTypeDescription
baselineIdLongThe unique ID of the baseline.

Example:

BASH
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
JS
{
  "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.
JS
{
  "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/

MethodGET

URL Parameters:

ParameterTypeDescription
ganttIdLongThe unique ID of the Gantt chart.

Example:

BASH
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
JS
[
  {
    "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.
JS
{
  "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:

ParameterTypeDescription
baselineIdNumberID of the baseline to be updated.

Body Parameters:

ParameterTypeRequiredDescription
nameStringNoNew name for the baseline.
paramsBaseline parameters objectNo

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:

BASH
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
JS
{
  "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.
JS
{
  "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:

ParameterTypeDescription
baselineIdNumberThe unique ID of the baseline.
Example:
BASH
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 404 application/json - error message if the baseline doesn't exist or the user doesn't have permission to delete the baseline.

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


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.