API
How to approach and interact with the speckle api • Last modified on 7/5/2019 • edit

Besides the server, everyting else in the speckle platform is, at the end of the day, an API client. The Speckle REST API's documentation lives in a separate place. It covers all the essential endpoints, specifically:

  • Accounts: creating new users, logging in, etc.
  • Streams: creating, updating, deleting and diffing streams
  • Objects: base create, read, update, delete
  • Projects: grouping streams together and setting permissions
  • etc.

Interacting & Testing the API

The speckle api is documented in the OpenAPI v3 format, which allows you to easily import it into an API tool of choice and start hacking. Which api tools? There's quite a few to choose from: Postman, Insomnia, Paw, etc.

postman

If you want a leg up, you can download and import in the api tool of your choice the raw specification file, if it supports OpenApi specs. You can, of course, interact with speckle straight from the command line, if you're so inclined! TIP: jq will help you parse json in the command line.


curl -X POST https://hestia.speckle.works/api/streams \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'