Update an effect

Updates an effect identified by the provided handle. If the effect with the provided handle doesn't exist, API will return 404 error.

PUT
/effects/{id}
AuthorizationBearer <token>

JWT signed by private key. The presence of this token is not mandatory. It becomes required through the configuration of authorization access rules that requires a token to grant access. Once sent, the token is validated for its format, signature and expiration, regardless of the presence of access rules.

In: header

Path Parameters

idaddress | luid

The unique identifier of the record - it is luid or handle (address).

Header Parameters

x-ledger?handle | luid

The unique identifier of ledger in context for multi tenant requests.

Effect body

hashhash
Match^[A-Fa-f0-9]{64}$
metabase-meta
luidluid

String that represents a ledger record unique identifier. It's generated by the ledger when the record is stored.

  • Format: $<type_prefix>.<17_random_chars>
  • Where:
    • type_prefix is a 3-letter code identifying the record type:
    • 17_random_chars consists of random alphanumeric characters [A-Za-z0-9], underscore (_) and hyphen (-)
Match^\$([a-z]{3})\.[A-Za-z0-9_-]{17}$
dataeffect-data

Response Body

const body = JSON.stringify({
  "hash": "93f3bed329537c8db2d252ff729d291f9013c98f5cb037529d33ac61e4530918",
  "luid": "$eff.-08478PVlnUAU4V4q",
  "data": {
    "handle": "signer-member-updated",
    "signal": "signer-updated",
    "filter": {
      "signer.data.schema": "member",
      "signer.meta.status": "blocked"
    },
    "action": {
      "bridge": "studio",
      "schema": "bridge"
    },
    "access": [
      {
        "action": "any",
        "signer": {
          "$record": "owner"
        }
      },
      {
        "action": "read",
        "bearer": {
          "$signer": {
            "$record": "owner"
          }
        }
      }
    ],
    "parent": "dc575cf8c449ca42c6df2394651f8faa84472dea96d142eb65a0aa350e4b290b"
  },
  "meta": {
    "proofs": [
      {
        "method": "ed25519-v2",
        "public": "gef6OID0o7ZFGTXutV62mh+zv5kgkFP3QLiR+N7syck=",
        "digest": "0c450f48fc13224f848e206a4a9f44059a43b5e2a0235007dbcaf16d80e18c97",
        "result": "bsx8coKsB5N8DjEiZiNLefPFDB6rVK+eTCnn6U/o/z+r9nit7sN+RC04IlbwJsYr/HuNGyRKER5Lmz5uuN+pDA==",
        "custom": {
          "moment": "2025-04-02T05:10:32.080Z"
        }
      }
    ]
  }
})

fetch("http://localhost:3000/v2/effects/string", {
  headers: {
    "x-ledger": "string"
  },
  body
})

{
  "hash": "93f3bed329537c8db2d252ff729d291f9013c98f5cb037529d33ac61e4530918",
  "data": {
    "parent": "dc575cf8c449ca42c6df2394651f8faa84472dea96d142eb65a0aa350e4b290b",
    "handle": "signer-member-updated",
    "signal": "signer-updated",
    "filter": {
      "signer.data.schema": "member",
      "signer.meta.status": "blocked"
    },
    "action": {
      "bridge": "studio",
      "schema": "bridge"
    },
    "access": [
      {
        "action": "any",
        "signer": {
          "$record": "owner"
        }
      },
      {
        "action": "read",
        "bearer": {
          "$signer": {
            "$record": "owner"
          }
        }
      }
    ]
  },
  "luid": "$eff.-08478PVlnUAU4V4q",
  "meta": {
    "proofs": [
      {
        "custom": {
          "moment": "2025-04-02T05:10:32.080Z"
        },
        "digest": "0c450f48fc13224f848e206a4a9f44059a43b5e2a0235007dbcaf16d80e18c97",
        "method": "ed25519-v2",
        "public": "gef6OID0o7ZFGTXutV62mh+zv5kgkFP3QLiR+N7syck=",
        "result": "bsx8coKsB5N8DjEiZiNLefPFDB6rVK+eTCnn6U/o/z+r9nit7sN+RC04IlbwJsYr/HuNGyRKER5Lmz5uuN+pDA=="
      },
      {
        "custom": {
          "luid": "$eff.-08478PVlnUAU4V4q",
          "moment": "2025-04-02T05:10:32.099Z"
        },
        "digest": "1c3f0a426c9aa3d76ba9ef0a837671c4a027e1ab8f516346d8531eca04ce71ad",
        "method": "ed25519-v2",
        "public": "SYqAsweCOCByOQrC9DSjAmIVlyocndNaB/GyjxfQY5U=",
        "result": "tAbjdALwaHYOW4lYjm5PSu+wx8XxCp0UDbJZ/FEyKIAaprohdtqmjZVmcnm9u/DbGiQgym0vId24Xch2uEW+Ag=="
      }
    ],
    "status": "created",
    "moment": "2025-04-02T05:10:32.097Z",
    "owners": [
      "gef6OID0o7ZFGTXutV62mh+zv5kgkFP3QLiR+N7syck="
    ]
  }
}

{
  "hash": "7846195d1e2f8bc75aa0ab35a238b70dc28c809b8fde33ea7d29e9f8d6d6841b",
  "data": {
    "reason": "auth.unauthorized",
    "detail": "Invalid token."
  },
  "meta": {
    "proofs": [
      {
        "method": "ed25519-v2",
        "public": "JdK8m5SqXGCiZ1TdXQbCe9ECqwL3Kg1UZxj4r9gT+cA=",
        "digest": "7846195d1e2f8bc75aa0ab35a238b70dc28c809b8fde33ea7d29e9f8d6d6841b",
        "result": "X2m5A9Yxh4FRPgj6wgJKN0dYrfgXSq3hx8UX1jnmJ7fVHtQCnAp8MepXDZQhNkMsJd7a9HPk96hmvYXTFcHzAw=="
      }
    ]
  }
}

{
  "hash": "4969e3c012b66d88cec597bf337fc01eab8d651e6ed2d5c40236cc1f7d93435a",
  "data": {
    "reason": "auth.forbidden",
    "detail": "Request is not authorized"
  },
  "meta": {
    "proofs": [
      {
        "method": "ed25519-v2",
        "public": "WAweF9PHlboQoW0z8NqhZXFmzUTaV74NRFAd/aILprE=",
        "digest": "4969e3c012b66d88cec597bf337fc01eab8d651e6ed2d5c40236cc1f7d93435a",
        "result": "0G2gvSfBx6MwPT8ShBaiYx7zwa5Kqc4Cq3S3NXV1m5/ZPozoH/SUouuhi9sQU+f0yo0eX4ygH7PzE3PAdlxsCQ=="
      }
    ]
  }
}

{
  "hash": "b29a7f4e1d5c3b6a8f7e0d9c2b5a8f7e0d3c6b9a8f7e1d4c7b0a3f6e9d2c5b8a",
  "data": {
    "reason": "record.not-found",
    "detail": "Signer not found"
  },
  "meta": {
    "proofs": [
      {
        "method": "ed25519-v2",
        "public": "7ZMqyx5Lk3PQwNrJvGIs9eT6ahcUKXZ8SbRj4WyF2dQ=",
        "digest": "b29a7f4e1d5c3b6a8f7e0d9c2b5a8f7e0d3c6b9a8f7e1d4c7b0a3f6e9d2c5b8a",
        "result": "VFp8RxnT2h+JK9W5/nJfLZdV1uLKXHBL5RwpnbZ4qDz3J1Ks4eOj7y9QVMhmwlIa5AQlNbdT3GJcvH8xo3WhBA=="
      }
    ]
  }
}

{
  "hash": "9e518d3f4a7c8b67ad43fcf9b6a21e0c5f9b2a5e7d6c3b8a1f4e7d0c9b8a7f5e",
  "data": {
    "reason": "record.duplicated",
    "detail": "Ledger with handle ach already exists."
  },
  "meta": {
    "proofs": [
      {
        "method": "ed25519-v2",
        "public": "QpI4V3K6NzJLbRWCGxdHF7XYT9w2jVkArMpLoFa84s4=",
        "digest": "9e518d3f4a7c8b67ad43fcf9b6a21e0c5f9b2a5e7d6c3b8a1f4e7d0c9b8a7f5e",
        "result": "jR3PQvN7Dy4GcXshzZIa5qd6me9CyiTUwRlJo8fkHpv2jlYE+Hx/D0FSrT2y6MCcSjFnV3dlUmWxJrb5F+kzDQ=="
      }
    ]
  }
}

{
  "hash": "3f6e9d2c5b8a1f4e7d0c3b6a9f2e5d8c1b4a7f0e3d6c9b2a5f8e1d4c7b0a3f6e",
  "data": {
    "reason": "record.schema-invalid",
    "detail": "Schema validator error: data.handle must match pattern \"^[a-zA-Z0-9_\\\\-+.]+$\"",
    "custom": {
      "errors": [
        {
          "instancePath": "/handle",
          "schemaPath": "#/properties/handle/pattern",
          "keyword": "pattern",
          "params": {
            "pattern": "^[a-zA-Z0-9_\\\\-+.]+$"
          },
          "message": "must match pattern \"^[a-zA-Z0-9_\\\\-+.]+$\""
        }
      ]
    }
  },
  "meta": {
    "proofs": [
      {
        "method": "ed25519-v2",
        "public": "vL8jKxm5PqTnJfEaRs2uOdY7gzX4CS9WbHlN3cAiBV0=",
        "digest": "3f6e9d2c5b8a1f4e7d0c3b6a9f2e5d8c1b4a7f0e3d6c9b2a5f8e1d4c7b0a3f6e",
        "result": "uYxJLd2QGkEfT8rP7mCn1lHVzBvIaSK4jFqpO5ZwW9oADnMbg6yeiUsvN3tcXj0RwYxkrq5aLm9f4y2Ko8WwDw=="
      }
    ]
  }
}

{
  "hash": "e1d4c7b0a3f6e9d2c5b8a1f4e7d0c3b6a9f2e5d8c1b4a7f0e3d6c9b2a5f8e1d4",
  "data": {
    "reason": "api.unexpected-error",
    "detail": "An unexpected error occurred"
  },
  "meta": {
    "proofs": [
      {
        "method": "ed25519-v2",
        "public": "KxiLpB3v8VEdmYsT2RwNq5o1Cz9gHJfU4aAySt7D0X8=",
        "digest": "e1d4c7b0a3f6e9d2c5b8a1f4e7d0c3b6a9f2e5d8c1b4a7f0e3d6c9b2a5f8e1d4",
        "result": "LzRmNh7x5TQYoqjw30BKDaZnbGcFUsX8v4tpEsr9P6iW1dyJkVC2uALfY8HdpM3eX9w0On12cqYxEtveKoFZDQ=="
      }
    ]
  }
}