The blocks API provides the users with the capability to list the blocks in the platform, and use them within their pipelines
import razor
razor.api.blocks()
Argument | Description |
---|---|
scope | This argument filters the blocks available at the scope level. The platform supports two scopes. 1. BlockScope.ORG - Filters all blocks, which are at an organisation level. i.e. blocks which are global to the organisation 2. BlockScope.PROJECT - Filter all blocks, which are available only at the project level |
bundlename | Filter by a bundle name |
blockname | Filter by a block name |
import razor
razor.api.blocks()
import razor
razor.api.blocks(scope=BlockScope.ORG)
razor.api.blocks(scope=BlockScope.PROJECT)
import razor
razor.api.blocks(bundlename='default')
import razor
razor.api.blocks(blockname='HelloWorld')