Introduction

It’s common for teams to use the same piece of information in multiple agents. For example, the URL of a Jira project, or a list of known-good domains. If this information is stored directly inside the agents’ options and it changes (a new known-good domain is added), every agent will need to be updated individually. Global Resources provide a way to store information in a single, centralised location, so it can then be accessed from any agent.

Global Resources are similar to global variables in software development and can be used in a similar way to text User Credentials.

Example

The below agent config shows a global resource being used in a HTTP Request Agent.

{
  "url": "{% global_resource tines_jira_url %}",
  "content_type": "json",
  "method": "POST",
  "payload": {
    "serviceDeskId": "48",
    "requestTypeId": "586",
    "requestFieldValues": {
      "summary": "New ticket title",
      "description": "Here's some important"
    }
  },
  "basic_auth": "cert@tines.xyz:{% credential JIRA-Crew-Security %}"
}

When the above agent runs, the global_resource placeholder will be replaced by the contents stored in the tines_jira_url global resource.