API: WorkPackages

Methods

List emoji reactions by work package activities

List all emoji reactions of all activities of a single work package.

id
integer

required path

ID of the work package whose activities’ emoji reactions will be listed

Example:
1

200

OK

{
  "_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"
    }
  }
}
{
  "type": "object",
  "properties": {
    "_type": {
      "type": "string",
      "enum": [
        "Collection"
      ]
    },
    "total": {
      "type": "integer",
      "description": "Total number of emoji reactions",
      "minimum": 0
    },
    "count": {
      "type": "integer",
      "description": "Number of emoji reactions in this response",
      "minimum": 0
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/EmojiReactionModel"
          }
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "allOf": [
            {
              "$ref": "#/components/schemas/Link"
            },
            {
              "description": "This collection"
            }
          ]
        }
      }
    }
  },
  "examples": [
    {
      "_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"
        }
      }
    }
  ]
}

404

Returned if the work package does not exist or the client does not have sufficient permissions to see it.

Required permission:

  • view_work_packages
  • for internal comments: view_internal_comments

Note: A client without sufficient permissions shall not be able to test for the existence of a work package. That’s why a 404 is returned here, even if a 403 might be more appropriate.

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The requested resource could not be found."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}