Page notes

PATCH /plugins/Pages/notes/{note_id} #

Update a page note

Replaces the note text after checking the caller's page-note modification permission. The response contains the updated note with Pages attachment URLs and semantic-link text.

Parameters

Name In Type Description
note_id required path integer Numeric ID of the page note.

Request body required

text string required Replacement markdown note text.

Responses

  • 200 Note updated.
    note object required
    id integer required Note ID.
    container string required Notes container owned by Pages. page-notes
    ref_id integer required Page ID to which the note belongs.
    project_id integer required Owning project ID.
    reporter object required User representation returned for page authors and note reporters.
    id integer Numeric user ID.
    name string Username.
    real_name string Display name when configured.
    email string · email User email address when visible.
    enabled boolean Whether the account is enabled.
    avatar string Avatar data when avatars are enabled.
    text string required Markdown note text after Pages semantic-link expansion.
    type string Note type returned by the Notes plugin.
    view_state string Note visibility state when supplied by Notes.
    time_tracking string Time-tracking value when supplied by Notes.
    created_at string · date-time required Note creation time.
    updated_at string · date-time required Last note update time when available.
    files object[] required
    id integer required MediaVault attachment ID.
    name string required Stored filename.
    size integer required Size in bytes.
    content_type string required MIME type.
    created_at string · date-time required Attachment creation time.
    download_url string required Pages URL for downloading the note attachment.
    {
        "note": {
            "id": 1,
            "container": "page-notes",
            "ref_id": 1,
            "project_id": 1,
            "reporter": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "text": "string",
            "type": "string",
            "view_state": "string",
            "time_tracking": "string",
            "created_at": "string",
            "updated_at": "string",
            "files": [
                {
                    "id": 1,
                    "name": "string",
                    "size": 1,
                    "content_type": "string",
                    "created_at": "string",
                    "download_url": "string"
                }
            ]
        }
    }
  • 400 The JSON body or one of its fields is invalid.
  • 401 Authentication is required or the API token is invalid.
  • 403 The authenticated user does not have the required project or note permission.
  • 404 The page, project, revision, note, or attachment was not found.
cURL
curl -X PATCH \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  -H "Content-Type: application/json" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/notes/1 \
  -d '{
    "text": "string"
}'
Request body · application/json
{
    "text": "string"
}
DELETE /plugins/Pages/notes/{note_id} #

Delete a page note

Deletes a page note after applying the page-note delete threshold, including the own-note versus any-note distinction. The response has no body.

Parameters

Name In Type Description
note_id required path integer Numeric ID of the page note.

Responses

  • 204 Note deleted; the response has no body.
  • 401 Authentication is required or the API token is invalid.
  • 403 The authenticated user does not have the required project or note permission.
  • 404 The page, project, revision, note, or attachment was not found.
cURL
curl -X DELETE \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/notes/1
GET /plugins/Pages/notes/{note_id}/files/{file_id} #

Download a page-note attachment

Streams a note attachment after checking view permission on the note's owning page. A file ID that is not attached to the note returns not found.

Parameters

Name In Type Description
note_id required path integer Numeric ID of the page note.
file_id required path integer Numeric ID of the attachment.

Responses

  • 200 The attachment bytes.
  • 401 Authentication is required or the API token is invalid.
  • 403 The authenticated user does not have the required project or note permission.
  • 404 The page, project, revision, note, or attachment was not found.
cURL
curl -X GET \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/notes/1/files/1
DELETE /plugins/Pages/notes/{note_id}/files/{file_id} #

Delete a page-note attachment

Deletes a note attachment after checking the same page-note modification permission used to edit the note. The response has no body.

Parameters

Name In Type Description
note_id required path integer Numeric ID of the page note.
file_id required path integer Numeric ID of the attachment.

Responses

  • 204 Note attachment deleted; the response has no body.
  • 401 Authentication is required or the API token is invalid.
  • 403 The authenticated user does not have the required project or note permission.
  • 404 The page, project, revision, note, or attachment was not found.
cURL
curl -X DELETE \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/notes/1/files/1
GET /plugins/Pages/{page_id}/notes #

List notes on a page

Returns notes attached to the page in the authenticated user's configured note order. Page view permission controls visibility; each note includes the Pages-generated attachment download URL and markdown semantic-link text.

Parameters

Name In Type Description
page_id required path integer Numeric ID of the page.

Responses

  • 200 Page notes.
    notes object[] required Notes attached to the requested page.
    id integer required Note ID.
    container string required Notes container owned by Pages. page-notes
    ref_id integer required Page ID to which the note belongs.
    project_id integer required Owning project ID.
    reporter object required User representation returned for page authors and note reporters.
    id integer Numeric user ID.
    name string Username.
    real_name string Display name when configured.
    email string · email User email address when visible.
    enabled boolean Whether the account is enabled.
    avatar string Avatar data when avatars are enabled.
    text string required Markdown note text after Pages semantic-link expansion.
    type string Note type returned by the Notes plugin.
    view_state string Note visibility state when supplied by Notes.
    time_tracking string Time-tracking value when supplied by Notes.
    created_at string · date-time required Note creation time.
    updated_at string · date-time required Last note update time when available.
    files object[] required
    id integer required MediaVault attachment ID.
    name string required Stored filename.
    size integer required Size in bytes.
    content_type string required MIME type.
    created_at string · date-time required Attachment creation time.
    download_url string required Pages URL for downloading the note attachment.
    {
        "notes": [
            {
                "id": 1,
                "container": "page-notes",
                "ref_id": 1,
                "project_id": 1,
                "reporter": {
                    "id": 1,
                    "name": "string",
                    "real_name": "string",
                    "email": "string",
                    "enabled": true,
                    "avatar": "string"
                },
                "text": "string",
                "type": "string",
                "view_state": "string",
                "time_tracking": "string",
                "created_at": "string",
                "updated_at": "string",
                "files": [
                    {
                        "id": 1,
                        "name": "string",
                        "size": 1,
                        "content_type": "string",
                        "created_at": "string",
                        "download_url": "string"
                    }
                ]
            }
        ]
    }
  • 401 Authentication is required or the API token is invalid.
  • 403 The authenticated user does not have the required project or note permission.
  • 404 The page, project, revision, note, or attachment was not found.
cURL
curl -X GET \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/1/notes
POST /plugins/Pages/{page_id}/notes #

Create a note on a page

Creates a markdown note attached to the page. text defaults to an empty string when omitted. Base64 attachments are handed to the Notes plugin, then decorated with a Pages download URL; the command also sends mention notifications and returns the page's current collaborators.

Parameters

Name In Type Description
page_id required path integer Numeric ID of the page.

Request body required

text string Markdown note text; defaults to an empty string.
files string[] Optional base64 attachments passed to the Notes plugin.

Responses

  • 201 Note created.
    note object required
    id integer required Note ID.
    container string required Notes container owned by Pages. page-notes
    ref_id integer required Page ID to which the note belongs.
    project_id integer required Owning project ID.
    reporter object required User representation returned for page authors and note reporters.
    id integer Numeric user ID.
    name string Username.
    real_name string Display name when configured.
    email string · email User email address when visible.
    enabled boolean Whether the account is enabled.
    avatar string Avatar data when avatars are enabled.
    text string required Markdown note text after Pages semantic-link expansion.
    type string Note type returned by the Notes plugin.
    view_state string Note visibility state when supplied by Notes.
    time_tracking string Time-tracking value when supplied by Notes.
    created_at string · date-time required Note creation time.
    updated_at string · date-time required Last note update time when available.
    files object[] required
    id integer required MediaVault attachment ID.
    name string required Stored filename.
    size integer required Size in bytes.
    content_type string required MIME type.
    created_at string · date-time required Attachment creation time.
    download_url string required Pages URL for downloading the note attachment.
    collaborators object[] required Current page collaborators recalculated after note creation.
    id integer Numeric user ID.
    name string Username.
    real_name string Display name when configured.
    email string · email User email address when visible.
    enabled boolean Whether the account is enabled.
    avatar string Avatar data when avatars are enabled.
    {
        "note": {
            "id": 1,
            "container": "page-notes",
            "ref_id": 1,
            "project_id": 1,
            "reporter": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "text": "string",
            "type": "string",
            "view_state": "string",
            "time_tracking": "string",
            "created_at": "string",
            "updated_at": "string",
            "files": [
                {
                    "id": 1,
                    "name": "string",
                    "size": 1,
                    "content_type": "string",
                    "created_at": "string",
                    "download_url": "string"
                }
            ]
        },
        "collaborators": [
            {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            }
        ]
    }
  • 400 The JSON body or one of its fields is invalid.
  • 401 Authentication is required or the API token is invalid.
  • 403 The authenticated user does not have the required project or note permission.
  • 404 The page, project, revision, note, or attachment was not found.
cURL
curl -X POST \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  -H "Content-Type: application/json" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/1/notes \
  -d '{
    "text": "string",
    "files": [
        "string"
    ]
}'
Request body · application/json
{
    "text": "string",
    "files": [
        "string"
    ]
}