logo
Snip
  • Getting started
  • User Guide
    • First steps
    • Creating a book
    • Bookshelf
    • Book/Page(s) editor
    • Account settings
    • Collaboration
    • API
    • Upload Snippets
  • Deployment
  • Development
  • Home

Automating tedious tasks with our API

Sometime automation is desired for a specific task. For instance uploading a visualization directly from a script. To help with this we expose some endpoints that can be used to automate tasks. This small guide requires some basic knowledge of curl and json.

There are two ways to interact with the API. You may either use our python package or use the endpoints directly. The python package is still in development and may change but it should provide a good starting point for automating tasks. The endpoints are more flexible and allow you to interact with the API directly.

  • Using the python package
  • Using the Endpoints directly

Using the endpoints directly

You may create an API token to interact with the API. We supply two kinds of tokens:

  • Book token: This token is limited to a single book and allows you to interact with the book without the need to login. This is primarily useful for automation tasks. You can create such a token in a books settings page under the Access tab.

  • User token: This token has access to all resources of the user and allows you to interact with the labbook as the user. This is useful for tasks that require access to multiple books or resources. Or if you want to create a book automatically on behalf of a user. You can create such a token in your user settings page under the Miscellaneous tab.

Alternatively, your session token you may access the API endpoints directly. The session token is available in your browser when you are logged in. You may find it in the developer tools under the Application tab. The token is stored in the snip_labook cookie.

Available Endpoints

You may find a list of all available endpoints in the API documentation. The documentation is generated automatically and should always be up to date.

  • v1.14.14 © 2021 - 2025
  • Sebastian B. Mohr
  • Markus Osterhoff
  • Schemas
  • Docs
  • Privacy policy
  • Imprint