1. Page Fields

  1. name (string) - Page title. The value of this field is required when page is created;
  2. body (text) - Page body. The value of this field is required when page is created;
  3. tags (string) - List of comma-separated tags;
  4. visibility (integer) - Object visibility. 0 is private and 1 is normal visibility;
  5. milestone_id (integer) - ID of the parent milestone;
  6. parent_id (integer) - ID of the parent object (category, ticket (for tasks) and so on). The value of this field is required when a page is created.

2. /projects/:project_id/pages

This command lists all page categories in a given project.

Method: GET

<categories>
  <category>
    <id>3</id>
    <type>
      <![CDATA[Category]]>
    </type>
    <name>
      <![CDATA[General]]>
    </name>
    <body>...</body>
    <state>...</state>
    <visibility>...</visibility>
    <created_on>...</created_on>
    <created_by_id>...</created_by_id>
    <updated_on>...</updated_on>
    <updated_by_id>...</updated_by_id>
    <version>1</version>
    <permalink>...</permalink>
    <project_id>...</project_id>
    <parent_id>...</parent_id>
    <milestone_id>...</milestone_id>
    <permissions>
      <can_edit>1</can_edit>
      <can_delete>1</can_delete>
      <can_change_visibility>1</can_change_visibility>
      <can_move>0</can_move>
      <can_copy>0</can_copy>
    </permissions>
  </category>
</categories>

3. /projects/:project_id/pages/add

Creates a new page.

Method: POST.

Request example:

submitted = submitted
page[name] = New Page
page[body] = Page content
page[parent_id] = 12

Response:

<page>
  <id>21</id>
  <type>
    <![CDATA[Page]]>
  </type>
  <name>
    <![CDATA[New Page]]>
  </name>
  <body>
    <![CDATA[Page content]]>
  </body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>...</project_id>
  <parent_id>3</parent_id>
  <milestone_id>...</milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
  <revision_num>1</revision_num>
</page>

4. /projects/:project_id/pages/:page_id

Displays page details with a list of all subpages and revisions.

Method: GET

Example response:

<page>
  <id>21</id>
  <type>
    <![CDATA[Page]]>
  </type>
  <name>
    <![CDATA[New Page]]>
  </name>
  <body>
    <![CDATA[<p>Page content. Made a couple of changes to make a new version</p>]]>
  </body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>...</project_id>
  <parent_id>...</parent_id>
  <milestone_id>...</milestone_id>
  <comments>
    ...
  </comments>
  <tasks>
    ...
  </tasks>
  <attachments>
    ...
  </attachments>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
  <revision_num>2</revision_num>
  <subpages>
    ...
  </subpages>
  <revisions>
    ...
  </revisions>
</page>

5. /projects/:project_id/pages/:page_id/edit

Updates the properties and content of the page.

By setting is_minor_revision to value 1 when updating the page, the system will consider changes as minor ones and will not create a new page revision. Email notifications will not be sent to subscribers in this case.

Method: POST

Request example:

submitted = submitted
page[name] = New Name
page[is_minor_revision] = 1

Response:

<page>
  <id>21</id>
  <type>
    <![CDATA[Page]]>
  </type>
  <name>
    <![CDATA[New Name]]>
  </name>
  <body>
    <![CDATA[<p>Page content. Made a couple of changes to get a new version</p>]]>
  </body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>...</project_id>
  <parent_id>...</parent_id>
  <milestone_id>...</milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
  <revision_num>3</revision_num>
</page>

6. /projects/:project_id/pages/:page_id/archive

This command will mark the selected page as archived. If successful, the system will return the updated page details.

Method: POST.

7. /projects/:project_id/pages/:page_id/unarchive

Marks a selected page as unarchived. If successful, the system will return updated page details and that page will no longer be in the Archive.

Method: POST.