Create

Description

Create a change request. About drafts.

Request

HTTP Method: POST

Query Parameter Description
title Optional The change request name.
description Optional A user-defined description of the change request. For mentioning users, use the notation <@user-2435>, replacing '2435' with the user ID.
draft_id Optional The ID of the draft.
Path Parameter Description
story_id The ID of the story.

Sample request

curl -X POST \
  https://<<META.tenant.domain>>/api/v1/stories/<<story_id>>/change_request  \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
        "title": "Sample Change Request",
        "description": "A sample change request"
      }'

Response

A successful request will return a JSON object describing the change request

Field description

Parameter Description
id The story container ID.
change_request The change request.
story_diff An array containing changes made to the story
draft_id ID of the selected draft.
draft_name Name of the selected draft.

Sample response

{
  "id": 154,
  "draft_id": 1234,
  "draft_name": "Initial Draft",
  "change_request": {
    "id": 21,
    "story_diff": [
      {
        "operation": "add",
        "target": "action",
        "versions": [
          {
            "name": "New action",
            "guid": "c7b71ef79ca29ae68b7763714c12dd05",
            "disabled": false,
            "description": null,
            "options": {
              "mode": "message-only",
              "message": "This is an optional message"
            },
            "position": {
              "x": 300,
              "y": 300
            },
            "schedule": null,
            "reporting": {
              "time_saved_value": 0,
              "time_saved_unit": "minutes"
            },
            "monitoring": {
              "monitor_all_events": false,
              "monitor_failures": false,
              "monitor_no_events_emitted": null
            },
            "width": null
          }
        ],
        "data": {
          "name": "New action",
          "type": "eventTransformation",
          "modified_at": "2023-10-16T11:16:25Z",
          "participants": []
        }
      }
    ]
  }
}
Was this helpful?