Blocks APIs

Programmatic interfaces for:

  • 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.

  • URL Query parameters for controlling the editor and display spots.
  • 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).
  • File Upload APIs for uploading files, for example images to Blocks.
  • 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 @resource decorator.
  • APIs available to 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 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 configuration file.