View

Description

View the current change request for a story.

Request

HTTP Method: GET

Path Parameter Description
story_id The ID of the story.
draft_id Optional The ID of the draft. About drafts.

Sample request

curl -X GET \
  https://<<META.tenant.domain>>/api/v1/stories/<<story_id>>/change_request/view  \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \

Response

A successful request will return a JSON object describing the change request, if a change request exists. If a test story has changes but a change request has not been submitted for review, change_request will be null.

Field description

Parameter Description
id The story container ID.
draft_id ID of the selected draft.
draft_name Name of the selected draft.
change_request The change request. This contains id, the ID of the request, name, the name of the request, description, the description of the request, status, the status of the request which is one of "PENDING" or "APPROVED", and live_story_export and draft_export which capture the export of the live story and the draft respectively. Please note that story_diff is now DEPRECATED.

Sample response

{
  "id": 154,
  "draft_id": 1234,
  "draft_name": "Initial Draft",
  "change_request": {
    "id": 21,
    "name": "Change request name",
    "description": "Description of proposed changes",
    "status": "PENDING",
    "live_story_export": "{\"schema_version\":26,\"standard_lib_version\":83,\"action_runtime_version\":35,\"name\":\"Story 1\",\"description\":\"Example description\",\"guid\":\"b20c18537050fcfbbf01b87ba3a82fef\",\"slug\":\"story_1\",\"agents\":[],\"diagram_notes\":[],\"links\":[],\"diagram_layout\":\"{}\",\"story_library_metadata\":{},\"monitor_failures\":false,\"synchronous_webhooks_enabled\":false,\"integrations\":[],\"parent_only_send_to_story\":false,\"keep_events_for\":604800,\"reporting_status\":true,\"send_to_story_enabled\":false,\"entry_agent_guid\":null,\"exit_agent_guids\":[],\"api_entry_action_guids\":[],\"api_exit_action_guids\":[],\"send_to_story_access\":null,\"send_to_story_access_source\":0,\"send_to_story_skill_use_requires_confirmation\":true,\"pages\":[],\"tags\":[],\"time_saved_unit\":\"minutes\",\"time_saved_value\":0,\"origin_story_identifier\":\"cloud:93b6b6f3c7c8d824afc9cb6d0b32454c:b20c18537050fcfbbf01b87ba3a82fef\",\"recipients\":[\"person_1@example.com\"],\"integration_product\":null,\"integration_vendor\":null,\"llm_product_instructions\":\"\",\"exported_at\":\"2023-10-16T11:16:25Z\"}",
    "draft_export": "{\"schema_version\":26,\"standard_lib_version\":83,\"action_runtime_version\":35,\"name\":\"Story 1\",\"description\":\"Example description\",\"guid\":\"a8e4709bbede0ce3db932c863285a747\",\"slug\":\"story_1_test0\",\"agents\":[{\"type\":\"Agents::EventTransformationAgent\",\"name\":\"New action\",\"disabled\":false,\"description\":null,\"guid\":\"c7b71ef79ca29ae68b7763714c12dd05\",\"origin_story_identifier\":\"cloud:93b6b6f3c7c8d824afc9cb6d0b32454c:a8e4709bbede0ce3db932c863285a747\",\"options\":{\"mode\":\"message_only\",\"loop\":false,\"payload\":{\"message\":\"This is an optional message\"}},\"reporting\":{\"time_saved_value\":0,\"time_saved_unit\":\"minutes\"},\"monitoring\":{\"monitor_all_events\":false,\"monitor_failures\":false,\"monitor_no_events_emitted\":null},\"template\":{\"created_from_template_guid\":null,\"created_from_template_version\":null,\"template_tags\":[]},\"width\":null,\"schedule\":null}],\"diagram_notes\":[],\"links\":[],\"diagram_layout\":\"{\\\"c7b71ef79ca29ae68b7763714c12dd05\\\":[300,300]}\",\"story_library_metadata\":{},\"monitor_failures\":false,\"synchronous_webhooks_enabled\":false,\"integrations\":[],\"parent_only_send_to_story\":false,\"keep_events_for\":604800,\"reporting_status\":true,\"send_to_story_enabled\":false,\"entry_agent_guid\":null,\"exit_agent_guids\":[],\"api_entry_action_guids\":[],\"api_exit_action_guids\":[],\"send_to_story_access\":null,\"send_to_story_access_source\":0,\"send_to_story_skill_use_requires_confirmation\":true,\"pages\":[],\"tags\":[],\"time_saved_unit\":\"minutes\",\"time_saved_value\":0,\"origin_story_identifier\":\"cloud:93b6b6f3c7c8d824afc9cb6d0b32454c:b20c18537050fcfbbf01b87ba3a82fef\",\"recipients\":[\"person_1@example.com\"],\"integration_product\":null,\"integration_vendor\":null,\"llm_product_instructions\":\"\",\"exported_at\":\"2023-10-16T11:16:25Z\"}",
    "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?