Description

Use a HTTP POST request to create a global resource.

Request

HTTP Method: POST

Parameter Description
name Name of the global resource.
value_type Global resource type, either: text, json or array.
value Contents of the global resource.

Sample request

curl -X POST \
  https://<tenant-name>.tines.io/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_type": "text",
        "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.
value_type Global resource type, either: text, json or array
created_at ISO 8601 Timestamp respresenting date and time the event was emitted.
updated_at ISO 8601 Timestamp respresenting date and time the event was last updated. Will always by the same as ‘created_at’.

Sample response

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