Skip to content

How to fetch template metadata by name

Dilshat edited this page Jun 26, 2018 · 2 revisions

Bazaar provides the following endpoint to search for a template by its name and optional additional criteria:

https://bazaar.subutai.io/rest/v1/cdn/template?name={template-name}

Parameter name is mandatory.

There are optional parameters that can be used to further filter the result:

  • version - version of template
  • owner - owner of template

All passed criteria must be met for a template to be found. The endpoint will return a single template metadata that meets the criteria or 404 status. Search is case-insensitive

Special notes:

  • if version parameter equals to "latest" or missing, latest version of template among all the templates that meet the other criteria is returned
  • if owner is missing, subutai/jenkins owner is used in place

Special use-case:

  • if id parameter is present, all other parameters are ignored, name is not mandatory in this case.

https://bazaar.subutai.io/rest/v1/cdn/template?id={template-id}