Pages

POST /plugins/Pages #

Create a markdown page

Creates a page in the supplied project. name, title, and non-empty markdown content are required. If issue_id is supplied, the page is associated with that issue and its name must be the issue ID (a padded numeric name is normalized). files may contain base64 attachments; duplicate filenames are ignored. The response includes the created page, its attachment metadata, and its revision history.

Request body required

name string Page name; omitted only when creating an issue-associated page.
title string required Page title.
content string required Markdown content; HTML is not required for images or references.
project object required MantisBT project reference accepted by page commands.
id integer Numeric project ID.
name string Project name.
issue_id integer Optional issue to associate with the page.
message string Revision message recorded for the creation.
files object[] Optional base64 attachments. Duplicate filenames are ignored.
name string required Original filename.
content string · byte required Base64-encoded file contents.

Responses

  • 201 Page created.
    page object required
    id integer required Numeric page ID.
    name string required URL-safe page name.
    title string required Human-readable page title.
    project object required MantisBT project reference accepted by page commands.
    id integer Numeric project ID.
    name string Project name.
    issue_id integer Associated issue ID; null for an ordinary project page.
    created_by 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.
    created_at string · date-time required Creation time.
    updated_by 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.
    updated_at string · date-time required Last update time.
    content string required Markdown page content.
    files object[] Page attachments returned by create responses.
    id integer required MediaVault attachment ID.
    page_id integer required Owning page 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 URL generated by Pages for downloading the attachment.
    delete_url string required Classic Pages URL for deleting the attachment.
    revisions object[] Revision history returned by create responses.
    id integer required Revision ID.
    page_id integer required Owning page ID.
    project_id integer required Owning project ID.
    name string required Page name at the revision.
    title string required Page title at the revision.
    content string Markdown content at the revision.
    message string required Update message recorded with the revision.
    updated_by integer required Numeric ID of the user who made the revision.
    updated_at integer required Unix timestamp of the revision update.
    {
        "page": {
            "id": 1,
            "name": "string",
            "title": "string",
            "project": {
                "id": 1,
                "name": "string"
            },
            "issue_id": 1,
            "created_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "created_at": "string",
            "updated_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "updated_at": "string",
            "content": "string",
            "files": [
                {
                    "id": 1,
                    "page_id": 1,
                    "name": "string",
                    "size": 1,
                    "content_type": "string",
                    "created_at": "string",
                    "download_url": "string",
                    "delete_url": "string"
                }
            ],
            "revisions": [
                {
                    "id": 1,
                    "page_id": 1,
                    "project_id": 1,
                    "name": "string",
                    "title": "string",
                    "content": "string",
                    "message": "string",
                    "updated_by": 1,
                    "updated_at": 1
                }
            ]
        }
    }
  • 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 \
  -d '{
    "name": "string",
    "title": "string",
    "content": "string",
    "project": {
        "id": 1,
        "name": "string"
    },
    "issue_id": 1,
    "message": "string",
    "files": [
        {
            "name": "string",
            "content": "string"
        }
    ]
}'
Request body · application/json
{
    "name": "string",
    "title": "string",
    "content": "string",
    "project": {
        "id": 1,
        "name": "string"
    },
    "issue_id": 1,
    "message": "string",
    "files": [
        {
            "name": "string",
            "content": "string"
        }
    ]
}
PATCH /plugins/Pages #

Update a markdown page

Updates an existing page selected by id, or selects it by project and name when id is omitted. Supplied name, title, and content fields replace their current values; omitted fields are retained. A rename updates page references and cannot rename an issue-associated page. New base64 attachments can be supplied in files; duplicate filenames are ignored. The response contains the updated page.

Request body required

id integer Existing page ID; use this or project plus name.
project object MantisBT project reference accepted by page commands.
id integer Numeric project ID.
name string Project name.
name string Existing page name when selecting by project and name, or replacement name for an ordinary page.
title string Replacement page title.
content string Replacement markdown content.
message string Revision message.
files object[] Optional new base64 attachments. Duplicate filenames are ignored.
name string required Original filename.
content string · byte required Base64-encoded file contents.

Responses

  • 200 Page updated.
    page object required
    id integer required Numeric page ID.
    name string required URL-safe page name.
    title string required Human-readable page title.
    project object required MantisBT project reference accepted by page commands.
    id integer Numeric project ID.
    name string Project name.
    issue_id integer Associated issue ID; null for an ordinary project page.
    created_by 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.
    created_at string · date-time required Creation time.
    updated_by 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.
    updated_at string · date-time required Last update time.
    content string required Markdown page content.
    files object[] Page attachments returned by create responses.
    id integer required MediaVault attachment ID.
    page_id integer required Owning page 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 URL generated by Pages for downloading the attachment.
    delete_url string required Classic Pages URL for deleting the attachment.
    revisions object[] Revision history returned by create responses.
    id integer required Revision ID.
    page_id integer required Owning page ID.
    project_id integer required Owning project ID.
    name string required Page name at the revision.
    title string required Page title at the revision.
    content string Markdown content at the revision.
    message string required Update message recorded with the revision.
    updated_by integer required Numeric ID of the user who made the revision.
    updated_at integer required Unix timestamp of the revision update.
    {
        "page": {
            "id": 1,
            "name": "string",
            "title": "string",
            "project": {
                "id": 1,
                "name": "string"
            },
            "issue_id": 1,
            "created_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "created_at": "string",
            "updated_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "updated_at": "string",
            "content": "string",
            "files": [
                {
                    "id": 1,
                    "page_id": 1,
                    "name": "string",
                    "size": 1,
                    "content_type": "string",
                    "created_at": "string",
                    "download_url": "string",
                    "delete_url": "string"
                }
            ],
            "revisions": [
                {
                    "id": 1,
                    "page_id": 1,
                    "project_id": 1,
                    "name": "string",
                    "title": "string",
                    "content": "string",
                    "message": "string",
                    "updated_by": 1,
                    "updated_at": 1
                }
            ]
        }
    }
  • 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 \
  -d '{
    "id": 1,
    "project": {
        "id": 1,
        "name": "string"
    },
    "name": "string",
    "title": "string",
    "content": "string",
    "message": "string",
    "files": [
        {
            "name": "string",
            "content": "string"
        }
    ]
}'
Request body · application/json
{
    "id": 1,
    "project": {
        "id": 1,
        "name": "string"
    },
    "name": "string",
    "title": "string",
    "content": "string",
    "message": "string",
    "files": [
        {
            "name": "string",
            "content": "string"
        }
    ]
}
POST /plugins/Pages/get #

Get a page by project and name

Returns the visible page identified by its project reference and exact page name, including attachment metadata and resolved page links.

Request body required

name string required Exact page name.
project object required MantisBT project reference accepted by page commands.
id integer Numeric project ID.
name string Project name.

Responses

  • 200 Page lookup result.
    page object required
    id integer required Numeric page ID.
    name string required URL-safe page name.
    title string required Human-readable page title.
    project object required MantisBT project reference accepted by page commands.
    id integer Numeric project ID.
    name string Project name.
    issue_id integer Associated issue ID; null for an ordinary project page.
    created_by 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.
    created_at string · date-time required Creation time.
    updated_by 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.
    updated_at string · date-time required Last update time.
    content string required Markdown page content.
    files object[] Page attachments returned by create responses.
    id integer required MediaVault attachment ID.
    page_id integer required Owning page 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 URL generated by Pages for downloading the attachment.
    delete_url string required Classic Pages URL for deleting the attachment.
    revisions object[] Revision history returned by create responses.
    id integer required Revision ID.
    page_id integer required Owning page ID.
    project_id integer required Owning project ID.
    name string required Page name at the revision.
    title string required Page title at the revision.
    content string Markdown content at the revision.
    message string required Update message recorded with the revision.
    updated_by integer required Numeric ID of the user who made the revision.
    updated_at integer required Unix timestamp of the revision update.
    files object[] required
    id integer required MediaVault attachment ID.
    page_id integer required Owning page 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 URL generated by Pages for downloading the attachment.
    delete_url string required Classic Pages URL for deleting the attachment.
    links object required
    outbound object[] required Pages referenced by this page.
    project object required MantisBT project reference accepted by page commands.
    id integer Numeric project ID.
    name string Project name.
    name string required Referenced page name.
    title string required Link title decoded from the markdown reference.
    exists boolean required Whether the referenced page is currently visible and exists.
    inbound object[] required Pages that reference this page.
    id integer required Page ID.
    project_id integer required Project ID.
    name string required Page name.
    title string required Page title.
    {
        "page": {
            "id": 1,
            "name": "string",
            "title": "string",
            "project": {
                "id": 1,
                "name": "string"
            },
            "issue_id": 1,
            "created_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "created_at": "string",
            "updated_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "updated_at": "string",
            "content": "string",
            "files": [
                {
                    "id": 1,
                    "page_id": 1,
                    "name": "string",
                    "size": 1,
                    "content_type": "string",
                    "created_at": "string",
                    "download_url": "string",
                    "delete_url": "string"
                }
            ],
            "revisions": [
                {
                    "id": 1,
                    "page_id": 1,
                    "project_id": 1,
                    "name": "string",
                    "title": "string",
                    "content": "string",
                    "message": "string",
                    "updated_by": 1,
                    "updated_at": 1
                }
            ]
        },
        "files": [
            {
                "id": 1,
                "page_id": 1,
                "name": "string",
                "size": 1,
                "content_type": "string",
                "created_at": "string",
                "download_url": "string",
                "delete_url": "string"
            }
        ],
        "links": {
            "outbound": [
                {
                    "project": {
                        "id": 1,
                        "name": "string"
                    },
                    "name": "string",
                    "title": "string",
                    "exists": true
                }
            ],
            "inbound": [
                {
                    "id": 1,
                    "project_id": 1,
                    "name": "string",
                    "title": "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/get \
  -d '{
    "name": "string",
    "project": {
        "id": 1,
        "name": "string"
    }
}'
Request body · application/json
{
    "name": "string",
    "project": {
        "id": 1,
        "name": "string"
    }
}
DELETE /plugins/Pages/revs/{rev_id} #

Delete a page revision

Deletes a revision after resolving its owning page and checking page-update permission. The response has no body.

Parameters

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

Responses

  • 204 Page revision deleted; the response has no body.
  • 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 DELETE \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/revs/1
GET /plugins/Pages/{page_id} #

Get a page by ID

Returns the visible page, its markdown content, page attachment metadata, and page links. Link entries identify whether each referenced page currently exists.

Parameters

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

Responses

  • 200 Page details.
    page object required
    id integer required Numeric page ID.
    name string required URL-safe page name.
    title string required Human-readable page title.
    project object required MantisBT project reference accepted by page commands.
    id integer Numeric project ID.
    name string Project name.
    issue_id integer Associated issue ID; null for an ordinary project page.
    created_by 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.
    created_at string · date-time required Creation time.
    updated_by 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.
    updated_at string · date-time required Last update time.
    content string required Markdown page content.
    files object[] Page attachments returned by create responses.
    id integer required MediaVault attachment ID.
    page_id integer required Owning page 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 URL generated by Pages for downloading the attachment.
    delete_url string required Classic Pages URL for deleting the attachment.
    revisions object[] Revision history returned by create responses.
    id integer required Revision ID.
    page_id integer required Owning page ID.
    project_id integer required Owning project ID.
    name string required Page name at the revision.
    title string required Page title at the revision.
    content string Markdown content at the revision.
    message string required Update message recorded with the revision.
    updated_by integer required Numeric ID of the user who made the revision.
    updated_at integer required Unix timestamp of the revision update.
    files object[] required
    id integer required MediaVault attachment ID.
    page_id integer required Owning page 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 URL generated by Pages for downloading the attachment.
    delete_url string required Classic Pages URL for deleting the attachment.
    links object required
    outbound object[] required Pages referenced by this page.
    project object required MantisBT project reference accepted by page commands.
    id integer Numeric project ID.
    name string Project name.
    name string required Referenced page name.
    title string required Link title decoded from the markdown reference.
    exists boolean required Whether the referenced page is currently visible and exists.
    inbound object[] required Pages that reference this page.
    id integer required Page ID.
    project_id integer required Project ID.
    name string required Page name.
    title string required Page title.
    {
        "page": {
            "id": 1,
            "name": "string",
            "title": "string",
            "project": {
                "id": 1,
                "name": "string"
            },
            "issue_id": 1,
            "created_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "created_at": "string",
            "updated_by": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "enabled": true,
                "avatar": "string"
            },
            "updated_at": "string",
            "content": "string",
            "files": [
                {
                    "id": 1,
                    "page_id": 1,
                    "name": "string",
                    "size": 1,
                    "content_type": "string",
                    "created_at": "string",
                    "download_url": "string",
                    "delete_url": "string"
                }
            ],
            "revisions": [
                {
                    "id": 1,
                    "page_id": 1,
                    "project_id": 1,
                    "name": "string",
                    "title": "string",
                    "content": "string",
                    "message": "string",
                    "updated_by": 1,
                    "updated_at": 1
                }
            ]
        },
        "files": [
            {
                "id": 1,
                "page_id": 1,
                "name": "string",
                "size": 1,
                "content_type": "string",
                "created_at": "string",
                "download_url": "string",
                "delete_url": "string"
            }
        ],
        "links": {
            "outbound": [
                {
                    "project": {
                        "id": 1,
                        "name": "string"
                    },
                    "name": "string",
                    "title": "string",
                    "exists": true
                }
            ],
            "inbound": [
                {
                    "id": 1,
                    "project_id": 1,
                    "name": "string",
                    "title": "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
DELETE /plugins/Pages/{page_id} #

Delete a page

Deletes the page, its revisions, page attachments, and notes belonging to the page. This operation returns no response body.

Parameters

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

Responses

  • 204 Page 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/1
DELETE /plugins/Pages/{page_id}/files/{file_id} #

Delete a page attachment

Deletes an attachment only when the file belongs to the specified page and the caller can update that page. The response has no body.

Parameters

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

Responses

  • 204 Page 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/1/files/1
POST /plugins/Pages/{page_id}/move/{target_project_id} #

Move a page to another project

Moves an ordinary page to a different project. Page attachments and page-note attachments are relocated, note rows are reassigned, and markdown references are rewritten for the source and target projects. Issue-associated pages cannot be moved independently; they follow the issue move workflow. The successful response has an empty JSON object.

Parameters

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

Responses

  • 200 Page moved; the command returns an empty JSON object.
    []
  • 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" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Pages/1/move/1