getBlueprintTemplates method

Future<BlueprintTemplateArray> getBlueprintTemplates({
  1. String? spaceKey,
  2. int? start,
  3. int? limit,
  4. List<String>? expand,
})

Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all blueprint templates in a space.

Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the global blueprints.

Permissions required: 'View' permission for the space to view blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global blueprints.

Implementation

Future<BlueprintTemplateArray> getBlueprintTemplates(
    {String? spaceKey, int? start, int? limit, List<String>? expand}) async {
  return BlueprintTemplateArray.fromJson(await _client.send(
    'get',
    'wiki/rest/api/template/blueprint',
    queryParameters: {
      if (spaceKey != null) 'spaceKey': spaceKey,
      if (start != null) 'start': '$start',
      if (limit != null) 'limit': '$limit',
      if (expand != null) 'expand': expand.map((e) => e).join(','),
    },
  ));
}