Lock/unlock

Description

Lock or unlock a resource. Locking a resource prevents its value from being modified. Requires RESOURCE_MANAGE permission.

Unlocking via the API is permanent — the resource remains unlocked until explicitly locked again. This differs from the Tines UI, which offers a temporary unlock that automatically re-locks the resource after a single edit.

Locking or unlocking a resource also applies to its test resource. A test resource cannot be locked or unlocked independently from its live resource.

Request

HTTP Method: PUT

Parameter Description
id The ID of the resource.
locked Boolean. true to lock the resource, false to unlock

Sample request

curl -X PUT \
  https://<<META.tenant.domain>>/api/v1/global_resources/<<resource_id>>/locked \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{"locked": true}'

Response

A successful request will return a JSON object with the resource's id and locked status.

Sample response

{
  "id": 9,
  "locked": true
}
Was this helpful?