API: EmojiReactions
Methods
List emoji reactions by activity
List all emoji reactions of a single activity.
id
integer
required path
ID of the activity whose 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 activity 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 an activity. 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"
}
}
}
]
}
Toggle emoji reaction for an activity
Toggle an emoji reaction for a given activity. If the user has already reacted with the given emoji, the reaction will be removed. Otherwise, a new reaction will be created.
Note: The response contains the complete collection of all emoji reactions for this activity.
Required permission:
add_work_package_comments- for internal comments:
add_internal_comments
id
integer
required path
ID of the activity to toggle emoji reaction for
Example:1
{
"type": "object",
"required": [
"reaction"
],
"properties": {
"reaction": {
"type": "string",
"description": "The emoji reaction identifier",
"example": "thumbs_up",
"enum": [
"thumbs_up",
"thumbs_down",
"grinning_face_with_smiling_eyes",
"confused_face",
"heart",
"party_popper",
"rocket",
"eyes"
]
}
}
}
200
OK
{
"_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": "object",
"properties": {
"_type": {
"type": "string",
"enum": [
"EmojiReaction"
]
},
"id": {
"type": "string",
"description": "Emoji reaction id (format: reactable_id-reaction)"
},
"reaction": {
"type": "string",
"description": "The reaction identifier"
},
"emoji": {
"type": "string",
"description": "The emoji character"
},
"reactionsCount": {
"type": "integer",
"description": "Number of users who reacted with this emoji",
"minimum": 1
},
"firstReactionAt": {
"type": "string",
"format": "date-time",
"description": "Time of the first reaction"
},
"_links": {
"type": "object",
"properties": {
"self": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "This emoji reaction"
}
]
},
"reactable": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "The activity this emoji reaction belongs to"
}
]
},
"reactingUsers": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "The users who reacted with this emoji"
}
]
}
}
}
}
},
"examples": [
{
"_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"
}
]
}
}
]
}
400
Returned if the request is invalid. For example, if the reaction is not valid.
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:BadRequest",
"message": "Bad request: reaction does not have a valid value"
}
{
"_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"
}
}
}
]
}
403
Returned if the client does not have sufficient permissions to toggle the emoji reaction for the activity.
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
"message": "You are not authorized to access this resource."
}
{
"_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"
}
}
}
]
}
404
Returned if the activity does not exist or the client does not have sufficient permissions to see it.
{
"_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"
}
}
}
]
}
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"
}
}
}
]
}