Description

Use a HTTP POST request to create a global resource.

Request

HTTP Method: POST

Parameter Description
name Name of the global resource.
value Contents of the global resource. When a non-json string is passed in, it will be parsed as regular text.
team_id Optional ID of Tines Team where the global resource will be located.
folder_id Optional ID of folder to which the global resource will be located
read_access Optional Control where this global resource can be used (TEAM, GLOBAL). default: TEAM

Sample request

curl -X POST \
  https://<tenant-domain>/api/v1/global_resources \
  -H 'content-type: application/json' \
  -H 'x-user-email: <email-address>' \
  -H 'x-user-token: <api-token>' \
  -d '{
        "name": "foo",
        "value": "bar"
    }'

Response

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

Field description

Parameter Description
id Global resource ID.
user_id ID of user associated with the resource.
name Name of the global resource.
team_id ID of team to which the global resource belongs.
folder_id ID of folder to which the global resource belongs.
read_access Control where this resource can be used.
slug An underscored representation of the global 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.

Sample response

{
  "id": 9,
  "user_id": 1,
  "name": "foo",
  "value": "bar",
  "created_at": "2020-02-05T20:40:32.313Z",
  "updated_at": "2020-02-05T20:40:32.313Z"
}