Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

7.1 KB
Raw Blame
# Schema: ActivityModel
---
type: object
properties:
  _type:
    type: string
    enum:
      - "Activity::Comment"
  id:
    type: integer
    description: Activity id
    minimum: 1
  version:
    type: integer
    description: Activity version
    minimum: 1
  comment:
    $ref: './formattable.yml'
  details:
    type: array
    items:
      $ref: './formattable.yml'
  internal:
    type: boolean
    description: Whether this activity is internal (only visible to users with view_internal_comments permission)
  createdAt:
    type: string
    format: date-time
    description: Time of creation
  updatedAt:
    type: string
    format: date-time
    description: Time of update
  _embedded:
    type: object
    properties:
      attachments:
        allOf:
          - $ref: './attachments_model.yml'
          - description: Collection of attachments for this activity
      workPackage:
        allOf:
          - $ref: './work_package_model.yml'
          - description: |-
              The work package this activity belongs to

              # Conditions

              Only embedded when the `journable` of the activity is a work package
      emojiReactions:
        allOf:
          - $ref: './emoji_reactions_model.yml'
          - description: Collection of emoji reactions for this activity
  _links:
    type: object
    properties:
      self:
        allOf:
          - $ref: './link.yml'
          - description: |-
              This activity

              **Resource**: Activity
      workPackage:
        allOf:
          - $ref: './link.yml'
          - description: |-
              The work package this activity belongs to

              **Resource**: WorkPackage
      user:
        allOf:
          - $ref: './link.yml'
          - description: |-
              The user who created this activity

              **Resource**: Principal
      update:
        allOf:
          - $ref: './link.yml'
          - description: Update this activity
      attachments:
        allOf:
          - $ref: './link.yml'
          - description: |-
              The attachment collection of this activity

              **Resource**: Attachments
      addAttachment:
        allOf:
          - $ref: './link.yml'
          - description: |-
              Attach a file to the activity

              # Conditions

              **Permissions**:
              - `add_work_package_comments`
              - for internal comments: `add_internal_comments`
      emojiReactions:
        allOf:
          - $ref: './link.yml'
          - description: |-
              The emoji reactions collection of this activity

              **Resource**: EmojiReactions
example:
  id: 1
  _type: Activity::Comment
  _embedded:
    attachments:
      _type: Collection
      total: 1
      count: 1
      _embedded:
        elements:
          - _type: Attachment
            id: 30388
            fileName: "Task_Ensure_financing___4___OpenProject_DEV.jpeg"
            fileSize: 540992
            description:
              format: plain
              raw: ""
              html: ""
            status: "uploaded"
            contentType: "image/jpeg"
            digest:
              algorithm: "md5"
              hash: "d02d312b25383b595a9fa10f1a8999fe"
            createdAt: "2025-04-08T15:37:19.275Z"
            _links:
              self:
                href: "/api/v3/attachments/30388"
                title: "Task_Ensure_financing___4___OpenProject_DEV.jpeg"
              author:
                href: "/api/v3/users/435"
                title: "Firstname"
              container:
                href: "/api/v3/activities/79090"
              staticDownloadLocation:
                href: "/api/v3/attachments/30388/content"
              downloadLocation:
                href: "/api/v3/attachments/30388/content"
              delete:
                href: "/api/v3/attachments/30388"
                method: "delete"
      _links:
        self:
          href: "/api/v3/activities/79090/attachments"
    emojiReactions:
      _type: Collection
      total: 2
      count: 2
      _embedded:
        elements:
          - _type: "EmojiReaction"
            id: "1-thumbs_up"
            reaction: "thumbs_up"
            emoji: "👍"
            reactionsCount: 3
            firstReactionAt: "2024-04-08T15:37:19.275Z"
            _links:
              self:
                href: "/api/v3/emoji_reactions/1-thumbs_up"
              reactable:
                href: "/api/v3/activities/1"
              reactingUsers:
                - href: "/api/v3/users/435"
                  title: "John Doe"
                - href: "/api/v3/users/436"
                  title: "Jane Smith"
                - href: "/api/v3/users/437"
                  title: "Bob Johnson"
          - _type: "EmojiReaction"
            id: "1-heart"
            reaction: "heart"
            emoji: "❤️"
            reactionsCount: 1
            firstReactionAt: "2024-04-08T15:38:19.275Z"
            _links:
              self:
                href: "/api/v3/emoji_reactions/1-heart"
              reactable:
                href: "/api/v3/activities/1"
              reactingUsers:
                - href: "/api/v3/users/435"
                  title: "John Doe"
      _links:
        self:
          href: "/api/v3/activities/1/emoji_reactions"
    workPackage:
      _type: WorkPackage
      id: 10403
      lockVersion: 2
      subject: "Ensure financing"
      description:
        format: "markdown"
        raw: Lorem ipsum dolor sit amet.
        html: "<p>Lorem ipsum dolor sit amet.</p>"
      scheduleManually: true
      startDate: null
      dueDate: null
      derivedStartDate: null
      derivedDueDate: null
      estimatedTime: null
      derivedEstimatedTime: null
      derivedRemainingTime: null
      duration: null
      ignoreNonWorkingDays: false
      percentageDone: null
      derivedPercentageDone: null
      createdAt: "2025-03-24T13:11:09.480Z"
      updatedAt: "2025-04-14T11:00:02.411Z"
      _links:
        self:
          href: "/api/v3/work_packages/10403"
          title: "Ensure financing"
        type:
          href: "/api/v3/types/1"
          title: "Task"
        status:
          href: "/api/v3/statuses/1"
          title: "New"
        project:
          href: "/api/v3/projects/918"
          title: "RVC Test"
  _links:
    self:
      href: "/api/v3/activity/1"
      title: Priority changed from High to Low
    workPackage:
      href: "/api/v3/work_packages/1"
      title: quis numquam qui voluptatum quia praesentium blanditiis nisi
    user:
      href: "/api/v3/users/1"
      title: John Sheppard - admin
    attachments:
      href: "/api/v3/activities/1/attachments"
    emojiReactions:
      href: "/api/v3/activities/1/emoji_reactions"
    addAttachment:
      href: "/api/v3/activities/1/attachments"
      method: post
    update:
      href: "/api/v3/activities/1"
      method: "patch"
  details:
    - format: markdown
      raw: Lorem ipsum dolor sit amet.
      html: "<p>Lorem ipsum dolor sit amet.</p>"
  comment:
    format: markdown
    raw: Lorem ipsum dolor sit amet.
    html: "<p>Lorem ipsum dolor sit amet.</p>"
  createdAt: '2014-05-21T08:51:20.721Z'
  updatedAt: '2014-05-21T09:14:02.929Z'
  version: 31