Get

Description

Retrieve a resource.

Request

HTTP Method: GET

Parameter Description
resource_id The ID of the live resource to retrieve.
include_referencing_action_ids Optional Defaults to true, when set to false we will exclude referencing_action_ids from the response
typed_value Optional Defaults to false. When set to true, returns properly typed values (boolean, number, array, object) instead of strings
curl -X GET \
  https://<<META.tenant.domain>>/api/v1/global_resources/<<resource_id>> \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Example with typed_value

To retrieve a resource with properly typed values (e.g., true as a boolean instead of "true" as a string):

curl -X GET \
  https://<<META.tenant.domain>>/api/v1/global_resources/<<resource_id>>?typed_value=true \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful request will return a JSON object describing the selected resource.

Field description

Parameter Description
id Resource ID.
name Name of the resource.
value Value of the resource. By default, returns a string representation. Use typed_value=true to get properly typed values. For file resources, contains name, contents, and type fields.
team_id ID of team to which the resource belongs.
folder_id ID of folder to which the resource belongs.
user_id ID of user associated with the resource.
read_access Control where this resource can be used (TEAM, GLOBAL, SPECIFIC_TEAMS).
shared_team_slugs List of teams' slugs where this resource can be used when read_access is SPECIFIC_TEAMS, otherwise empty.
slug An underscored representation of the resource name
created_at ISO 8601 Timestamp representing date and time the resource was created.
updated_at ISO 8601 Timestamp representing date and time the resource was last updated.
description Description of the resource.
test_resource_enabled A boolean value stating if the resource is enabled for using a test resource.
test_resource JSON block of the test resource.
referencing_action_ids IDs of action that are referencing the Resource.

Sample response

Default response (typed_value=false or omitted):

{
  "id": 1,
  "name": "tines_jira_url",
  "value": "tinesio.atlassian.net",
  "team_id": 2,
  "folder_id": 1,
  "user_id": 1,
  "read_access": "TEAM",
  "shared_team_slugs": [],
  "slug": "tines_jira_url",
  "created_at": "2019-12-12T21:34:16.540Z",
  "updated_at": "2019-12-12T21:34:16.540Z",
  "description": "",
  "test_resource_enabled": false,
  "referencing_action_ids": [431]
}

Response with typed_value=true:

When typed_value=true is specified, values are returned with their proper types:

{
  "id": 2,
  "name": "enable_feature",
  "value": true,
  "team_id": 2,
  "folder_id": 1,
  "user_id": 1,
  "read_access": "TEAM",
  "shared_team_slugs": [],
  "slug": "enable_feature",
  "created_at": "2019-12-12T21:34:16.540Z",
  "updated_at": "2019-12-12T21:34:16.540Z",
  "description": "",
  "test_resource_enabled": false,
  "referencing_action_ids": [432]
}

Note: In the example above, value is a boolean true rather than the string "true". This applies to all value types:

  • Booleans: true / false (not "true" / "false")
  • Numbers: 42 (not "42")
  • Arrays: ["a", "b"] (not "[\"a\",\"b\"]")
  • Objects: {"key": "value"} (not "{\"key\":\"value\"}")
  • Strings: remain as strings
Was this helpful?