Skip to content

nodes_metadata_update_batch_collection

PUT
/api/nodes/{node_pk}/metadata
curl --request PUT \
--url https://example.com/api/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/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.

node_pk
required
string format: uuid
X-Batch
required
boolean

Must be set to true for batch update mode.

X-Workspace
required
string format: uuid

Workspace ID

datalink
string

Datalink ID specific to the provided data

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
nullable
plugin_field
string format: uuid
nullable
madbot_field
string format: uuid
nullable

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"
}
]
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
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
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
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
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
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."
}
]
}