Metadata Rules

Updates an existing conditional metadata rule's definition

PUT
/v1_1/{cloud_name}/metadata_rules/{external_id}

Updates the properties and configuration of an existing metadata rule.

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

external_id*string

The unique identifier of the metadata rule.

Request Body

application/json

The updated metadata rule definition.

metadata_field_id?string

The ID of the metadata field this rule applies to.

name?string

A descriptive name for the metadata rule.

condition?

The condition that triggers this rule. Ensure it adheres to the metadata rule condition schema.

result?

The result to apply when the rule's condition is met. At least one property must be set.

Properties1 <= properties
state?state_enum

The state of the rule.

Value in

  • "active"
  • "inactive"
position?integer

The position/order of this rule relative to other rules.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1_1/my_cloud/metadata_rules/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "metadata_field_id": "string",  "name": "string",  "condition": {},  "result": {    "apply_value": {      "value": "string",      "mode": "default"    },    "disable": true,    "enable": true,    "hide": true,    "activate_values": "all",    "set_mandatory": true  },  "state": "active",  "position": 0,  "external_id": "string",  "condition_signature": "string"}