Skip to main content

Space Blocks Concepts

The Space Blocks Cloud is organized in a hierarchical structure. The top level is the tenant. A tenant can have multiple projects. Each project can have multiple environments. Each environment can have multiple Space Blocks. Each Space Block can be configured individually for each environment.

Space Blocks are essential building blocks for your apps and provide a wide range of functionailities that can be consumed via their API or SDK. The Space Blocks themselves are hosted by us, so you don't need to care about hosting and maintenance, availability and performance. After configuring, all you need to do for consuming a Space Block from your app is calling its API or using its SDK.

Tenants

A tenant is the top level entity in the Space Blocks Cloud. It represents a single company or organization. Each tenant has its own unique ID and can have multiple projects. A tenant gets automatically created when you sign up for the Space Blocks Cloud.

Projects

A project in represents a single app of yours and acts as a boundary for configuration and access control. Each project can use one to many different Space Blocks. You can choose, which Space Blocks you want to use in a project, as Space Blocks are added at project level. A project can contain multiple environments.

Create a project

Make sure, you are authenticated against the Core API and have a valid JWT token.

curl --location --request POST 'https://api.spaceblocks.cloud/public/projects' \
--header 'Authorization: Bearer ey...' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "my-project",
"spaceBlocks": [
"permissions"
]
}'

Check the list of available Space Blocks for possbile values for the spaceBlocks array.

Environments

Environments represent different configurations or stages of your app project. For example, many advanced application have a development environment, a staging environment and a production environment. Each environment can have its own configuration for each Space Block. But don't worry, using multiple environments in completely optional. You can also use only one environment for all your apps.

A environment is always associated with a project. After creating a new project, a default environment is created automatically.

Each environment of a project will always have the same Space Blocks, as these are defined at project level, when adding a new environment to a project, it will automatically get the same Space Blocks, when adding a new Space Block to a project, it will automatically get added to all environments of the project.

Each environment also has a unique API Key that gives access to the dedicated APIs of the Space Blocks. This API Key has to passed to the API or SDK whenever communicating with the Space Blocks.

Environment Tiers

Environments can have different Pricing Tiers, which come with different API Limits.

Developer Tier

LimitValue
API Requests per second10
API Requests per hour1000

Prodcution Tier

LimitValue
API Requests per second100
API Requests per hour10.000

Create a environment

Make sure, you are authenticated against the Core API and have a valid JWT token.

curl --location --request POST 'https://api.spaceblocks.cloud/public/projects/<PROJECT_ID>/environments' \
--header 'Authorization: Bearer ey...' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "my-environment",
"dataCenterId": "eu1"
}'

Check the list of available Data Centers for possbile values for the dataCenterId array.