Skip to main content
Skip table of contents

Environment Custom Field Rest API

Learn how to use dedicated REST endpoints to write automations and scripts dealing with Environment Custom Fields.

Learn how to authenticate and use the Golive REST API: Rest API

Learn more about environment custom fields: Environment Custom Fields


Type of IDs used by an Environment Custom Field

You cannot use a Golive environment ID to set an environment custom field!
Please ensure to understand the different types of ID’s before starting setting up your rules.

When working with Jira Cloud environment custom fields, there are 2 different types of id:

  • option id: you must use it to set a value of the custom field

  • Golive environment id: this the ID of an environment, you cannot use it to a custom field value


Get the selectable options of an environment custom field

This endpoint returns the list of options (option id + environment name) your can use to set the custom field options:

/customfield/environment/selectable

Query Parameters

  • (required) projectKey or projectId: the list of options can be different from a project to another. You must specify the project context using one of this parameter

  • (required) customfieldKey or customfieldName: specify the key or the name of the environment custom field.

The name of the custom field must be url encoded if it contains spaces or any special chars.

Example

XQUERY
https://golive.apwide.net/api/customfield/environment/selectable?projectKey={{your project key}}&customfieldName={{url encoded name of your environment custom field}}

Ids returned by this endpoint are Environment Custom Field Option IDs. Name of the option = Name of the environment.


Get the environments selected by an environment custom field

This endpoint return the list of environments selected by an environment custom field of a given issue:

/customfield/environment/selected

Query Parameters

  • (required) issueKey: the key of the issue

  • (required) customfieldKey or customfieldName: specify the key or the name of the environment custom field

The name of the custom field must be url encoded if it contains spaces or any special chars.

Example:

CODE
https://golive.apwide.net/api/customfield/environment/selected?issueKey={{issue.key}}&customfieldName=Detected%20In

Ids returned by this endpoint are Golive Environment IDs

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.