Global resources (v1)

Replace an element in a resource

Replace a top-level element in an array or a key in an object in a resource. Returns the updated resource value. If the resource has a test value it can be modified using the is_test parameter.

post/api/v1/global_resources/{id}/replace

Request

  • Base URL: https://your-tenant.tines.com
  • URL: https://your-tenant.tines.com/api/v1/global_resources/{id}/replace
  • Auth: one of:
    • API key in header X-User-Token
    • HTTP bearer

Path parameters

idinteger required

The ID of the live resource

Request body

keystring

The object key to replace if replacing in an object

indexinteger

The array index to replace (starting at 0)

valuestring required

The new value to replace the existing element with

if_valuestring

When provided, only proceeds if the current value at the key or index matches; otherwise a 422 with the current value is returned. A null value is treated as omitting the parameter

is_testboolean

Whether the test resource should be used

Response

The updated resource value

Changes

No recorded changes to this operation across all 1 revision of this API.