Notebooks


List All Notebooks

GET /notebooks.json

Lists all notebooks on projects that the authenticated user is associated with. By default, the actual notebook HTML content is not returned. 

You can pass includeContent=true to return the notebook HTML content with the notebook data

Request

GET /notebooks.json?includeContent=[true|false]

Response

{
    "projects": [
        {
            "notebooks": [
                {
                    "project-id": "999",
                    "updated-by-userId": "999",
                    "read-comments-count": "0",
                    "name": "Test notebook",
                    "description": "",
                    "created-by-userfirstname": "Demo",
                    "comments-count": "1",
                    "version-id": "9",
                    "private": "0",
                    "lockdown-id": "",
                    "updated-by-userlastname": "User",
                    "updated-date": "2014-03-31T11:56:46Z",
                    "created-by-userId": "999",
                    "created-by-userlastname": "User",
                    "category-id": "999",
                    "version": "1",
                    "user-display-updated-date": "Mon, 31 Mar 2014",
                    "user-display-updated-time": "11:56AM",
                    "id": "999",
                    "nr-comments": "1",
                    "updated-by-userfirstname": "Demo",
                    "created-date": "2014-03-31T11:56:46Z",
                    "locked": "0",
                    "category-name": "Demo Notebooks 2"
                }
            ],
            "name": "demo",
            "id": "999"
        }
    ]
}

See Notebooks in data reference


List Notebooks on a Project

GET /projects/{project_id}/notebooks.json

This lets you query the list of notebooks for a project. 

By default, the actual notebook HTML content is not returned.

You can pass includeContent=true to return the notebook HTML content with the notebook data

Request

GET /projects/{project_id}/notebooks.json?includeContent=[true|false]

Response

{
    "project": {
        "notebooks": [
            {
                "project-id": "999",
                "updated-by-userId": "999",
                "read-comments-count": "0",
                "name": "Test notebook",
                "description": "",
                "created-by-userfirstname": "Demo",
                "comments-count": "1",
                "version-id": "999",
                "private": "0",
                "lockdown-id": "",
                "updated-by-userlastname": "User",
                "updated-date": "2014-03-31T11:56:46Z",
                "created-by-userId": "999",
                "created-by-userlastname": "User",
                "category-id": "999",
                "version": "1",
                "user-display-updated-date": "Mon, 31 Mar 2014",
                "user-display-updated-time": "11:56AM",
                "id": "999",
                "nr-comments": "1",
                "updated-by-userfirstname": "Demo",
                "created-date": "2014-03-31T11:56:46Z",
                "locked": "0",
                "category-name": "Demo Notebooks 2"
            }
        ],
        "name": "demo",
        "id": "999"
    }
}

See Notebooks in data reference


List Notebooks in a specific category

GET /notebookCategories/{id}/notebooks.json

This lets you query the list of notebooks for a specific category. 

By default, the actual notebook HTML content is not returned.

You can pass includeContent=true to return the notebook HTML content with the notebook data

Request

GET /notebookCategories/{id}/notebooks.json?includeContent=[true|false]

Response

{
    "projects": [
        {
            "notebooks": [
                {
                    "project-id": "999",
                    "updated-by-userId": "999",
                    "read-comments-count": "0",
                    "name": "Test notebook",
                    "description": "",
                    "created-by-userfirstname": "Demo",
                    "comments-count": "1",
                    "version-id": "9",
                    "private": "0",
                    "lockdown-id": "",
                    "updated-by-userlastname": "User",
                    "updated-date": "2014-03-31T11:56:46Z",
                    "created-by-userId": "28726",
                    "created-by-userlastname": "User",
                    "category-id": "999",
                    "version": "1",
                    "user-display-updated-date": "Mon, 31 Mar 2014",
                    "user-display-updated-time": "11:56AM",
                    "id": "999",
                    "nr-comments": "1",
                    "updated-by-userfirstname": "Demo",
                    "created-date": "2014-03-31T11:56:46Z",
                    "locked": "0",
                    "category-name": "Demo Notebooks 2"
                }
            ],
            "name": "demo",
            "id": "999"
        }
    ]
}

See Notebooks in data reference


Get a Single Notebook

GET /notebooks/{notebook_id}.json

This returns all details about an individual notebook. HTML content is always returned on this call.

Request

GET /notebooks/{notebook_id}.json

Response

{
    "notebook": {
        "project-id": "999",
        "read-comments-count": "0",
        "created-by-userfirstname": "Demo",
        "private": "0",
        "version-id": "9",
        "comments-count": "1",
        "lockdown-id": "",
        "updated-date": "2014-03-31T11:56:46Z",
        "created-by-userlastname": "User",
        "version": "1",
        "content": "<p>some text</p>",
        "user-display-updated-date": "Mon, 31 Mar 2014",
        "id": "999",
        "user-display-updated-time": "11:56AM",
        "nr-comments": "1",
        "created-date": "2014-03-31T11:56:46Z",
        "updated-by-userId": "999",
        "name": "Test notebook",
        "description": "",
        "updated-by-userlastname": "User",
        "created-by-userId": "999",
        "category-id": "999",
        "project-name": "demo",
        "updated-by-userfirstname": "Demo",
        "locked": "0",
        "category-name": "Demo Notebooks 2"
    },
    "STATUS": "OK"
}

See Notebooks in data reference


Create a Single Notebook

POST /projects/{project_id}/notebooks.json

This command will create a single notebook.

  • Content must be valid XHTML
  • You not not need to include <html>, <head> or <body> tags

Request

{
  "notebook": {
    "name": "Test notebook 2",
    "description": "A description for Test notebook 2",
    "content": "<p>Text for notebook 2 goes here</p>",
    "notify": false,
    "category-id": "9",
    "category-name": "",
    "private": false,
    "tags": "tag1,tag2,tag3"
  }
}

Response

Returns HTTP status code 200 on success.

See Notebooks in data reference


Update a Single Notebook


PUT /notebooks/{notebook_id}.json

This command will update a single notebook.

  • Content must be valid XHTML
  • You not not need to include <html>, <head> or <body> tags

Request

{
  "notebook": {
    "name": "Test notebook 2",
    "description": "Updated description for Test notebook 2",
    "content": "<p>Text for notebook 2 goes here.</p><p>An additonal paragraph.</p>",
    "notify": false,
    "category-id": "9",
    "category-name": "",
    "private": false,
    "new-version": true,
    "grant-access-to": "",
    "tags": "tag1,tag2,tag3"
  }
}

Response

Returns HTTP status code 200 on success.

See Notebooks in data reference


Lock a Single Notebook For Editing

PUT /notebooks/{id}/lock.json

Locks the notebook and all versions for editing.

Response

Returns HTTP status code 200 on success.


Unlock a Single Notebook

PUT /notebooks/{id}/unlock.json

Unlocks a locked notebook so it can be edited again.

Response

Returns HTTP status code 200 on success.


Delete a Single Notebook

DELETE /notebooks/{id}.json

Deletes the notebook and all versions.

Response

Returns HTTP status code 200 on success.


Copy a Notebook to another Project

PUT /notebooks/{notebook_id}/copy.json

Copies the notebook to a chosen Project

Request

{
    "projectId":12345
}

Response

{
  "id": "100",
  "STATUS": "OK"
}


Move a Notebook to another Project

PUT /notebooks/{notebook_id}/move.json

Moves the notebook to a chosen Project and removed it from its current Project

Request

{
    "projectId":12345
}

Response

{
  "STATUS": "OK"
}