Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blocks:api [2023-04-18 16:16] – typo adminblocks:api [2025-11-12 09:09] (current) – Added Display Spot Screenshot API admin
Line 1: Line 1:
 ======Blocks APIs====== ======Blocks APIs======
-Programmatic interfaces for controlling the appearance or behavior of the Blocks editor or a Display Spot, for communicating with Blocks from custom web applications and for uploading images and other files to a Blocks server.+Programmatic interfaces for:
  
-  * [[blocks:api:query-parameters|URL Query parameters]] can be used to manipulate the behaviour of both the editor and display spot.+  * Controlling the appearance or behavior of the Blocks editor or a Display Spot 
 +  * Uploading images and other files to a Blocks server 
 +  * Communicating with Blocks from custom applications. 
 +  * Drivers and other scripts enhancing Blocks itself, running on your Blocks server. 
 + 
 +Learn more about the various options and APIs available. 
 + 
 +  * [[blocks:api:query-parameters|URL Query parameters]] for controlling the editor and display spots. 
 +  * [[blocks:custom_styling|Custom styles, colors and fonts]] using CSS.
   * [[blocks:api:javascript|Javascript APIs]] for communicating with Blocks from web pages, either used as part of a block (using a Web Block) or running as a separate web page (which may still be hosted on your Blocks server).   * [[blocks:api:javascript|Javascript APIs]] for communicating with Blocks from web pages, either used as part of a block (using a Web Block) or running as a separate web page (which may still be hosted on your Blocks server).
   * [[blocks:api:upload|File Upload APIs]] for uploading files, for example images to Blocks.   * [[blocks:api:upload|File Upload APIs]] for uploading files, for example images to Blocks.
 +  * [[blocks:api:spot-screenshot|Display Spot Screenshot API]] for viewing what's on screen for a Display Spot.
 +  * [[blocks:api:tcp|Raw TCP socket API]] for communicating with Blocks from other control systems or programs capable of accessing TCP sockets.
 +  * Custom API endpoints can be defined by User Scripts using the [[blocks:advanced_scripting#resource|@resource decorator]].
 +  * APIs available to [[blocks:advanced_scripting|server scripts]] are documented in their respective file, located in your blocks root at script/system and script/system_lib. If you don't have those files installed, you can get them [[https://github.com/pixilab/blocks-script|here]], with instructions at the bottom of that page.
  
 +:!: **IMPORTANT** Externally accessible APIs can be protected using API keys. If so, an apiKey query parameter must be appended to the URL, with the correct value. API keys and their values are defined in Blocks [[blocks:server_configuration_file#top_level_apikeys_item|configuration file]].