Activities

Local Properties

Property Description Type Constraints Supported operations
id Activity id Integer x > 0 READ
version Activity version Integer x > 0 READ
comment Formattable READ / WRITE
details Array of Formattable READ
createdAt Time of creation DateTime READ

Activity can be either _type Activity or _type Activity::Comment.

Activity 

View activity
/api/v3/activities/{id}
  • Parameters
  • id
    integer (required) Example: 1

    Activity id

  • Response  200
  • Headers
    Content-Type: application/hal+json
    Body
    {
      "_type": "Activity::Comment",
      "_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"
        }
      },
      "id": 1,
      "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:20Z",
      "version": 31
    }
Update activity
/api/v3/activities/{id}

Updates an activity’s comment and, on success, returns the updated activity.

  • Parameters
  • id
    integer (required) Example: 1

    Activity id

  • Request
  • Headers
    Content-Type: application/json
    Body
    {
      "comment": {
        "raw": "The updated comment"
      }
    }
  • Response  200
  • Headers
    Content-Type: application/hal+json
    Body
    {
      "_type": "Activity::Comment",
      "_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"
        }
      },
      "id": 1,
      "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:20Z",
      "version": 31
    }
  • Response  400
  • Occurs when the client did not send a valid JSON object in the request body.

    Headers
    Content-Type: application/hal+json
    Body
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",
      "message": "The request body was not a single JSON object."
    }
  • Response  403
  • Returned if the client does not have sufficient permissions.

    Required permission: edit journals

    Headers
    Content-Type: application/hal+json
    Body
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
      "message": "You are not allowed to edit the comment of this journal entry."
    }
  • Response  422
  • Returned if the client tries to modify a read-only property.

    Headers
    Content-Type: application/hal+json
    Body
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyIsReadOnly",
      "message": "The ID of an activity can't be changed."
    }