REST v.2 version tags


Version tags are controlled vocabularies for installed components that manage the range of valid versions that can be assigned in a step. These values can be manually entered in the metadata interface or added programmatically by an external repository system.

GET /v2/version_tags

 Returns all version tags.

Filters

  • name—String value of a version tag name
  • app_id—Integer value of an application ID
  • app_name—String value of an application name
  • component_id—Integer value of a component ID
  • component_name—String value of a component name
  • environment_id—Integer value of a component ID
  • environment_name—String value of an environment name
  • archived—Boolean value to show the archived version tags (can be combined with the unarchived to show both)

  • unarchived—Boolean value to show the unarchived version tags (can be combined with the archived to show both)

Common attributes

  • format—Ensure to include an accept header or add JSON to the last path element
  • token—Your API Token for authentication

Errors caused

  • ERROR 403 Forbidden—When the token is invalid.
  • ERROR 404 Not Found—When no records are found.

Examples

To test this method, insert the URL or your valid API key and application host into a browser or HTTP client like Wget or cURL.

To get a list of all version tags, run the following REST call:

 curl -i -H "accept: application/json" -X GET http://[rails_host]/v2/version_tags?token=[api_token]

Example with filters

To get a list of all version tags associated with a specific component, run the following REST call:

curl -i -H "accept: application/json" -H "Content-Type: application/json" -X GET -d '{"filters":{"component_name":"Jenkins"}}' http://[rails_host]/v2/version_tags?token=[api_token]

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*