Asana · Schema

StoryResponse

CollaborationProductivityProject ManagementProjectsTask ManagementTasksWorkflow
View JSON Schema on GitHub

JSON Schema

asana-storyresponse-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/StoryResponse",
  "title": "StoryResponse",
  "allOf": [
    {
      "$ref": "#/components/schemas/StoryBase"
    },
    {
      "type": "object",
      "properties": {
        "created_by": {
          "$ref": "#/components/schemas/UserCompact"
        },
        "type": {
          "type": "string",
          "enum": [
            "comment",
            "system"
          ],
          "readOnly": true,
          "example": "comment"
        },
        "is_editable": {
          "description": "*Conditional*. Whether the text of the story can be edited after creation.",
          "type": "boolean",
          "readOnly": true,
          "example": false
        },
        "is_edited": {
          "description": "*Conditional*. Whether the text of the story has been edited after creation.",
          "type": "boolean",
          "readOnly": true,
          "example": false
        },
        "hearted": {
          "description": "*Deprecated - please use likes instead*\n*Conditional*. True if the story is hearted by the authorized user, false if not.",
          "type": "boolean",
          "readOnly": true,
          "example": false
        },
        "hearts": {
          "description": "*Deprecated - please use likes instead*\n\n*Conditional*. Array of likes for users who have hearted this story.",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Like"
          },
          "readOnly": true
        },
        "num_hearts": {
          "description": "*Deprecated - please use likes instead*\n\n*Conditional*. The number of users who have hearted this story.",
          "type": "integer",
          "readOnly": true,
          "example": 5
        },
        "liked": {
          "description": "*Conditional*. True if the story is liked by the authorized user, false if not.",
          "type": "boolean",
          "readOnly": true,
          "example": false
        },
        "likes": {
          "description": "*Conditional*. Array of likes for users who have liked this story.",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Like"
          },
          "readOnly": true
        },
        "num_likes": {
          "description": "*Conditional*. The number of users who have liked this story.",
          "type": "integer",
          "readOnly": true,
          "example": 5
        },
        "previews": {
          "description": "*Conditional*. A collection of previews to be displayed in the story.\n\n*Note: This property only exists for comment stories.*",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Preview"
          },
          "readOnly": true
        },
        "old_name": {
          "description": "*Conditional*'",
          "type": "string",
          "example": "This was the Old Name"
        },
        "new_name": {
          "description": "*Conditional*",
          "type": "string",
          "nullable": true,
          "readOnly": true,
          "example": "This is the New Name"
        },
        "old_dates": {
          "$ref": "#/components/schemas/StoryResponseDates"
        },
        "new_dates": {
          "$ref": "#/components/schemas/StoryResponseDates"
        },
        "old_resource_subtype": {
          "description": "*Conditional*",
          "type": "string",
          "readOnly": true,
          "example": "default_task"
        },
        "new_resource_subtype": {
          "description": "*Conditional*",
          "type": "string",
          "readOnly": true,
          "example": "milestone"
        },
        "story": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/StoryCompact",
          "readOnly": true
        },
        "assignee": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/UserCompact",
          "readOnly": true
        },
        "follower": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/UserCompact",
          "readOnly": true
        },
        "old_section": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/SectionCompact",
          "readOnly": true
        },
        "new_section": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/SectionCompact",
          "readOnly": true
        },
        "task": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/TaskCompact",
          "readOnly": true
        },
        "project": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/ProjectCompact",
          "readOnly": true
        },
        "tag": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/TagCompact",
          "readOnly": true
        },
        "custom_field": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/CustomFieldCompact",
          "readOnly": true
        },
        "old_text_value": {
          "description": "*Conditional*",
          "type": "string",
          "readOnly": true,
          "example": "This was the Old Text"
        },
        "new_text_value": {
          "description": "*Conditional*",
          "type": "string",
          "readOnly": true,
          "example": "This is the New Text"
        },
        "old_number_value": {
          "description": "*Conditional*",
          "type": "integer",
          "nullable": true,
          "readOnly": true,
          "example": 1
        },
        "new_number_value": {
          "description": "*Conditional*",
          "type": "integer",
          "readOnly": true,
          "example": 2
        },
        "old_enum_value": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/EnumOption",
          "readOnly": true
        },
        "new_enum_value": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/EnumOption",
          "readOnly": true
        },
        "old_date_value": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StoryResponseDates"
            },
            {
              "description": "*Conditional*. The old value of a date custom field story."
            }
          ],
          "readOnly": true
        },
        "new_date_value": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StoryResponseDates"
            },
            {
              "description": "*Conditional* The new value of a date custom field story."
            }
          ],
          "readOnly": true
        },
        "old_people_value": {
          "description": "*Conditional*. The old value of a people custom field story.",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/UserCompact"
          },
          "readOnly": true
        },
        "new_people_value": {
          "description": "*Conditional*. The new value of a people custom field story.",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/UserCompact"
          },
          "readOnly": true
        },
        "old_multi_enum_values": {
          "description": "*Conditional*. The old value of a multi-enum custom field story.",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/EnumOption"
          },
          "readOnly": true
        },
        "new_multi_enum_values": {
          "description": "*Conditional*. The new value of a multi-enum custom field story.",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/EnumOption"
          },
          "readOnly": true
        },
        "new_approval_status": {
          "description": "*Conditional*. The new value of approval status.",
          "type": "string",
          "readOnly": true,
          "example": "approved"
        },
        "old_approval_status": {
          "description": "*Conditional*. The old value of approval status.",
          "type": "string",
          "readOnly": true,
          "example": "pending"
        },
        "duplicate_of": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/TaskCompact",
          "readOnly": true
        },
        "duplicated_from": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/TaskCompact",
          "readOnly": true
        },
        "dependency": {
          "description": "*Conditional*",
          "$ref": "#/components/schemas/TaskCompact",
          "readOnly": true
        },
        "source": {
          "description": "The component of the Asana product the user used to trigger the story.",
          "type": "string",
          "enum": [
            "web",
            "email",
            "mobile",
            "api",
            "unknown"
          ],
          "readOnly": true,
          "example": "web"
        },
        "target": {
          "allOf": [
            {
              "$ref": "#/components/schemas/TaskCompact"
            },
            {
              "type": "object",
              "readOnly": true,
              "description": "The object this story is associated with. Currently may only be a task."
            }
          ]
        }
      }
    }
  ]
}