data_associations_metadata_update_batch_collection
PUT
/api/data/{data_pk}/associations/{association_pk}/metadata
const url = 'https://example.com/api/data/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/associations/example/metadata';const options = { method: 'PUT', headers: { 'X-Batch': 'true', 'X-Workspace': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","value":"example","selected_value":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","plugin_field":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","madbot_field":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/data/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/associations/example/metadata \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Batch: true' \ --header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '[ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "value": "example", "selected_value": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "plugin_field": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "madbot_field": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ]'Batch update metadata for a node/sample/data/data-association. Requires X-Batch: true and a JSON array body; each item must include metadata id.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”association_pk
required
string
data_pk
required
string format: uuid
Header Parameters
Section titled “Header Parameters”X-Batch
required
boolean
Must be set to true for batch update mode.
X-Workspace
required
string format: uuid
Workspace ID
Query Parameters
Section titled “Query Parameters”datalink
string
Datalink ID specific to the provided data
Request Bodyrequired
Section titled “Request Bodyrequired”Array<object>
One row in a batch metadata PUT (list handled by MetadataBatchUpdateListSerializer).
object
id
required
string format: uuid
value
selected_value
string format: uuid
plugin_field
string format: uuid
madbot_field
string format: uuid
Example generated
[ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "value": "example", "selected_value": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "plugin_field": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "madbot_field": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }]Array<object>
One row in a batch metadata PUT (list handled by MetadataBatchUpdateListSerializer).
object
id
required
string format: uuid
value
selected_value
string format: uuid
plugin_field
string format: uuid
madbot_field
string format: uuid
Example generated
id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&value=example&selected_value=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&plugin_field=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&madbot_field=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0Array<object>
One row in a batch metadata PUT (list handled by MetadataBatchUpdateListSerializer).
object
id
required
string format: uuid
value
selected_value
string format: uuid
plugin_field
string format: uuid
madbot_field
string format: uuid
Responses
Section titled “Responses”Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "uri_validation_error", "message": "Invalid URI parameters. Check the `details` property for more details.", "details": [ { "parameter_name": "associated_object", "code": "required", "message": "This field is required" } ]}Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "forbidden", "message": "You do not have permission to perform this operation. Check the `details` property for more details.", "details": [ { "parameter": "node", "code": "not_allowed", "message": "The member's role does not allow update." } ]}Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "object_not_found", "message": "Object not found. Check the `details` property for more details.", "details": [ { "parameter": "<id>", "code": "does_not_exist", "message": "\"<id>\" does not exist." } ]}
