About REST API in Websites
We are still updating this page
Some data may be missing — we will complete it soon.
Quick navigation: all methods
To create a fully functional website via REST or to make changes to an existing one, you need to understand that REST mimics user interaction logic. For instance, to start modifying a block, you must first add it if it's not already on the page, and to make the changes visible, you need to publish the page. But let's summarize the steps briefly.
So, "to create a website," you need just a few things:
- Create a website or choose one from the existing ones. In the end, you will have an identifier for the website you are working with. (Methods for working with the website.)
- Now it's time for the page. Similarly, create a page or select from existing ones. (Methods for working with the page.)
- Blocks. Blocks are the molecules of websites (nodes – atoms). You should have a good understanding of what a block is and what its manifest is. You can work with blocks in terms of the page (adding, moving, deleting) using these methods. However, to work with a specific block, use these methods.
- Don't forget, after all actions, the page needs to be published.
- If you need more blocks, you can always register new ones.
This is the essential framework you need to work with blocks. There are certainly many more methods, and they are quite specific to cover most of your use cases.
Good luck!
Overview of Methods
User Blocks
|
Method |
Description |
Version |
|
Method to get the list of blocks in the current application. |
||
|
Method to add a block to the repository. |
||
|
Method to remove a block. |
||
|
Method checks content for dangerous substrings. |
Templates
|
Method |
Description |
|
Gets the list of included areas for the page. |
|
|
Gets the list of templates. |
|
|
Gets the list of included areas for the site. |
|
|
Sets the included areas for the page. |
|
|
Sets the included areas for the site. |
User Templates
|
Method |
Description |
|
Method registers a template in the site and page creation wizard. |
|
|
Method removes a registered user template. |
|
|
Method to get the list of available user templates in the current application. |
|
|
Method to get the list of available templates for creating websites. |
|
|
Method to get the list of available templates for creating pages. |
Websites
|
Method |
Description |
Version |
|
Adds a website. |
||
|
Adds a folder to the website. |
21.800.0 |
|
|
Deletes a website. |
||
|
Exports the website and all its pages into a special array. |
||
|
Gets the folders of the website. |
21.800.0 |
|
|
Gets the list of websites. |
||
|
Returns the URL of the website's preview image. |
21.800.0 |
|
|
Returns the full URL of the websites. |
18.7.500 |
|
|
Gets additional fields of the website. |
||
|
Marks the website as deleted. |
||
|
Marks the folder as deleted. |
21.800.0 |
|
|
Restores the folder from the trash. |
21.800.0 |
|
|
Restores the website from the trash. |
||
|
Publishes the website and all its pages. |
||
|
Publishes the website folder. |
21.800.0 |
|
|
Unpublishes the website folder. |
21.800.0 |
|
|
Unpublishes the website and all its pages. |
||
|
Updates the website parameters. |
||
|
Updates the folder parameters. |
21.800.0 |
Rights
|
Method |
Description |
|
Toggles models. |
|
|
Determines the rights models. |
Extended Rights Model
|
Method |
Description |
|
Method returns the rights of the current user. |
|
|
Sets access permissions for the website. |
Role-Based Rights Model
|
Method |
Description |
|
Method allows getting the list of roles. |
|
|
Method allows getting the list of websites for which rights are set within the role. |
|
|
Method sets access codes for the role that will apply to this role. |
|
|
Method sets the necessary rights within the role for website lists. |
Pages
|
Method |
Description |
Version |
|
Method for adding a page. |
||
|
Method for adding a page by template. |
||
|
Method copies the specified page. |
||
|
Method for deleting a page. |
||
|
Method for getting additional fields of the page. |
||
|
Method for getting the list of pages. |
||
|
Method returns the path to the page preview. |
||
|
Method returns the web address of the page. |
||
|
Method marks the page as deleted. |
||
|
Method marks the page as not deleted. |
||
|
Method moves the page to another website and/or folder. |
21.800.0 |
|
|
Method for publishing the page. |
||
|
Method removes related entities of the landing. |
||
|
Method returns the page identifier by the provided relative URL. |
21.800.0 |
|
|
Method for unpublishing the page. |
||
|
Method for modifying the page. |
Working with Blocks on the Page
|
Method |
Description |
Version |
|
Method for adding a new block to the page. |
||
|
Method for copying a block from one page to another. |
||
|
Method for deleting a block from the page. |
||
|
Method for moving a block down one position on the page. |
||
|
Method saves an existing block on the page to "My Blocks." |
21.800.0 |
|
|
Method hides a block from the page. |
||
|
Method marks a block as deleted but does not physically remove it. |
||
|
Method restores a block from the marked as deleted state. |
||
|
Method for moving a block from one page to another. |
||
|
Method for showing a block on the page. |
||
|
Method removes a block that was saved in "My Blocks." |
21.800.0 |
|
|
Method for moving a block up one position on the page. |
Special Pages
|
Method |
Description |
|
Removes all mentions of the page as special. |
|
|
Removes all special pages. |
|
|
Gets the address of the special page of the site. |
|
|
Gets the list of special pages. |
|
|
Sets a special page for the site. |
Blocks
|
Method |
Description |
Version |
|
Method for cloning a block card. |
||
|
Method for removing a block. |
||
|
Method for changing the content of a block. |
||
|
Method changes the tag name. |
||
|
Method for changing the attributes of a block node. |
||
|
Method for changing the styles of a block. |
||
|
Method for getting the content of a block. |
||
|
Method for getting the list of blocks on the page. |
||
|
Method for getting a block by its identifier. |
||
|
Method for getting the manifest of a specific block already placed on the page. |
||
|
Method for getting the manifest of a block from the repository. |
||
|
Method returns the list of blocks from the repository. |
||
|
Method uploads an image and associates it with the specified block. |
||
|
Method updates the content of a block already placed on the page to any arbitrary content. |
||
|
Method fully replicates the work of landing.block.clonecard but allows inserting a card with modified content immediately. |
||
|
Method for mass updating block cards. |
||
|
Method changes the symbolic code of the anchor. |
||
|
Method gets the content of a block from the repository "as is" before adding the block to any page. |
18.7.500 |
Embedding Knowledge Base
|
Method |
Description |
|
Binds to a social network group. |
|
|
Embeds in the menu. |
|
|
Gets bindings to groups. |
|
|
Gets the list of bindings in the menu. |
|
|
Removes the binding to a social network group. |
|
|
Removes from the menu. |