Page

A page object in Moxtra provides the following properties:

Name Description Example
page_id Page ID. 71
page_index Original page order number. 10
original_file_name Original file name. test.pdf
file_id File ID. 78a91635-5f36-498e-8722-517124b9921e
type Page types: PAGE_TYPE_PDF, PAGE_TYPE_IMAGE, PAGE_TYPE_WHITEBOARD, PAGE_TYPE_AUDIO, PAGE_TYPE_VIDEO, PAGE_TYPE_NOTE, PAGE_TYPE_WEB, PAGE_TYPE_URL. PAGE_TYPE_PDF
page_number Page display order. 45
page_uri Link that points to the page. https://www.moxtra.com/board/B7V4ze37oO08PYO70973lX6/71
thumbnail_uri Link that points to the thumbnail image of the page. https://www.moxtra.com/board/B7V4ze37oO08PYO70973lX6/71/74
background_uri Link that points to the page background image. https://www.moxtra.com/board/B7V4ze37oO08PYO70973lX6/71/70
width Width of the page. 1024
height Height of the page. 768
revision Revision number of the page. 20
created_time The timestamp, when the page object was created. 1348864985783
updated_time The timestamp, when the page object was updated. 1348864985783
is_deleted Flag to indicaite the page has been deleted or not. false

Name Description Example
client_uuid UUID of the client. 5bfb1123-3792-45c1-a3cb-79d72f6f075c
svg_tag SVG tag for the annotation. <path style=\"fill:none;stroke:#0066de;stroke-opacity......6,92.2,317,92\"></path>
created_time The timestamp, when the annotation object was created. 1469646501438

Page Upload

Upload pages to the binder identified by {binder_id} via multipart/form-data.

POST /{binder_id}/pageupload

Form-data Parameters
Name Type Description
file file Actual file that is uploaded to the binder.

Sample Request
POST /B9rArkzRe094lPPiMH4UpS8/pageupload
...
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
Content-Length: 3234

-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="sample.pdf"
Content-Type: application/pdf

Content of sample.pdf
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "file_id": "f692d935-c306-479e-bd76-65e773992e8d",
        "created_time": 1355782091405,
        "updated_time": 1355782091405
    }        
}

Page Download

Download a page as original format identified by {binder_id} and {page_id}. Pages with annotation can be downloaded as pdf format. For downloading pages as pdf format, please refer to Download Binder Pages.

GET /{binder_id}/pagedownload/{page_id}

Sample Request
GET /B9rArkzRe094lPPiMH4UpS8/pagedownload/55
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "page": "<path id=\"E923FA4C-EEEC-4565-9847-2448EB30E177\" d=\"M263.00,
        370.00 C263.00,370.00,375.50,338.00,375.50,338.00 \" style=\"fill:none;
        stroke:rgb(0,102,222);stroke-opacity:1.00;stroke-width:4;stroke-linecap:
        round;stroke-linejoin:round;stroke-miterlimit:4;\"/>"
    }
}

Delete Page

Delete a page identified by {binder_id} and {page_id}.

DELETE /{binder_id}/pages/{page_id}

Sample Request
DELETE /B9rArkzRe094lPPiMH4UpS8/pages/57
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Delete Some Pages

Delete some pages in a binder identified by {binder_id}.

DELETE /{binder_id}/pages

URL Parameters
Name Type Description
filter String Page IDs separated by comma ",".

Sample Request
DELETE /B9rArkzRe094lPPiMH4UpS8/pages?filter=59,68
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Get All Pages

Get the details of all the pages in a binder identified by {binder_id}.

GET /{binder_id}/pages

URL Parameters
Name Type Description
file_id String Optional: Pages created via the File ID.

Sample Request
GET /B9rArkzRe094lPPiMH4UpS8/pages
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data":
    {
    "pages": [
        {
            "id": 7,
            "width": 1280,
            "revision": 17,
            "height": 720,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 0,
            "page_number": "100.000000",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/7",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/7/9",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/7/6",
            "type": "PAGE_TYPE_URL",
            "original_file_name": "",
            "file_id": "",
            "svg_tags": []
        },
        {
            "id": 19,
            "width": 720,
            "revision": 24,
            "height": 560,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 0,
            "page_number": "200.000000",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/19",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/19/24",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/19/23",
            "type": "PAGE_TYPE_WEB",
            "original_file_name": "incoming.html",
            "file_id": "e8d0df87-9336-4663-b3a2-cc3bd284ae39",
            "svg_tags": []        
        },
        {
            "id": 27,
            "width": 960,
            "revision": 30,
            "height": 582,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 1,
            "page_number": "201.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/29",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/30",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx",
            "file_id": "78a91635-5f36-498e-8722-517124b9921e",
            "svg_tags": []
        },
        {
            "id": 37,
            "width": 425,
            "revision": 40,
            "height": 319,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 2,
            "page_number": "301.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/39",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/40",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx",
            "file_id": "78a91635-5f36-498e-8722-517124b9921e",
            "svg_tags": [
            {
                "client_uuid": "5bfb1123-3792-45c1-a3cb-79d72f6f075c",
                "svg_tag": "<path style=\"fill:none;stroke:#0066de;stroke-opacity:....7,92Q316.6,92.2,317,92\"></path>",
                "created_time": 1469646501438
            }            
            ]            
        }
    ]
    }
}

Get Some Pages

Get the details of some pages in a binder identified by {binder_id}.

GET /{binder_id}/pages

URL Parameters
Name Type Description
filter String Page IDs separated by comma ",".

Sample Request
GET /B9rArkzRe094lPPiMH4UpS8/pages?filter=27,37
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data":
    {
        "pages": [
        {
            "id": 27,
            "width": 960,
            "revision": 30,
            "height": 582,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 1,
            "page_number": "201.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/29",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/30",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx",
            "file_id": "78a91635-5f36-498e-8722-517124b9921e",
            "svg_tags": []
        },
        {
            "id": 37,
            "width": 425,
            "revision": 40,
            "height": 319,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 2,
            "page_number": "301.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/39",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/40",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx",
            "file_id": "78a91635-5f36-498e-8722-517124b9921e",
            "svg_tags": []
        }        
        ]
    }
}

Copy Pages to Binder

Copy all pages from one binder to another binder identified by {binder_id}.

POST /{binder_id}/copypages

JSON Parameters
Name Type Description
source_id String Source Binder ID.
Sample Request
POST /B7U3ze39oO08PYO70973lX6/copypages
{
    "source_id": "B7U3ze39oO08PYO70973lX7"
}
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Copy Some Pages to Binder

Copy some pages from one binder to another binder identified by {binder_id}.

POST /{binder_id}/copypages

JSON Parameters
Name Type Description
source_id String Source Binder ID
id (In pages array) Number Page IDs.
Sample Request
POST /B7U3ze39oO08PYO70973lX6/copypages
{
    "source_id": "B7U3ze39oO08PYO70973lX7",
    "pages": [
    {
        "id":6
    },
    {
        "id":14
    }
    ]
}
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Move Some Pages to Binder

Move some pages from one binder to another binder identified by {binder_id}.

POST /{binder_id}/movepages

JSON Parameters
Name Type Description
source_id String Source Binder ID
id (In pages array) Number Page IDs.
Sample Request
POST /B7U3ze39oO08PYO70973lX6/movepages
{
    "source_id": "B7U3ze39oO08PYO70973lX7",
    "pages": [
    {
        "id":6
    },
    {
        "id":14
    }
    ]
}
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Add Page Comment

Add a comment to the page identified by {page_id} and {binder_id}.

POST /{binder_id}/pages/{page_id}/comments

JSON Parameters
Name Type Description
text String Page comment.
Sample Request
POST /B7V4ze37oO08PYO70973lX6/pages/71/comments
{
    "url": "This is a comment"
}
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "comment_id": 13
    }            
}

Delete Page Comment

Delete a comment on the page identified by {comment_id}, {page_id} and {binder_id}.

DELETE /{binder_id}/pages/{page_id}/comments/{comment_id}

Sample Request
DELETE /B9rArkzRe094lPPiMH4UpS8/pages/57/comments/66
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Get Page Comments

Get the comments on a page identified by {page_id} and {binder_id}.

GET /{binder_id}/pages/{page_id}/comments

Sample Request
GET /B9rArkzRe094lPPiMH4UpS8/pages/57/comments
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "comments": [
        {
            "id": 98,
            "created_time": 1355782091405,
            "text": "This is a comment",
            "updated_time": 1355782091405,
            "user": {
                "id": "UiaduESWsbzFoK9TOldC6zF"
            }
        }
        ]
    }
}

Add Annotation

Add annotation to a page identified by {page_id} and {binder_id}.

POST /{binder_id}/pages/{page_id}/annotations

JSON Parameters
Name Type Description
client_uuid String UUID of the client.
svg_tag String SVG tag for the annotation.

Sample Request
POST /B7V4ze37oO08PYO70973lX6/pages/71/annotations
{
    "client_uuid": "A040AC59-C3E0-4261-8356-1341F49612A3",
    "svg_tag": "<path style=\"fill:none;stroke:#0000FF;stroke-opacity:0.8;
        stroke-width:3;stroke-linecap:round;stroke-linejoin:round;\" d=\"M312,
        191 L315,184 L320,177 L323,170 L327,163 L337,155 L347,150 L357,148 L372,
        148 L382,151 L391,155 L397,159 L400,165 L402,173 L405,182 L407,193 L407,
        199 L407,203 L406,209 L403,214 L398,217 L390,220 L380,221 L367,222 L355,
        222 L349,221 L343,220 L337,216 L333,210\"></path>"
}
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Delete Annotation

Delete annotation on the page identified by {client_uuid}, {page_id} and {binder_id}.

DELETE /{binder_id}/pages/{page_id}/annotations/{client_uuid}

Sample Request
DELETE /B9rArkzRe094lPPiMH4UpS8/pages/annotations/A040AC59-C3E0-4261-8356-1341F49612A3
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}