API: Posts

Represents a post in a board. Posts are also referred to as messages in the application.

This resource is currently a stub

Actions

Link Description Condition
addAttachment Attach a file to the post Permission: edit messages

Linked Properties

Property Description Type Constraints Supported operations
self This post Post not null READ
attachments The files attached to this post Collection   READ
project The project the post belongs to Project not null READ

Local Properties

Property Description Type Constraints Supported operations
id Identifier of this post Integer x > 0 READ
subject The post’s subject String not null READ

Methods

View post

Retrieve an individual post as identified by the id parameter

id
integer

required path

Post’s identifier

Example:
1

200

OK

{
  "_embedded": {
    "project": {
      "_type": "Project..."
    }
  },
  "_links": {
    "addAttachment": {
      "href": "/api/v3/posts/1/attachments",
      "method": "post"
    },
    "attachments": {
      "href": "/api/v3/posts/1/attachments"
    },
    "project": {
      "href": "/api/v3/projects/1",
      "title": "A project with a title"
    },
    "self": {
      "href": "/api/v3/posts/1"
    }
  },
  "_type": "Post",
  "id": 1,
  "subject": "A post with a subject"
}

PostModel

{
  "type": "object",
  "required": [
    "subject"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "description": "Identifier of this post",
      "readOnly": true,
      "minimum": 0,
      "exclusiveMinimum": true
    },
    "subject": {
      "type": "string",
      "description": "The post's subject"
    },
    "_links": {
      "type": "object",
      "properties": {
        "addAttachment": {
          "allOf": [
            {
              "$ref": "#/components/schemas/Link"
            },
            {
              "description": "Attach a file to the post\n\n# Conditions\n\n**Permission**: edit messages",
              "readOnly": true
            }
          ]
        }
      }
    }
  },
  "example": {
    "_type": "Post",
    "id": 1,
    "subject": "A post with a subject",
    "_embedded": {
      "project": {
        "_type": "Project..."
      }
    },
    "_links": {
      "self": {
        "href": "/api/v3/posts/1"
      },
      "attachments": {
        "href": "/api/v3/posts/1/attachments"
      },
      "addAttachment": {
        "href": "/api/v3/posts/1/attachments",
        "method": "post"
      },
      "project": {
        "href": "/api/v3/projects/1",
        "title": "A project with a title"
      }
    }
  }
}

404

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

Required permission: view messages in the post’s project

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The requested resource could not be found."
}