{ "swagger": "2.0", "info": { "title": "Almanac", "description": "Almanac is building collaborative infrastructure to serve human creativity. Using the fastest wiki and workflow tool, consolidate your docs in a beautiful, organized single source of truth.", "version": "1.0.0", "contact": { "name": "Troy Taylor", "url": "https://www.hitachisolutions.com", "email": "ttaylor@hitachisolutions.com" } }, "host": "api.almanac.io", "basePath": "/api/v1/w/", "schemes": [ "https" ], "consumes": [], "produces": [ "application/json" ], "paths": { "/groups/{group_id}/users": { "get": { "description": "Retrieve all users of a user group.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false }, { "in": "path", "x-ms-summary": "Group ID", "x-ms-url-encoding": "single", "description": "The group identifier.", "name": "group_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Retrieve all users of a user group.", "schema": { "type": "array", "items": { "$ref": "#/definitions/User" } } } }, "tags": [ "users" ], "operationId": "GetGroupsGroupIdUsers", "summary": "Get users in group" } }, "/groups": { "get": { "description": "Retrieve user groups.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false } ], "responses": { "200": { "description": "Retrieve user groups.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Group" } } } }, "tags": [ "groups" ], "operationId": "GetGroups", "summary": "Get groups" } }, "/users": { "get": { "description": "Retrieve a list of users.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false } ], "responses": { "200": { "description": "Retrieve users.", "schema": { "type": "array", "items": { "$ref": "#/definitions/User" } } } }, "tags": [ "users" ], "operationId": "GetUsers", "summary": "Get users" } }, "/properties/{id}": { "delete": { "description": "Delete a document custom property on workspace level.", "parameters": [ { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "204": { "description": "Delete a document custom property on workspace level." } }, "tags": [ "properties" ], "operationId": "DeletePropertiesId", "summary": "Delete document custom property" } }, "/properties": { "get": { "description": "List document custom properties on workspace level.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false } ], "responses": { "200": { "description": "List document custom properties on workspace level.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Property" } } } }, "tags": [ "properties" ], "operationId": "GetProperties", "summary": "Get document properties" }, "post": { "description": "Create a document property on workspace level.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Property Name", "name": "property[name]", "description": "The property name, which must be unique per workspace.", "type": "string", "required": true }, { "in": "formData", "x-ms-summary": "Property Type", "name": "property[type]", "description": "The property type.", "type": "string", "enum": [ "text", "single_select", "multi_select", "checkbox", "document", "date", "person", "number", "link" ], "required": true }, { "in": "formData", "x-ms-summary": "Default for Articles", "name": "property[default_for_articles]", "description": "Automatically add this property to new articles? Default is false.", "type": "boolean", "required": false }, { "in": "formData", "x-ms-summary": "Data Format", "name": "property[meta][date_format]", "description": "Optional for properties of type date.", "type": "string", "enum": [ "all_numeral", "all_numeral_short", "month_name", "month_name_short", "month_and_day_name", "month_and_day_name_short", "day_of_month" ], "required": false }, { "in": "formData", "x-ms-summary": "Number Format", "name": "property[meta][number_format]", "description": "Optional for properties of type number.", "type": "string", "enum": [ "integer", "decimal1", "decimal2", "decimal3" ], "required": false }, { "in": "formData", "x-ms-summary": "Allow Mentioning Multiple People", "name": "property[meta][allow_mentioning_multiple_people]", "description": "Optional for properties of type person.", "type": "boolean", "required": false }, { "in": "formData", "x-ms-summary": "Notify Person", "name": "property[meta][notify_person]", "description": "Optional for properties of type person.", "type": "boolean", "required": false }, { "in": "formData", "x-ms-summary": "Property Values", "description": "The property values.", "name": "property[property_values][][value]", "type": "array", "required": true, "items": { "type": "string" } }, { "in": "formData", "x-ms-summary": "Color", "description": "The color.", "name": "property[property_values][][meta][color]", "type": "array", "required": false, "items": { "type": "string", "enum": [ "#9CCAFF", "#DAE6FF", "#84E3F8", "#CDF0FF", "#75E5A2", "#D6FFE6", "#B1BECD", "#E5ECF3", "#FFA95A", "#FFD6B8", "#FF99EF", "#FFD6F9", "#C698FF", "#EBDCFF", "#FF9F9F", "#FFCBCB", "#8EF0E4", "#D0F8F3", "#FFD74A", "#FFEFC5", "#283144", "#717E97", "#0026AD", "#273BF1", "#00659E", "#00BAE2", "#028C3A", "#07BA4F", "#BB4300", "#FA7514", "#870061", "#E43CD5", "#5500BF", "#8626FF", "#870F0F", "#E53535", "#008575", "#00BF9D", "#9C5400", "#F3A100" ] } } ], "responses": { "201": { "description": "Create a document property on workspace level.", "schema": { "$ref": "#/definitions/Property" } } }, "tags": [ "properties" ], "operationId": "PostProperties", "summary": "Create document property" } }, "/handbooks/{handbook_id}/items/{id}": { "delete": { "description": "Delete item from handbook.", "parameters": [ { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "string", "required": true }, { "in": "path", "x-ms-summary": "Handbook ID", "x-ms-url-encoding": "single", "description": "The handbook identifier.", "name": "handbook_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "204": { "description": "Delete item from handbook." } }, "tags": [ "handbook items" ], "operationId": "DeleteHandbooksHandbookIdItemsId", "summary": "Delete workbook item" } }, "/handbooks/{handbook_id}/items": { "get": { "description": "Retrieve a list of handbook items.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false }, { "in": "path", "x-ms-summary": "Handbook ID", "x-ms-url-encoding": "single", "description": "The handbook identifier.", "name": "handbook_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Show handbook items.", "schema": { "type": "array", "items": { "$ref": "#/definitions/HandbookItem" } } } }, "tags": [ "handbook items" ], "operationId": "GetHandbooksHandbookIdItems", "summary": "Get handbook items" }, "post": { "description": "Add an item to handbook.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Item Type", "name": "handbook_item[type]", "description": "The handbook item type.", "type": "string", "enum": [ "nested_handbook", "section", "link", "doc" ], "required": true }, { "in": "formData", "x-ms-summary": "Item Position", "name": "handbook_item[position]", "description": "Appends item as last position if not provided.", "type": "integer", "format": "int32", "required": false }, { "in": "formData", "x-ms-summary": "Parent Item ID", "name": "handbook_item[parent_item_id]", "description": "Parent Item ID for nesting purposes.", "type": "integer", "format": "int32", "required": false }, { "in": "formData", "x-ms-summary": "Doc ID", "name": "handbook_item[doc_id]", "description": "Only required for doc items.", "type": "integer", "format": "int32", "required": true }, { "in": "formData", "x-ms-summary": "Item Title", "name": "handbook_item[title]", "description": "Only required for section & link items.", "type": "string", "required": true }, { "in": "formData", "x-ms-summary": "Item URL", "name": "handbook_item[url]", "description": "Only required for link items.", "type": "string", "required": true }, { "in": "path", "x-ms-summary": "Handbook ID", "x-ms-url-encoding": "single", "description": "The handbook identifier.", "name": "handbook_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "201": { "description": "Add item to handbook.", "schema": { "$ref": "#/definitions/HandbookItem" } } }, "tags": [ "handbook items" ], "operationId": "PostHandbooksHandbookIdItems", "summary": "Create handbook item" } }, "/handbooks": { "get": { "description": "Retrieve a list of workspace handbooks.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false } ], "responses": { "200": { "description": "Show workspace handbooks.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Handbook" } } } }, "tags": [ "handbooks" ], "operationId": "GetHandbooks", "summary": "Get handbooks" } }, "/files/move": { "post": { "description": "Move files (docs and/or folders) to a specific folder (in same or different workspace).", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Folder IDs", "description": "The folder identifiers.", "name": "folder_ids[]", "type": "array", "items": { "type": "integer", "format": "int32" }, "required": false }, { "in": "formData", "x-ms-summary": "Doc IDs", "description": "The doc identifiers.", "name": "doc_ids[]", "type": "array", "items": { "type": "integer", "format": "int32" }, "required": false }, { "in": "formData", "x-ms-summary": "Destination Folder ID", "description": "The destination folder identifier.", "name": "destination_folder_id", "type": "integer", "format": "int32", "required": false }, { "in": "formData", "x-ms-summary": "Destination Workspace ID", "description": "The destination workspace identifier.", "name": "destination_workspace_id", "type": "integer", "format": "int32", "required": false } ], "responses": { "201": { "description": "Move files (docs and/or folders) to a specific folder (in same or different workspace)." } }, "tags": [ "files" ], "operationId": "PostFilesMove", "summary": "Move files" } }, "/folders/{id}": { "get": { "description": "Retrieve a list of folder meta information.", "parameters": [ { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "string", "required": true } ], "responses": { "200": { "description": "Show folder meta information.", "schema": { "$ref": "#/definitions/Folder" } } }, "tags": [ "folders" ], "operationId": "GetFoldersId", "summary": "Get folder info" }, "put": { "description": "Replace a folder meta information.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Folder Title", "description": "The folder title.", "name": "folder[title]", "type": "string", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Update folders meta information.", "schema": { "$ref": "#/definitions/Folder" } } }, "tags": [ "folders" ], "operationId": "PutFoldersId", "summary": "Replace folder info" }, "patch": { "description": "Update a folder meta information.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Folder Title", "description": "The folder title.", "name": "folder[title]", "type": "string", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Update folders meta information.", "schema": { "$ref": "#/definitions/Folder" } } }, "tags": [ "folders" ], "operationId": "PatchFoldersId", "summary": "Update folder info" } }, "/folders": { "get": { "description": "Retrieve a list of all folders.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false }, { "in": "query", "x-ms-summary": "Parent Folder ID", "name": "parent_folder_id", "description": "Optional filter: only show folders with this parent folder ID.", "type": "string", "required": false } ], "responses": { "200": { "description": "Show all folders.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Folder" } } } }, "tags": [ "folders" ], "operationId": "GetFolders", "summary": "Get folders" }, "post": { "description": "Create a folder.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Folder Title", "description": "The folder title.", "name": "folder[title]", "type": "string", "required": true }, { "in": "formData", "x-ms-summary": "Parent Folder ID", "name": "folder[parent_folder_id]", "description": "ID of parent folder. Will be created at workspace root if not provided.", "type": "integer", "format": "int32", "required": false } ], "responses": { "201": { "description": "Create a Folder.", "schema": { "$ref": "#/definitions/Folder" } } }, "tags": [ "folders" ], "operationId": "PostFolders", "summary": "Create folder" } }, "/docs/{doc_id}/accesses/{id}": { "delete": { "description": "Remove access from document.", "parameters": [ { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "204": { "description": "Remove access from document." } }, "tags": [ "accesses" ], "operationId": "DeleteDocsDocIdAccessesId", "summary": "Remove document access" }, "put": { "description": "Replace access to a document.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Permission", "description": "The permission.", "name": "access[permission]", "type": "string", "enum": [ "read", "comment", "edit", "owner" ], "required": true }, { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Update access to doc.", "schema": { "$ref": "#/definitions/DocAccess" } } }, "tags": [ "accesses" ], "operationId": "PutDocsDocIdAccessesId", "summary": "Replace document access" }, "patch": { "description": "Update access to a document.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Permission", "description": "The permission.", "name": "access[permission]", "type": "string", "enum": [ "read", "comment", "edit", "owner" ], "required": true }, { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Update access to doc.", "schema": { "$ref": "#/definitions/DocAccess" } } }, "tags": [ "accesses" ], "operationId": "PatchDocsDocIdAccessesId", "summary": "Update document access" } }, "/docs/{doc_id}/accesses": { "get": { "description": "List document accesses.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false }, { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "List document accesses.", "schema": { "type": "array", "items": { "$ref": "#/definitions/DocAccess" } } } }, "tags": [ "accesses" ], "operationId": "GetDocsDocIdAccesses", "summary": "Get document accesses" }, "post": { "description": "Add access to document.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Permission", "description": "The permission.", "name": "access[permission]", "type": "string", "enum": [ "read", "comment", "edit", "owner" ], "required": true }, { "in": "formData", "x-ms-summary": "Accessor Type", "description": "The accessor type.", "name": "access[accessor_type]", "type": "string", "enum": [ "User", "Group", "Workspace" ], "required": true }, { "in": "formData", "x-ms-summary": "Accessor ID", "description": "The accessor identifier.", "name": "access[accessor_id]", "type": "integer", "format": "int32", "required": true }, { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "201": { "description": "Add access to document.", "schema": { "$ref": "#/definitions/DocAccess" } } }, "tags": [ "accesses" ], "operationId": "PostDocsDocIdAccesses", "summary": "Add document access" } }, "/docs/{doc_id}/properties/{id}": { "delete": { "description": "Remove a custom property from a document.", "parameters": [ { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "204": { "description": "Remove a custom property from a document." } }, "tags": [ "properties" ], "operationId": "DeleteDocsDocIdPropertiesId", "summary": "Delete document property" } }, "/docs/{doc_id}/properties": { "get": { "description": "List document custom properties on document level.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false }, { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "List document custom properties on document level.", "schema": { "type": "array", "items": { "$ref": "#/definitions/DocProperty" } } } }, "tags": [ "properties" ], "operationId": "GetDocsDocIdProperties", "summary": "Get document properties" }, "post": { "summary": "Add document property", "description": "Add a custom property to a document.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Property ID", "description": "The property identifier.", "name": "property_id", "type": "integer", "format": "int32", "required": true }, { "in": "formData", "x-ms-summary": "Value", "name": "value", "description": "Type of `value` param depends on property type: 'text', 'date', 'number', 'link' => String 'single_select' => { 'selected_item_id': Integer }, the PropertyValue#ID 'multi_select' => { 'selected_item_ids': Array[Integer] }, the selected PropertyValue#IDs 'checkbox' => { 'checked': Boolean } 'document' => { 'doc_id': Integer }, the Document#ID 'person' => { 'user_ids': Array[Integer] }, the User#IDs.", "type": "string", "required": false }, { "in": "path", "x-ms-summary": "Doc ID", "x-ms-url-encoding": "single", "description": "The document identifier.", "name": "doc_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "201": { "description": "Add a custom property to a document.", "schema": { "$ref": "#/definitions/DocProperty" } } }, "tags": [ "properties" ], "operationId": "PostDocsDocIdProperties" } }, "/docs/{id}": { "get": { "description": "Retrieve meta information of a document.", "parameters": [ { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Retrieve meta information of a doc.", "schema": { "$ref": "#/definitions/Doc" } } }, "tags": [ "docs" ], "operationId": "GetDocsId", "summary": "Get document info" }, "put": { "description": "Update meta information of a doc.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Title", "description": "The title of the document.", "name": "doc[title]", "type": "string", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Update meta information of a doc.", "schema": { "$ref": "#/definitions/Doc" } } }, "tags": [ "docs" ], "operationId": "PutDocsId", "summary": "Replace document info" }, "patch": { "description": "Update meta information of a document.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "Title", "description": "The title of the document.", "name": "doc[title]", "type": "string", "required": true }, { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Update meta information of a doc.", "schema": { "$ref": "#/definitions/Doc" } } }, "tags": [ "docs" ], "operationId": "PatchDocsId", "summary": "Update document info" } }, "/docs": { "get": { "description": "Retrieve meta information of all docs in workspace.", "parameters": [ { "in": "query", "x-ms-summary": "Page", "name": "page", "description": "Page offset to fetch.", "type": "integer", "format": "int32", "default": 1, "required": false }, { "in": "query", "x-ms-summary": "Items", "name": "items", "description": "Number of items to return per page.", "type": "integer", "format": "int32", "default": 20, "required": false }, { "in": "query", "x-ms-summary": "Folder ID", "name": "folder_id", "description": "Optional filter: only show docs that are at the root of this folder.", "type": "string", "required": false } ], "responses": { "200": { "description": "Retrieve meta information of all docs in workspace.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Doc" } } } }, "tags": [ "docs" ], "operationId": "GetDocs", "summary": "Get documents" } }, "/imports": { "post": { "description": "Import a document from an external source.", "consumes": [ "multipart/form-data" ], "parameters": [ { "in": "formData", "x-ms-summary": "File", "description": "The file to import.", "name": "import[file]", "type": "file", "required": true }, { "in": "formData", "x-ms-summary": "Source", "description": "The source of the file.", "name": "import[source]", "type": "string", "enum": [ "md", "docx", "html", "notion", "confluence" ], "required": true } ], "responses": { "201": { "description": "Import a doc from an external source.", "schema": { "$ref": "#/definitions/Import" } } }, "tags": [ "imports" ], "operationId": "PostImports", "summary": "Import document" } }, "/imports/{id}": { "get": { "description": "Retrieve information about an existing import.", "parameters": [ { "in": "path", "x-ms-summary": "ID", "x-ms-url-encoding": "single", "description": "The identifier.", "name": "id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Information about an existing import.", "schema": { "$ref": "#/definitions/Import" } } }, "tags": [ "imports" ], "operationId": "GetImportsId", "summary": "Get import" } } }, "definitions": { "User": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "first_name": { "type": "string", "description": "The first name.", "title": "First Name" }, "last_name": { "type": "string", "description": "The last name.", "title": "Last Name" } }, "required": [ "id", "first_name", "last_name" ], "title": "User Model" }, "Group": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "name": { "type": "string", "description": "The name.", "title": "Name" }, "description": { "type": "string", "description": "The description.", "title": "Description" }, "accessibility": { "type": "string", "description": "The accessibility.", "title": "Accessibility", "enum": [ "open", "closed", "private" ] } }, "required": [ "id", "name", "accessibility" ], "title": "Group Model" }, "Property": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "name": { "type": "string", "description": "The name.", "title": "Name" }, "type": { "type": "string", "description": "The type.", "title": "Type", "enum": [ "text", "single_select", "multi_select", "checkbox", "document", "date", "person", "number", "link" ] }, "default_for_articles": { "type": "boolean", "description": "Whether to default for articles.", "title": "Default for Articles" }, "meta": { "$ref": "#/definitions/PropertyMeta" }, "property_values": { "type": "array", "items": { "$ref": "#/definitions/PropertyValue" } } }, "required": [ "id", "name", "type", "default_for_articles" ], "title": "Property Model" }, "PropertyMeta": { "type": "object", "properties": { "number_format": { "type": "string", "enum": [ "integer", "decimal1", "decimal2", "decimal3" ], "description": "Only returned & relevant for properties of type number.", "title": "Number Format" }, "date_format": { "type": "string", "enum": [ "all_numeral", "all_numeral_short", "month_name", "month_name_short", "month_and_day_name", "month_and_day_name_short", "day_of_month" ], "description": "Only returned & relevant for properties of type date", "title": "Date Format" }, "allow_mentioning_multiple_people": { "type": "boolean", "description": "Only returned & relevant for properties of type person.", "title": "Allow Mentioning Multiple People" }, "notify_person": { "type": "boolean", "description": "Only returned & relevant for properties of type person.", "title": "Notify Person" } } }, "PropertyValue": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "property_id": { "type": "integer", "format": "int32", "description": "The property identifier.", "title": "Property ID" }, "value": { "type": "string", "description": "The value.", "title": "Value" }, "meta": { "$ref": "#/definitions/PropertyValueMeta" } }, "required": [ "id", "property_id" ] }, "PropertyValueMeta": { "type": "object", "properties": { "color": { "type": "string", "enum": [ "#9CCAFF", "#DAE6FF", "#84E3F8", "#CDF0FF", "#75E5A2", "#D6FFE6", "#B1BECD", "#E5ECF3", "#FFA95A", "#FFD6B8", "#FF99EF", "#FFD6F9", "#C698FF", "#EBDCFF", "#FF9F9F", "#FFCBCB", "#8EF0E4", "#D0F8F3", "#FFD74A", "#FFEFC5", "#283144", "#717E97", "#0026AD", "#273BF1", "#00659E", "#00BAE2", "#028C3A", "#07BA4F", "#BB4300", "#FA7514", "#870061", "#E43CD5", "#5500BF", "#8626FF", "#870F0F", "#E53535", "#008575", "#00BF9D", "#9C5400", "#F3A100" ], "description": "Only returned & relevant for properties of type single_select and multi_select.", "title": "Color" } } }, "HandbookItem": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "handbook_id": { "type": "integer", "format": "int32", "description": "The handbook identifier.", "title": "Handbook ID" }, "type": { "type": "string", "description": "The type.", "title": "Type", "enum": [ "nested_handbook", "section", "link", "doc" ] }, "position": { "type": "integer", "format": "int32", "description": "The position.", "title": "Position" }, "title": { "type": "string", "description": "Only relevant for section & link items.", "title": "Title" }, "url": { "type": "string", "description": "Only relevant for link items.", "title": "URL" }, "parent_item_id": { "type": "integer", "format": "int32", "title": "Parent Item ID", "description": "Non-null if item is nested." }, "doc_id": { "type": "integer", "format": "int32", "title": "Doc ID", "description": "Only relevant for doc items." } }, "required": [ "id", "handbook_id", "type", "position" ], "title": "HandbookItem Model" }, "Handbook": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "name": { "type": "string", "description": "The name.", "title": "Name" } }, "required": [ "id", "name" ], "title": "Handbook Model" }, "Folder": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "title": { "type": "string", "description": "The title.", "title": "Title" }, "workspace_id": { "type": "integer", "format": "int32", "description": "The workspace identifier.", "title": "Workspace ID" }, "parent_folder_id": { "type": "integer", "format": "int32", "description": "The parent folder identifier.", "title": "Parent Folder ID" } }, "required": [ "id", "title", "workspace_id" ], "title": "Folder Model" }, "DocAccess": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "doc_id": { "type": "integer", "format": "int32", "description": "The document identifier.", "title": "Doc ID" }, "permission": { "type": "string", "enum": [ "read", "comment", "edit", "owner" ], "description": "The permission.", "title": "Permission" }, "accessor_type": { "type": "string", "enum": [ "User", "Group", "Workspace" ], "description": "The accessor type.", "title": "Accessor Type" }, "accessor_id": { "type": "integer", "format": "int32", "description": "The accessor identifier.", "title": "Accessor ID" }, "inherited": { "type": "boolean", "description": "Whether inherited.", "title": "Inherited" } }, "required": [ "id", "doc_id", "permission", "accessor_type", "accessor_id", "inherited" ], "title": "Doc Access Model" }, "DocProperty": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "property": { "$ref": "#/definitions/Property" }, "value": { "type": "string", "description": "Type of `value` depends on property type: 'text', 'date', 'number', 'link' => String 'single_select' => { 'selected_item_id': Integer }, the PropertyValue#ID 'multi_select' => { 'selected_item_ids': Array[Integer] }, the selected PropertyValue#IDs 'checkbox' => { 'checked': Boolean } 'document' => { 'doc_id': Integer }, the Document#ID 'person' => { 'user_ids': Array[Integer] }, the User#IDs.", "title": "Value" } }, "required": [ "id" ], "title": "Doc Property Model" }, "Doc": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "title": { "type": "string", "description": "The title.", "title": "Title" }, "workspace_id": { "type": "integer", "format": "int32", "description": "The workspace identifier.", "title": "Workspace ID" }, "folder_id": { "type": "integer", "format": "int32", "description": "The folder identifier.", "title": "Folder ID" }, "owner_id": { "type": "integer", "format": "int32", "title": "Owner ID", "description": "User ID of owner of the doc." }, "created_at": { "type": "string", "description": "ISO8601 formatted datetime.", "title": "Created At" }, "updated_at": { "type": "string", "description": "ISO8601 formatted datetime.", "title": "Updated At" } }, "required": [ "id", "title", "workspace_id", "owner_id", "created_at", "updated_at" ], "title": "Doc Model" }, "Import": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "The identifier", "title": "ID" }, "status": { "type": "string", "enum": [ "pending", "processing", "partially_successful", "successful", "failed", "cancelled", "deleted" ] }, "doc": { "$ref": "#/definitions/Doc" } }, "required": [ "id", "status" ], "title": "Import Model" } }, "parameters": {}, "responses": {}, "securityDefinitions": { "API Key": { "type": "apiKey", "in": "header", "name": "Authorization" } }, "security": [ { "API Key": [] } ], "tags": [ { "name": "users", "description": "Operations about users." }, { "name": "groups", "description": "Operations about groups." }, { "name": "properties", "description": "Operations about properties." }, { "name": "handbook items", "description": "Operations about handbook items." }, { "name": "handbooks", "description": "Operations about handbooks." }, { "name": "files", "description": "Operations about files." }, { "name": "folders", "description": "Operations about folders." }, { "name": "accesses", "description": "Operations about accesses." }, { "name": "docs", "description": "Operations about docs." }, { "name": "imports", "description": "Operations about imports." } ], "x-ms-connector-metadata": [ { "propertyName": "Website", "propertyValue": "https://almanac.io/" }, { "propertyName": "Privacy policy", "propertyValue": "https://almanac.io/privacy-policy" }, { "propertyName": "Categories", "propertyValue": "Collaboration;Content and Files" } ] }