Templates
When creating a new project in Space Blocks, you can opt to use a template. Templates are pre-configured, seeded project structures that can help you get started quickly. They can include things like Resource Types, Permissions, Roles and Resources.
Using a Template
When creating a new project from the Cloud Portal, you can select a template from the list of available templates. The template will be used to seed your new project with the necessary configuration. When creating a new project via API or SDK, you can specify the template ID in the template
parameter of the request. You can find a list of available templates and their names below.
Available Templates
Weather Forecast
Template ID: weather_forecast
The Weather Forecast template is a getting started template for playing around with permissions and roles and getting familiar with Space Blocks. It is used for some of our tutorials and examples. The idea is to create a simple weather forecast application that allows specific users to access the current or future weather forecast for a specific city.
The template includes:
- A City resource type
- A Get Current Forecast permission for the City resource type
- A Get Future Forecast permission for the City resource type
- A Current Forecast Viewer role with the Get Current Forecast permission
- A Future Forecast Viewer role with the Get Current Forecast and Get Future Forecast permissions
- A City resource Seattle
- A City resource Cansas
- A Role Assignment for Alice for the Current Forecast Viewer role on City Seattle
- A Role Assignment for Linda for the Future Forecast Viewer role on City Seattle
- A Role Assignment for Linda for the Future Forecast Viewer role on City Cansas