Skip to content

nodes_metadata_update

PUT
/api/nodes/{node_pk}/metadata/{id}
curl --request PUT \
--url https://example.com/api/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "value": "example", "selected_value": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Update a Metadata object.

id
required
string format: uuid

A UUID string identifying this metadata.

node_pk
required
string format: uuid
X-Workspace
required
string format: uuid

Workspace ID

datalink
string

Datalink ID specific to the provided data

Serializer for Metadata model during update.

object
value
nullable
selected_value
string format: uuid
nullable

Example generated

{
"value": "example",
"selected_value": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
Media typeapplication/json

Serializer for Metadata model.

object
id
required
string format: uuid
field
required

Dynamically return the correct metadata field (madbot_field or plugin_field).

Parameters

obj : Metadata The Metadata instance.

Returns

dict Serialized data of the related metadata field.

object
key
additional properties
value
nullable
node
required
string format: uuid
nullable
sample
required
string format: uuid
nullable
data
required
string format: uuid
nullable
data_association
required
string format: uuid
nullable
is_valid
required
string
validation_errors
required
string
history
required

Retrieve the history of the metadata object.

Parameters

obj : object The object that has a history attribute.

Returns

list A list of dictionaries containing the history of the metadata object, where each dictionary includes the history ID, date, value, and editor information.

Array<object>
object
key
additional properties
created_by
required

Return the interactor information of the object’s creator.

Parameters

obj : object The object containing the creator information.

Returns

dict The interactor information of the creator.

object
key
additional properties
created_time
required
string format: date-time
last_edited_by
required

Return information about the last interactor who edited the object.

Parameters

obj : object The object containing the last editor information.

Returns

dict The interactor information of the last editor.

object
key
additional properties
last_edited_time
required
string format: date-time

Example generated

{
"value": "example"
}
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": "body_validation_error",
"message": "The request body does not match the schema for the expected parameters. Check the `details` property for more details.",
"details": [
{
"parameter": "<parameter>",
"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 creation."
}
]
}
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."
}
]
}